diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-11 14:01:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-11 14:01:25 +0000 |
commit | 773421e8ba17637d994088c393d406226b516a30 (patch) | |
tree | 130c0bf529e30f493ae4f2abbe1230d31fecdeed /include/m_protoint.h | |
parent | 3fc8b6f686262e8a595fc10b2bd947526ca77bdc (diff) |
- m_hNetlibUser moved to PROTO_INTERFACE;
- unified protocol loggers
git-svn-id: http://svn.miranda-ng.org/main/trunk@6435 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_protoint.h')
-rw-r--r-- | include/m_protoint.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h index 769b4ff027..255cda85ff 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -53,10 +53,24 @@ struct PROTO_INTERFACE : public MZeroedObject TCHAR* m_tszUserName;
char* m_szModuleName;
HANDLE m_hProtoIcon;
+ HANDLE m_hNetlibUser;
//////////////////////////////////////////////////////////////////////////////////////
// Helpers
+ __forceinline void debugLogA(LPCSTR szFormat, ...)
+ {
+ va_list args;
+ va_start(args, szFormat);
+ ProtoLogA(this, szFormat, args);
+ }
+ __forceinline void debugLogW(LPCWSTR wszFormat, ...)
+ {
+ va_list args;
+ va_start(args, wszFormat);
+ ProtoLogW(this, wszFormat, args);
+ }
+
__forceinline INT_PTR ProtoBroadcastAck(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam) {
return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam); }
@@ -121,10 +135,12 @@ struct PROTO_INTERFACE : public MZeroedObject __forceinline void setWString(HANDLE hContact, const char *name, const WCHAR* value) { db_set_ws(hContact, m_szModuleName, name, value); }
#if defined(_UNICODE)
+ #define debugLog debugLogW
#define getTString getWString
#define getTStringA getWStringA
#define setTString setWString
#else
+ #define debugLog debugLogA
#define getTString getString
#define getTStringA getStringA
#define setTString setString
|