From bb952e431866d131bae95c08e579ec8a00f00343 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 8 Jul 2013 22:10:14 +0000 Subject: core protocol helpers for creating protocol evengs, services & threads git-svn-id: http://svn.miranda-ng.org/main/trunk@5286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/utils.h | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'protocols/FacebookRM/src/utils.h') diff --git a/protocols/FacebookRM/src/utils.h b/protocols/FacebookRM/src/utils.h index eef3907004..c0c8e680d3 100644 --- a/protocols/FacebookRM/src/utils.h +++ b/protocols/FacebookRM/src/utils.h @@ -31,35 +31,6 @@ along with this program. If not, see . // miscellaneous #define UTILS_CONV_TIME_T 0x0040 // 1234567890 -template -void CreateProtoService(const char *module,const char *service, - int (__cdecl T::*serviceProc)(WPARAM,LPARAM),T *self) -{ - char temp[MAX_PATH*2]; - - mir_snprintf(temp,sizeof(temp),"%s%s",module,service); - CreateServiceFunctionObj(temp,(MIRANDASERVICEOBJ)*(void**)&serviceProc, self); -} - -template -void HookProtoEvent(const char* evt, int (__cdecl T::*eventProc)(WPARAM,LPARAM), T *self) -{ - ::HookEventObj(evt,(MIRANDAHOOKOBJ)*(void**)&eventProc,self); -} - -template -HANDLE ForkThreadEx(void (__cdecl T::*thread)(void*),T *self,void *data = 0) -{ - return reinterpret_cast(mir_forkthreadowner( - (pThreadFuncOwner)*(void**)&thread,self,data,0)); -} - -template -void ForkThread(void (__cdecl T::*thread)(void*),T *self,void *data = 0) -{ - CloseHandle(ForkThreadEx(thread,self,data)); -} - namespace utils { namespace url -- cgit v1.2.3