summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-06-25 19:08:15 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-06-25 19:08:15 +0000
commitc5de45b42456d1ed5250e477e70d9ea4001f4441 (patch)
treef328e4999ddd3fe46c77ce3ee52b7e177067806c /include
parentc3635f352a1a7a3afe65fe74e3f0fdefdb72e6ae (diff)
- Set wparam and lParam to 0 as default arg in CallService and others, to simplify some code
git-svn-id: http://svn.miranda-ng.org/main/trunk@14384 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/m_core.h16
-rw-r--r--include/m_database.h4
-rw-r--r--include/m_protoint.h18
3 files changed, 19 insertions, 19 deletions
diff --git a/include/m_core.h b/include/m_core.h
index 2596a01d42..fea5e37baf 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -94,12 +94,12 @@ typedef INT_PTR (*MIRANDASERVICEOBJPARAM)(void*, WPARAM, LPARAM, LPARAM);
MIR_CORE_DLL(HANDLE) CreateHookableEvent(const char *name);
MIR_CORE_DLL(int) DestroyHookableEvent(HANDLE hEvent);
MIR_CORE_DLL(int) SetHookDefaultForHookableEvent(HANDLE hEvent, MIRANDAHOOK pfnHook);
-MIR_CORE_DLL(int) CallPluginEventHook(HINSTANCE hInst, HANDLE hEvent, WPARAM wParam, LPARAM lParam);
-MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam);
-MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam, LPARAM lParam);
+MIR_CORE_DLL(int) CallPluginEventHook(HINSTANCE hInst, HANDLE hEvent, WPARAM wParam = 0, LPARAM lParam = 0);
+MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam = 0, LPARAM lParam = 0);
+MIR_CORE_DLL(int) NotifyFastHook(HANDLE hEvent, WPARAM wParam = 0, LPARAM lParam = 0);
MIR_CORE_DLL(HANDLE) HookEvent(const char* name, MIRANDAHOOK hookProc);
-MIR_CORE_DLL(HANDLE) HookEventParam(const char* name, MIRANDAHOOKPARAM hookProc, LPARAM lParam);
+MIR_CORE_DLL(HANDLE) HookEventParam(const char* name, MIRANDAHOOKPARAM hookProc, LPARAM lParam = 0);
MIR_CORE_DLL(HANDLE) HookEventObj(const char* name, MIRANDAHOOKOBJ hookProc, void* object);
MIR_CORE_DLL(HANDLE) HookEventObjParam(const char* name, MIRANDAHOOKOBJPARAM hookProc, void* object, LPARAM lParam);
MIR_CORE_DLL(HANDLE) HookEventMessage(const char* name, HWND hwnd, UINT message);
@@ -115,16 +115,16 @@ MIR_CORE_DLL(HANDLE) CreateProtoServiceFunction(const char *szModule, const cha
MIR_CORE_DLL(int) DestroyServiceFunction(HANDLE hService);
MIR_CORE_DLL(int) ServiceExists(const char *name);
-MIR_CORE_DLL(INT_PTR) CallService(const char *name, WPARAM wParam, LPARAM lParam);
-MIR_CORE_DLL(INT_PTR) CallServiceSync(const char *name, WPARAM wParam, LPARAM lParam);
+MIR_CORE_DLL(INT_PTR) CallService(const char *name, WPARAM wParam = 0, LPARAM lParam = 0);
+MIR_CORE_DLL(INT_PTR) CallServiceSync(const char *name, WPARAM wParam = 0, LPARAM lParam = 0);
MIR_CORE_DLL(int) CallFunctionAsync(void (__stdcall *func)(void *), void *arg);
MIR_CORE_DLL(void) KillModuleServices(HINSTANCE hInst);
MIR_CORE_DLL(void) KillObjectServices(void* pObject);
MIR_APP_DLL(int) ProtoServiceExists(LPCSTR szModule, const char *szService);
-MIR_APP_DLL(INT_PTR) CallContactService(MCONTACT, const char*, WPARAM, LPARAM);
-MIR_APP_DLL(INT_PTR) CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
+MIR_APP_DLL(INT_PTR) CallContactService(MCONTACT, const char*, WPARAM wParam = 0, LPARAM lParam = 0);
+MIR_APP_DLL(INT_PTR) CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam = 0, LPARAM lParam = 0);
///////////////////////////////////////////////////////////////////////////////
// exceptions
diff --git a/include/m_database.h b/include/m_database.h
index 9fb0cf23df..1d032b044f 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -287,8 +287,8 @@ MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent);
// Database settings
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(int) db_get_b(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue = 0);
+MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue = 0);
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_t*) db_get_wsa(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 515372d603..3c5cb5f39d 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -115,32 +115,32 @@ struct MIR_APP_EXPORT PROTO_INTERFACE : public MZeroedObject
__forceinline void WindowUnsubscribe(HWND hwnd) {
::ProtoWindowRemove(this, hwnd); }
- __forceinline INT_PTR ProtoBroadcastAck(MCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam) {
+ __forceinline INT_PTR ProtoBroadcastAck(MCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam = 0) {
return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam); }
__forceinline INT_PTR delSetting(const char *name) { return db_unset(NULL, m_szModuleName, name); }
__forceinline INT_PTR delSetting(MCONTACT hContact, const char *name) { return db_unset(hContact, m_szModuleName, name); }
- __forceinline bool getBool(const char *name, bool defaultValue) {
+ __forceinline bool getBool(const char *name, bool defaultValue = false) {
return db_get_b(NULL, m_szModuleName, name, defaultValue) != 0; }
- __forceinline bool getBool(MCONTACT hContact, const char *name, bool defaultValue) {
+ __forceinline bool getBool(MCONTACT hContact, const char *name, bool defaultValue = false) {
return db_get_b(hContact, m_szModuleName, name, defaultValue) != 0; }
__forceinline bool isChatRoom(MCONTACT hContact) { return getBool(hContact, "ChatRoom", false); }
- __forceinline int getByte(const char *name, BYTE defaultValue) {
+ __forceinline int getByte(const char *name, BYTE defaultValue = 0) {
return db_get_b(NULL, m_szModuleName, name, defaultValue); }
- __forceinline int getByte(MCONTACT hContact, const char *name, BYTE defaultValue) {
+ __forceinline int getByte(MCONTACT hContact, const char *name, BYTE defaultValue = 0) {
return db_get_b(hContact, m_szModuleName, name, defaultValue); }
- __forceinline int getWord(const char *name, WORD defaultValue) {
+ __forceinline int getWord(const char *name, WORD defaultValue = 0) {
return db_get_w(NULL, m_szModuleName, name, defaultValue); }
- __forceinline int getWord(MCONTACT hContact, const char *name, WORD defaultValue) {
+ __forceinline int getWord(MCONTACT hContact, const char *name, WORD defaultValue = 0) {
return db_get_w(hContact, m_szModuleName, name, defaultValue); }
- __forceinline DWORD getDword(const char *name, DWORD defaultValue) {
+ __forceinline DWORD getDword(const char *name, DWORD defaultValue = 0) {
return db_get_dw(NULL, m_szModuleName, name, defaultValue); }
- __forceinline DWORD getDword(MCONTACT hContact, const char *name, DWORD defaultValue) {
+ __forceinline DWORD getDword(MCONTACT hContact, const char *name, DWORD defaultValue = 0) {
return db_get_dw(hContact, m_szModuleName, name, defaultValue); }
__forceinline INT_PTR getString(const char *name, DBVARIANT *result) {