diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-08 22:10:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-08 22:10:14 +0000 |
commit | bb952e431866d131bae95c08e579ec8a00f00343 (patch) | |
tree | 60881668cf328b50906346c5f66ce47da2d9ad88 /protocols/Omegle/src/proto.cpp | |
parent | c181af64bab27eb50e684c64c0a3caa49f8bbe39 (diff) |
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
Diffstat (limited to 'protocols/Omegle/src/proto.cpp')
-rw-r--r-- | protocols/Omegle/src/proto.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
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 <http://www.gnu.org/licenses/>. #include "common.h"
-OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username)
+OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username) :
+ PROTO<OmegleProto>(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 );
}
|