From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_core.h | 72 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 35 deletions(-) (limited to 'include/m_core.h') diff --git a/include/m_core.h b/include/m_core.h index 4f77e965a5..803185233a 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -48,6 +48,8 @@ MIR_CORE_DLL(LPCTSTR) CmdLine_GetOption(LPCTSTR ptszParameter); /////////////////////////////////////////////////////////////////////////////// // database functions +DECLARE_HANDLE(HCONTACT); + typedef UINT32 MCONTACT; #define INVALID_CONTACT_ID (MCONTACT(-1)) @@ -125,9 +127,9 @@ are no contacts in the db. */ #if defined(__cplusplus) - MIR_CORE_DLL(HANDLE) db_find_first(const char *szProto = NULL); + MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto = NULL); #else - MIR_CORE_DLL(HANDLE) db_find_first(const char *szProto); + MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto); #endif /* @@ -139,9 +141,9 @@ hContact was the last contact in the db or hContact was invalid. */ #if defined(__cplusplus) - MIR_CORE_DLL(HANDLE) db_find_next(HANDLE hContact, const char *szProto = NULL); + MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto = NULL); #else - MIR_CORE_DLL(HANDLE) db_find_next(HANDLE hContact, const char *szProto); + MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto); #endif /****************************************************************************** @@ -170,7 +172,7 @@ db/time/x below with useful stuff for dealing with it. #define EVENTTYPE_AUTHREQUEST 1001 //specific codes, hence the module- #define EVENTTYPE_FILE 1002 //specific limit has been raised to 2000 -MIR_CORE_DLL(HANDLE) db_event_add(HANDLE hContact, DBEVENTINFO *dbei); +MIR_CORE_DLL(HANDLE) db_event_add(HCONTACT hContact, DBEVENTINFO *dbei); /* Gets the number of events in the chain belonging to a contact in the database. @@ -178,7 +180,7 @@ Returns the number of events in the chain owned by hContact or -1 if hContact is invalid. They can be retrieved using the db_event_first/last() services. */ -MIR_CORE_DLL(int) db_event_count(HANDLE hContact); +MIR_CORE_DLL(int) db_event_count(HCONTACT hContact); /* Removes a single event from the database @@ -187,7 +189,7 @@ Returns 0 on success, or nonzero if hDbEvent was invalid Triggers a db/event/deleted event just *before* the event is deleted */ -MIR_CORE_DLL(int) db_event_delete(HANDLE hContact, HANDLE hDbEvent); +MIR_CORE_DLL(int) db_event_delete(HCONTACT hContact, HANDLE hDbEvent); /* Retrieves a handle to the first event in the chain for hContact @@ -195,7 +197,7 @@ Returns the handle, or NULL if hContact is invalid or has no events Events in a chain are sorted chronologically automatically */ -MIR_CORE_DLL(HANDLE) db_event_first(HANDLE hContact); +MIR_CORE_DLL(HANDLE) db_event_first(HCONTACT hContact); /* Retrieves a handle to the first unread event in the chain for hContact @@ -209,7 +211,7 @@ This service is designed for startup, reloading all the events that remained unread from last time */ -MIR_CORE_DLL(HANDLE) db_event_firstUnread(HANDLE hContact); +MIR_CORE_DLL(HANDLE) db_event_firstUnread(HCONTACT hContact); /* Retrieves all the information stored in hDbEvent @@ -246,7 +248,7 @@ This service is exceptionally slow. Use only when you have no other choice at all. */ -MIR_CORE_DLL(HANDLE) db_event_getContact(HANDLE hDbEvent); +MIR_CORE_DLL(HCONTACT) db_event_getContact(HANDLE hDbEvent); /* Retrieves a handle to the last event in the chain for hContact @@ -254,7 +256,7 @@ Returns the handle, or NULL if hContact is invalid or has no events Events in a chain are sorted chronologically automatically */ -MIR_CORE_DLL(HANDLE) db_event_last(HANDLE hDbEvent); +MIR_CORE_DLL(HANDLE) db_event_last(HCONTACT hContact); /* Changes the flags for an event to mark it as read. @@ -265,7 +267,7 @@ This is the one database write operation that does not trigger an event. Modules should not save flags states for any length of time. */ -MIR_CORE_DLL(int) db_event_markRead(HANDLE hContact, HANDLE hDbEvent); +MIR_CORE_DLL(int) db_event_markRead(HCONTACT hContact, HANDLE hDbEvent); /* Retrieves a handle to the next event in a chain after hDbEvent @@ -287,33 +289,33 @@ MIR_CORE_DLL(HANDLE) db_event_prev(HANDLE hDbEvent); * DATABASE SETTINGS */ -MIR_CORE_DLL(INT_PTR) db_get(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv); -MIR_CORE_DLL(int) db_get_b(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue); -MIR_CORE_DLL(int) db_get_w(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue); -MIR_CORE_DLL(DWORD) db_get_dw(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, DWORD errorValue); -MIR_CORE_DLL(char*) db_get_sa(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting); -MIR_CORE_DLL(WCHAR*) db_get_wsa(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting); +MIR_CORE_DLL(INT_PTR) db_get(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv); +MIR_CORE_DLL(int) db_get_b(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue); +MIR_CORE_DLL(int) db_get_w(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue); +MIR_CORE_DLL(DWORD) db_get_dw(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD errorValue); +MIR_CORE_DLL(char*) db_get_sa(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting); +MIR_CORE_DLL(WCHAR*) db_get_wsa(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting); -MIR_CORE_DLL(int) db_get_static(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest); -MIR_CORE_DLL(int) db_get_static_utf(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest); -MIR_CORE_DLL(int) db_get_wstatic(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, WCHAR *pDest, int cbDest); +MIR_CORE_DLL(int) db_get_static(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest); +MIR_CORE_DLL(int) db_get_static_utf(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest); +MIR_CORE_DLL(int) db_get_wstatic(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WCHAR *pDest, int cbDest); #if defined(__cplusplus) - MIR_CORE_DLL(INT_PTR) db_get_s(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType=DBVT_ASCIIZ); + MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType=DBVT_ASCIIZ); #else - MIR_CORE_DLL(INT_PTR) db_get_s(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType); + MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType); #endif -MIR_CORE_DLL(INT_PTR) db_set(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv); -MIR_CORE_DLL(INT_PTR) db_set_b(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, BYTE val); -MIR_CORE_DLL(INT_PTR) db_set_w(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, WORD val); -MIR_CORE_DLL(INT_PTR) db_set_dw(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, DWORD val); -MIR_CORE_DLL(INT_PTR) db_set_s(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val); -MIR_CORE_DLL(INT_PTR) db_set_ws(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, LPCWSTR val); -MIR_CORE_DLL(INT_PTR) db_set_utf(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val); -MIR_CORE_DLL(INT_PTR) db_set_blob(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting, void *val, unsigned len); +MIR_CORE_DLL(INT_PTR) db_set(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv); +MIR_CORE_DLL(INT_PTR) db_set_b(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, BYTE val); +MIR_CORE_DLL(INT_PTR) db_set_w(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WORD val); +MIR_CORE_DLL(INT_PTR) db_set_dw(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD val); +MIR_CORE_DLL(INT_PTR) db_set_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val); +MIR_CORE_DLL(INT_PTR) db_set_ws(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCWSTR val); +MIR_CORE_DLL(INT_PTR) db_set_utf(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val); +MIR_CORE_DLL(INT_PTR) db_set_blob(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, void *val, unsigned len); -MIR_CORE_DLL(INT_PTR) db_unset(HANDLE hContact, LPCSTR szModule, LPCSTR szSetting); +MIR_CORE_DLL(INT_PTR) db_unset(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting); #if defined(__cplusplus) MIR_CORE_DLL(BOOL) db_set_resident(LPCSTR szModule, const char *szService, BOOL bEnable=TRUE); @@ -388,10 +390,10 @@ MIR_CORE_DLL(void) KillModuleServices(HINSTANCE hInst); MIR_CORE_DLL(void) KillObjectServices(void* pObject); #if defined(_STATIC) -__declspec(dllexport) INT_PTR CallContactService(HANDLE, const char *, WPARAM, LPARAM); +__declspec(dllexport) INT_PTR CallContactService(HCONTACT, const char *, WPARAM, LPARAM); __declspec(dllexport) INT_PTR CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam); #else -MIR_C_CORE_DLL(INT_PTR) CallContactService(HANDLE, const char *, WPARAM, LPARAM); +MIR_C_CORE_DLL(INT_PTR) CallContactService(HCONTACT, const char *, WPARAM, LPARAM); MIR_C_CORE_DLL(INT_PTR) CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam); #endif @@ -614,7 +616,7 @@ MIR_CORE_DLL(int) mir_vsnwprintf(WCHAR *buffer, size_t count, const WCHAR* fm MIR_CORE_DLL(INT_PTR) ProtoCallService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam); MIR_CORE_DLL(int) ProtoServiceExists(LPCSTR szModule, const char *szService); -MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(LPCSTR szModule, HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam); +MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(LPCSTR szModule, HCONTACT 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); -- cgit v1.2.3