diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_core.h | 3 | ||||
-rw-r--r-- | include/m_protoint.h | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/m_core.h b/include/m_core.h index accab97bf1..e242aa38f5 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -632,6 +632,9 @@ typedef INT_PTR (__cdecl PROTO_INTERFACE::*ProtoServiceFuncParam)(WPARAM, LPARAM MIR_CORE_DLL(void) ProtoCreateServiceParam(struct PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFuncParam, LPARAM);
#endif
+MIR_CORE_DLL(void) ProtoLogA(struct PROTO_INTERFACE *pThis, LPCSTR szFormat, va_list args);
+MIR_CORE_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, va_list args);
+
// avatar support functions
// returns image extension by a PA_* constant or empty string for PA_FORMAT_UNKNOWN
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
|