summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/options.h
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2015-03-26 20:38:55 +0000
committerRené Schümann <white06tiger@gmail.com>2015-03-26 20:38:55 +0000
commit5f2e4efe46fefa7cd11f275896954c24be37b568 (patch)
tree00fb544f0a9a9e9a89dd1af28b97a6248edac9eb /plugins/MirOTR/src/options.h
parent1f7e069bda342dff43e2224060f10fcb098ea62a (diff)
MirOTR: compatibility update to support/use libotr 4
+ added otrlextensions from Psi+ (thanks guys, better than our old modification to libotr) * basic instance tag support, though we don't offer user choice yet. + added ProtoGetNickname(), stolen from TabSRMM to get our own nickname of given protocol (utils.cpp) git-svn-id: http://svn.miranda-ng.org/main/trunk@12503 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/src/options.h')
-rw-r--r--plugins/MirOTR/src/options.h140
1 files changed, 71 insertions, 69 deletions
diff --git a/plugins/MirOTR/src/options.h b/plugins/MirOTR/src/options.h
index 772d0c5d45..da2e59ba3c 100644
--- a/plugins/MirOTR/src/options.h
+++ b/plugins/MirOTR/src/options.h
@@ -1,69 +1,71 @@
-#ifndef _OPTIONS_INC
-#define _OPTIONS_INC
-
-#define PRIVATE_KEY_FILENAME "otr.private_key"
-#define FINGERPRINT_STORE_FILENAME "otr.fingerprints"
-
-extern char g_fingerprint_store_filename[MAX_PATH];
-extern char g_private_key_filename[MAX_PATH];
-
-#define CONTACT_DEFAULT_POLICY 0xFFFF
-
-typedef enum {ED_POP, ED_BAL, ED_MB} ErrorDisplay;
-
-#define OPTIONS_PREFIXLEN 64
-
-typedef struct {
- OtrlPolicy default_policy;
- ErrorDisplay err_method;
- bool prefix_messages;
- bool msg_inline;
- bool msg_popup;
- char prefix[OPTIONS_PREFIXLEN];
-
- bool delete_history;
- bool delete_systeminfo;
- bool autoshow_verify;
-
- bool end_offline, end_window_close;
-
- // temporary options
- bool bHavePopups, bHaveSecureIM, bHaveButtonsBar;
-
-} Options;
-
-extern Options options;
-
-#define WMU_REFRESHLIST (WM_USER + 241)
-#define WMU_REFRESHPROTOLIST (WM_USER + 242)
-#define CONTACT_DEFAULT_POLICY 0xFFFF
-
-#include <map>
-enum HTMLConvSetting {
- HTMLCONV_DISABLE,
- HTMLCONV_ENABLE
-};
-struct CONTACT_DATA {
- OtrlPolicy policy;
- int htmlconv;
-};
-typedef std::map<MCONTACT, CONTACT_DATA> ContactPolicyMap;
-typedef enum {FPM_VERIFY, FPM_NOTRUST, FPM_DELETE } FPModify;
-typedef std::map<Fingerprint*, FPModify> FPModifyMap;
-
-int OptInit(WPARAM wParam, LPARAM lParam);
-
-void LoadOptions();
-void SaveOptions();
-extern "C" int OpenOptions(WPARAM wParam, LPARAM lParam);
-void InitOptions();
-void DeinitOptions();
-
-void ReadPrivkeyFiles();
-
-static INT_PTR CALLBACK DlgProcMirOTROpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-#endif
+#ifndef _OPTIONS_INC
+#define _OPTIONS_INC
+
+#define PRIVATE_KEY_FILENAME "otr.private_key"
+#define FINGERPRINT_STORE_FILENAME "otr.fingerprints"
+#define INSTAG_FILENAME "otr.instag"
+
+extern char g_fingerprint_store_filename[MAX_PATH];
+extern char g_private_key_filename[MAX_PATH];
+extern char g_instag_filename[MAX_PATH];
+
+#define CONTACT_DEFAULT_POLICY 0xFFFF
+
+typedef enum {ED_POP, ED_BAL, ED_MB} ErrorDisplay;
+
+#define OPTIONS_PREFIXLEN 64
+
+typedef struct {
+ OtrlPolicy default_policy;
+ ErrorDisplay err_method;
+ bool prefix_messages;
+ bool msg_inline;
+ bool msg_popup;
+ char prefix[OPTIONS_PREFIXLEN];
+
+ bool delete_history;
+ bool delete_systeminfo;
+ bool autoshow_verify;
+
+ bool end_offline, end_window_close;
+
+ // temporary options
+ bool bHavePopups, bHaveSecureIM, bHaveButtonsBar;
+
+} Options;
+
+extern Options options;
+
+#define WMU_REFRESHLIST (WM_USER + 241)
+#define WMU_REFRESHPROTOLIST (WM_USER + 242)
+#define CONTACT_DEFAULT_POLICY 0xFFFF
+
+#include <map>
+enum HTMLConvSetting {
+ HTMLCONV_DISABLE,
+ HTMLCONV_ENABLE
+};
+struct CONTACT_DATA {
+ OtrlPolicy policy;
+ int htmlconv;
+};
+typedef std::map<MCONTACT, CONTACT_DATA> ContactPolicyMap;
+typedef enum {FPM_VERIFY, FPM_NOTRUST, FPM_DELETE } FPModify;
+typedef std::map<Fingerprint*, FPModify> FPModifyMap;
+
+int OptInit(WPARAM wParam, LPARAM lParam);
+
+void LoadOptions();
+void SaveOptions();
+extern "C" int OpenOptions(WPARAM wParam, LPARAM lParam);
+void InitOptions();
+void DeinitOptions();
+
+void ReadPrivkeyFiles();
+
+static INT_PTR CALLBACK DlgProcMirOTROpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+
+#endif