summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/options.h
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2015-03-14 19:58:15 +0000
committerRené Schümann <white06tiger@gmail.com>2015-03-14 19:58:15 +0000
commit5a97f4b7c941dc704ab4dd2c370d19bb556c1ce6 (patch)
tree7ca8e397891238535958645ae5af8427068bcfd9 /plugins/MirOTR/src/options.h
parent02eaf116807ce4b8b49dfaee47910d2dffbfef8f (diff)
MirOTR: part 3, file/folder structure change
git-svn-id: http://svn.miranda-ng.org/main/trunk@12404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/src/options.h')
-rw-r--r--plugins/MirOTR/src/options.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/plugins/MirOTR/src/options.h b/plugins/MirOTR/src/options.h
new file mode 100644
index 0000000000..772d0c5d45
--- /dev/null
+++ b/plugins/MirOTR/src/options.h
@@ -0,0 +1,69 @@
+#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