Changed the optional build of libotr
[centerim.git] / src / imotr.h
blob41d493b348f0e1064f158b5c163dac68463a92b5
1 #ifndef __IMOTR_H__
2 #define __IMOTR_H__
4 #include "icqcommon.h"
7 #include "imcontact.h"
9 /* libotr headers */
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 #include <libotr/context.h>
14 #include <libotr/userstate.h>
15 #ifdef __cplusplus
17 #endif
19 #define PRIVKEYFNAME "otr.private_key"
20 #define STOREFNAME "otr.fingerprints"
24 extern OtrlUserState otrg_plugin_userstate;
27 class imotr {
28 private:
30 OtrlUserState userstate;
32 void start_session(OtrlAuthInfo *auth);
35 public:
36 OtrlUserState get_userstate();
37 bool send_message(const protocolname pname, const string &touser, string &text); // return false: do not send message
38 bool receive_message(const protocolname pname, const string &from, string &text); // return false: do not show message
40 string get_msg_state(const protocolname pname, const string user);
41 string is_verified(const protocolname pname, const string user);
42 int yesno(const char *question);
43 void dialog();
45 void start_session(icqcontact *contact);
46 void end_session(icqcontact *contact);
49 imotr();
50 ~imotr();
53 extern imotr otr;
56 #endif