diff options
Diffstat (limited to 'include/m_core.h')
-rw-r--r-- | include/m_core.h | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/include/m_core.h b/include/m_core.h index eeb2707664..d8dc70852d 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -48,18 +48,18 @@ MIR_CORE_DLL(LPCTSTR) CmdLine_GetOption(LPCTSTR ptszParameter); ///////////////////////////////////////////////////////////////////////////////
// database functions
-typedef UINT32 MCONTACT, HCONTACT;
+typedef UINT32 MCONTACT;
#define INVALID_CONTACT_ID (MCONTACT(-1))
// DBVARIANT: used by db/contact/getsetting and db/contact/writesetting
-#define DBVT_DELETED 0 //this setting just got deleted, no other values are valid
-#define DBVT_BYTE 1 //bVal and cVal are valid
-#define DBVT_WORD 2 //wVal and sVal are valid
-#define DBVT_DWORD 4 //dVal and lVal are valid
-#define DBVT_ASCIIZ 255 //pszVal is valid
-#define DBVT_BLOB 254 //cpbVal and pbVal are valid
-#define DBVT_UTF8 253 //pszVal is valid
-#define DBVT_WCHAR 252 //pszVal is valid
+#define DBVT_DELETED 0 // this setting just got deleted, no other values are valid
+#define DBVT_BYTE 1 // bVal and cVal are valid
+#define DBVT_WORD 2 // wVal and sVal are valid
+#define DBVT_DWORD 4 // dVal and lVal are valid
+#define DBVT_ASCIIZ 255 // pszVal is valid
+#define DBVT_BLOB 254 // cpbVal and pbVal are valid
+#define DBVT_UTF8 253 // pszVal is valid
+#define DBVT_WCHAR 252 // pszVal is valid
#if defined(_UNICODE)
#define DBVT_TCHAR DBVT_WCHAR
#else
@@ -125,9 +125,9 @@ are no contacts in the db. */
#if defined(__cplusplus)
- MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto = NULL);
+ MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto = NULL);
#else
- MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto);
+ MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto);
#endif
/*
@@ -139,9 +139,9 @@ hContact was the last contact in the db or hContact was invalid. */
#if defined(__cplusplus)
- MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto = NULL);
+ MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto = NULL);
#else
- MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto);
+ MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto);
#endif
/******************************************************************************
@@ -170,7 +170,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(HCONTACT hContact, DBEVENTINFO *dbei);
+MIR_CORE_DLL(HANDLE) db_event_add(MCONTACT hContact, DBEVENTINFO *dbei);
/*
Gets the number of events in the chain belonging to a contact in the database.
@@ -178,7 +178,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(HCONTACT hContact);
+MIR_CORE_DLL(int) db_event_count(MCONTACT hContact);
/*
Removes a single event from the database
@@ -187,7 +187,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(HCONTACT hContact, HANDLE hDbEvent);
+MIR_CORE_DLL(int) db_event_delete(MCONTACT hContact, HANDLE hDbEvent);
/*
Retrieves a handle to the first event in the chain for hContact
@@ -195,7 +195,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(HCONTACT hContact);
+MIR_CORE_DLL(HANDLE) db_event_first(MCONTACT hContact);
/*
Retrieves a handle to the first unread event in the chain for hContact
@@ -209,7 +209,7 @@ This service is designed for startup, reloading all the events that remained unread from last time
*/
-MIR_CORE_DLL(HANDLE) db_event_firstUnread(HCONTACT hContact);
+MIR_CORE_DLL(HANDLE) db_event_firstUnread(MCONTACT hContact);
/*
Retrieves all the information stored in hDbEvent
@@ -246,7 +246,7 @@ This service is exceptionally slow. Use only when you have no other choice at all.
*/
-MIR_CORE_DLL(HCONTACT) db_event_getContact(HANDLE hDbEvent);
+MIR_CORE_DLL(MCONTACT) db_event_getContact(HANDLE hDbEvent);
/*
Retrieves a handle to the last event in the chain for hContact
@@ -254,7 +254,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(HCONTACT hContact);
+MIR_CORE_DLL(HANDLE) db_event_last(MCONTACT hContact);
/*
Changes the flags for an event to mark it as read.
@@ -265,7 +265,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(HCONTACT hContact, HANDLE hDbEvent);
+MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, HANDLE hDbEvent);
/*
Retrieves a handle to the next event in a chain after hDbEvent
@@ -287,33 +287,33 @@ MIR_CORE_DLL(HANDLE) db_event_prev(HANDLE hDbEvent); * DATABASE SETTINGS
*/
-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_PTR) db_get(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue);
+MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue);
+MIR_CORE_DLL(DWORD) db_get_dw(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD errorValue);
+MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
+MIR_CORE_DLL(WCHAR*) db_get_wsa(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
-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);
+MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest);
+MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest);
+MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WCHAR *pDest, int cbDest);
#if defined(__cplusplus)
- MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType=DBVT_ASCIIZ);
+ MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType=DBVT_ASCIIZ);
#else
- MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType);
+ MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType);
#endif
-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_set(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, BYTE val);
+MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WORD val);
+MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD val);
+MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val);
+MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCWSTR val);
+MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val);
+MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, void *val, unsigned len);
-MIR_CORE_DLL(INT_PTR) db_unset(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
+MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT 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 +388,10 @@ MIR_CORE_DLL(void) KillModuleServices(HINSTANCE hInst); MIR_CORE_DLL(void) KillObjectServices(void* pObject);
#if defined(_STATIC)
-__declspec(dllexport) INT_PTR CallContactService(HCONTACT, const char *, WPARAM, LPARAM);
+__declspec(dllexport) INT_PTR CallContactService(MCONTACT, 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(HCONTACT, const char *, WPARAM, LPARAM);
+MIR_C_CORE_DLL(INT_PTR) CallContactService(MCONTACT, const char *, WPARAM, LPARAM);
MIR_C_CORE_DLL(INT_PTR) CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
#endif
@@ -614,7 +614,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, HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(LPCSTR szModule, MCONTACT 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);
|