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/Omegle/src/proto.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'protocols/Omegle/src/proto.cpp') diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 09f330a111..e3c1fd6d1b 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -22,10 +22,9 @@ along with this program. If not, see . #include "common.h" -OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username) +OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username) : + PROTO(proto_name, username) { - ProtoConstructor(this, proto_name, username); - this->facy.parent = this; this->signon_lock_ = CreateMutex( NULL, FALSE, NULL ); @@ -34,13 +33,13 @@ OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username) this->facy.connection_lock_ = CreateMutex( NULL, FALSE, NULL ); // Group chats - CreateProtoService(m_szModuleName, PS_JOINCHAT, &OmegleProto::OnJoinChat, this); - CreateProtoService(m_szModuleName, PS_LEAVECHAT, &OmegleProto::OnLeaveChat, this); + CreateService(PS_JOINCHAT, &OmegleProto::OnJoinChat); + CreateService(PS_LEAVECHAT, &OmegleProto::OnLeaveChat); - CreateProtoService(m_szModuleName, PS_CREATEACCMGRUI, &OmegleProto::SvcCreateAccMgrUI, this); + CreateService(PS_CREATEACCMGRUI, &OmegleProto::SvcCreateAccMgrUI); - HookProtoEvent(ME_OPT_INITIALISE, &OmegleProto::OnOptionsInit, this); - HookProtoEvent(ME_GC_EVENT, &OmegleProto::OnChatEvent, this); + HookEvent(ME_OPT_INITIALISE, &OmegleProto::OnOptionsInit); + HookEvent(ME_GC_EVENT, &OmegleProto::OnChatEvent); // Create standard network connection TCHAR descr[512]; @@ -169,9 +168,9 @@ int OmegleProto::OnEvent(PROTOEVENTTYPE event,WPARAM wParam,LPARAM lParam) ////////////////////////////////////////////////////////////////////////////// // EVENTS -int OmegleProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam) +INT_PTR OmegleProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam) { - return (int)CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_OmegleACCOUNT), + return (INT_PTR)CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_OmegleACCOUNT), (HWND)lParam, OmegleAccountProc, (LPARAM)this ); } -- cgit v1.2.3