diff options
author | René Schümann <white06tiger@gmail.com> | 2015-03-26 20:38:55 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2015-03-26 20:38:55 +0000 |
commit | 5f2e4efe46fefa7cd11f275896954c24be37b568 (patch) | |
tree | 00fb544f0a9a9e9a89dd1af28b97a6248edac9eb /plugins/MirOTR/src/utils.h | |
parent | 1f7e069bda342dff43e2224060f10fcb098ea62a (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/utils.h')
-rw-r--r-- | plugins/MirOTR/src/utils.h | 98 |
1 files changed, 50 insertions, 48 deletions
diff --git a/plugins/MirOTR/src/utils.h b/plugins/MirOTR/src/utils.h index 71890a77eb..1b34c34eb5 100644 --- a/plugins/MirOTR/src/utils.h +++ b/plugins/MirOTR/src/utils.h @@ -1,48 +1,50 @@ -#pragma once
-#ifndef __HEADER_UTILS_H
-#define __HEADER_UTILS_H
-#include "stdafx.h"
-
-
-void lib_cs_lock();
-void lib_cs_unlock();
-
-MCONTACT find_contact(const char* userid, const char* protocol);
-ConnContext * otrl_context_find_miranda(OtrlUserState us, MCONTACT hContact);
-
-typedef enum {
- TRUST_NOT_PRIVATE,
- TRUST_FINISHED,
- TRUST_UNVERIFIED,
- TRUST_PRIVATE
-} TrustLevel;
-TrustLevel otr_context_get_trust(ConnContext *context);
-void VerifyFingerprint(ConnContext *context, bool verify);
-void VerifyFingerprintMessage(ConnContext *context, bool verify);
-
-void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20]);
-
-char* contact_get_id(MCONTACT hContact, bool bNameOnError=true);
-__inline const char* contact_get_account(MCONTACT hContact);
-extern __inline const TCHAR* contact_get_nameT(MCONTACT hContact);
-
-void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTACT hContact = NULL);
-void ShowWarning(TCHAR* msg);
-void ShowError(TCHAR* msg);
-void ShowPopupUtf(const char* line1, const char* line2, int timeout, const MCONTACT hContact = NULL);
-void ShowWarningUtf(char* msg);
-void ShowErrorUtf(char* msg);
-
-void ShowMessageInline(const MCONTACT hContact, const TCHAR *msg);
-void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg);
-
-void ShowMessage(const MCONTACT hContact, const TCHAR *msg);
-void ShowMessageUtf(const MCONTACT hContact, const char *msg);
-
-void InitUtils();
-void DeinitUtils();
-
-const TCHAR *policy_to_string(OtrlPolicy policy);
-OtrlPolicy policy_from_string(const TCHAR *polstring);
-
-#endif
\ No newline at end of file +#pragma once +#ifndef __HEADER_UTILS_H +#define __HEADER_UTILS_H +#include "stdafx.h" + + +void lib_cs_lock(); +void lib_cs_unlock(); + +MCONTACT find_contact(const char* userid, const char* protocol); +ConnContext * otrl_context_find_miranda(OtrlUserState us, MCONTACT hContact); + +typedef enum { + TRUST_NOT_PRIVATE, + TRUST_FINISHED, + TRUST_UNVERIFIED, + TRUST_PRIVATE +} TrustLevel; +TrustLevel otr_context_get_trust(ConnContext *context); +void VerifyFingerprint(ConnContext *context, bool verify); +void VerifyFingerprintMessage(ConnContext *context, bool verify); + +void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20]); + +char* contact_get_id(MCONTACT hContact, bool bNameOnError=true); +__inline const char* contact_get_account(MCONTACT hContact); +extern __inline const TCHAR* contact_get_nameT(MCONTACT hContact); + +TCHAR* ProtoGetNickname(const char* proto); + +void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTACT hContact = NULL); +void ShowWarning(TCHAR* msg); +void ShowError(TCHAR* msg); +void ShowPopupUtf(const char* line1, const char* line2, int timeout, const MCONTACT hContact = NULL); +void ShowWarningUtf(char* msg); +void ShowErrorUtf(char* msg); + +void ShowMessageInline(const MCONTACT hContact, const TCHAR *msg); +void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg); + +void ShowMessage(const MCONTACT hContact, const TCHAR *msg); +void ShowMessageUtf(const MCONTACT hContact, const char *msg); + +void InitUtils(); +void DeinitUtils(); + +const TCHAR *policy_to_string(OtrlPolicy policy); +OtrlPolicy policy_from_string(const TCHAR *polstring); + +#endif |