summaryrefslogtreecommitdiff
path: root/include/m_protoint.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-28 11:05:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-28 11:05:10 +0000
commit90c2f2a24e911c832e11fcc6443afd24efdd4cc9 (patch)
tree719972a0755925073ab6aeb7aa24e92eed5b1427 /include/m_protoint.h
parentf302909f341c5bf61bcb432d73443df6c3ba44c9 (diff)
- fix for name conflict in proto helpers;
- switch to constants defined in m_nudge.h git-svn-id: http://svn.miranda-ng.org/main/trunk@5504 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_protoint.h')
-rw-r--r--include/m_protoint.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 3a6586fef2..1905f85a18 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -60,8 +60,8 @@ struct PROTO_INTERFACE : public MZeroedObject
__forceinline INT_PTR ProtoBroadcastAck(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
{ return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam); }
- __forceinline int delSetting(const char *name) { return db_unset(NULL, m_szModuleName, name); }
- __forceinline int delSetting(HANDLE hContact, const char *name) { return db_unset(hContact, m_szModuleName, name); }
+ __forceinline INT_PTR delSetting(const char *name) { return db_unset(NULL, m_szModuleName, name); }
+ __forceinline INT_PTR delSetting(HANDLE hContact, const char *name) { return db_unset(hContact, m_szModuleName, name); }
__forceinline bool getBool(const char *name, bool defaultValue) { return ProtoGetBool0(this, name, defaultValue); }
__forceinline bool getBool(HANDLE hContact, const char *name, bool defaultValue) { return ProtoGetBool(this, hContact, name, defaultValue); }
@@ -164,8 +164,11 @@ public:
::ProtoDestructor(this);
}
+ __forceinline HANDLE CreateProtoEvent(const char *name)
+ { return ::ProtoCreateHookableEvent(this, name); }
+
typedef int (__cdecl T::*MyEventFunc)(WPARAM, LPARAM);
- __forceinline void HookEvent(const char *name, MyEventFunc pFunc)
+ __forceinline void HookProtoEvent(const char *name, MyEventFunc pFunc)
{ ::ProtoHookEvent(this, name, (ProtoEventFunc)pFunc); }
typedef void (__cdecl T::*MyThreadFunc)(void*);
@@ -175,11 +178,11 @@ public:
{ return ::ProtoForkThreadEx(this, (ProtoThreadFunc)pFunc, param, pThreadId); }
typedef INT_PTR (__cdecl T::*MyServiceFunc)(WPARAM, LPARAM);
- __forceinline void CreateService(const char *name, MyServiceFunc pFunc)
+ __forceinline void CreateProtoService(const char *name, MyServiceFunc pFunc)
{ ::ProtoCreateService(this, name, (ProtoServiceFunc)pFunc); }
typedef INT_PTR (__cdecl T::*MyServiceFuncParam)(WPARAM, LPARAM, LPARAM);
- __forceinline void CreateServiceParam(const char *name, MyServiceFuncParam pFunc, LPARAM param)
+ __forceinline void CreateProtoServiceParam(const char *name, MyServiceFuncParam pFunc, LPARAM param)
{ ::ProtoCreateServiceParam(this, name, (ProtoServiceFuncParam)pFunc, param); }
};
#endif // M_PROTOINT_H__