OPAL  Version 3.10.4
opalzrtp.h
Go to the documentation of this file.
1 #ifndef OPAL_ZRTP_OPALZRTP_H
2 #define OPAL_ZRTP_OPALZRTP_H
3 
4 #ifdef P_USE_PRAGMA
5 #pragma interface
6 #endif
7 
8 #include <zrtp.h>
9 #include <opal/buildopts.h>
10 #include <zrtp/zrtpeventproc.h>
11 
12 namespace PWLibStupidLinkerHacks {
13  extern int libZRTPLoader;
14 };
15 
16 class OpalZrtp {
17  public:
18  static bool Init(char *name, char *zidFile);
19  static bool Init(OpalZrtp *opalZrtp);
20  static bool DeInit();
21 
22  static zrtp_global_ctx *GetZrtpContext();
23  static unsigned char *GetZID();
24  static void SetEventProcessor(ZrtpEventProcessor *eventProcessor);
26 
27  virtual ~OpalZrtp();
28 
29  protected:
30  virtual unsigned char *DoGetZID();
31  virtual zrtp_global_ctx *DoGetZrtpContext();
32  virtual bool DoInit(char *name, char *zidFile);
33 
34  private:
35  static OpalZrtp *instance;
36  static int isDefault;
37  static ZrtpEventProcessor *eventProcessor;
38 };
39 
40 
41 
42 #endif // OPAL_ZRTP_OPALZRTP_H