diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-08 18:56:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-08 18:56:00 +0000 |
commit | c181af64bab27eb50e684c64c0a3caa49f8bbe39 (patch) | |
tree | 2361b449d0ab242d5de0d8d432a5791c92f42301 /include | |
parent | 6dde588a8a294406cb044dd0bce1c82232285efc (diff) |
protocol helpers, beginning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5285 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_core.h | 6 | ||||
-rw-r--r-- | include/m_protoint.h | 13 |
2 files changed, 6 insertions, 13 deletions
diff --git a/include/m_core.h b/include/m_core.h index f4cb21587d..4467168395 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -599,6 +599,12 @@ MIR_CORE_DLL(INT_PTR) ProtoCallService(const char *szModule, const char *szServi MIR_CORE_DLL(int) ProtoServiceExists(const char *szModule, const char *szService);
MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+// Call it in the very beginning of your proto's constructor
+MIR_CORE_DLL(void) ProtoConstructor(struct PROTO_INTERFACE *pThis, const char *pszModuleName, const TCHAR *ptszUserName);
+
+// Call it in the very end of your proto's destructor
+MIR_CORE_DLL(void) ProtoDestructor(struct PROTO_INTERFACE *pThis);
+
///////////////////////////////////////////////////////////////////////////////
// sha1 functions
diff --git a/include/m_protoint.h b/include/m_protoint.h index 9849bbe320..ac700dfbad 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -106,17 +106,4 @@ struct PROTO_INTERFACE : public MZeroedObject virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) = 0;
};
-// Call it in the very beginning of your proto's constructor
-__forceinline void ProtoConstructor(PROTO_INTERFACE *pThis, LPCSTR pszModuleName, LPCTSTR ptszUserName)
-{
- CallService("Proto/Constructor", (WPARAM)pThis, (LPARAM)pszModuleName);
- pThis->m_tszUserName = mir_tstrdup(ptszUserName);
-}
-
-// Call it in the very end of your proto's destructor
-__forceinline void ProtoDestructor(PROTO_INTERFACE *pThis)
-{
- CallService("Proto/Destructor", (WPARAM)pThis, 0);
-}
-
#endif // M_PROTOINT_H__
|