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/Gadu-Gadu/src/image.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/Gadu-Gadu/src/image.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/image.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 5a6b38d9b6..f970b9eb87 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -69,8 +69,8 @@ int gg_img_remove(GGIMAGEDLGDATA *dat); int GGPROTO::img_init()
{
char service[64];
- mir_snprintf(service, sizeof(service), GGS_SENDIMAGE, m_szModuleName);
- createObjService(service, &GGPROTO::img_sendimg);
+ mir_snprintf(service, sizeof(service), "%s%s", m_szModuleName, GGS_SENDIMAGE);
+ CreateService(GGS_SENDIMAGE, &GGPROTO::img_sendimg);
// Send image contact menu item
CLISTMENUITEM mi = { sizeof(mi) };
@@ -83,9 +83,7 @@ int GGPROTO::img_init() hImageMenuItem = Menu_AddContactMenuItem(&mi);
// Receive image
- mir_snprintf(service, sizeof(service), GGS_RECVIMAGE, m_szModuleName);
- createObjService(service, &GGPROTO::img_recvimage);
-
+ CreateService(GGS_RECVIMAGE, &GGPROTO::img_recvimage);
return FALSE;
}
@@ -744,9 +742,9 @@ GGIMAGEDLGDATA *gg_img_recvdlg(GGPROTO *gg, HANDLE hContact) dat->gg = gg;
ResetEvent(dat->hEvent);
#ifdef DEBUGMODE
- gg->netlog("gg_img_recvdlg(): forkthread 18 GGPROTO::img_dlgcallthread");
+ gg->netlog("gg_img_recvdlg(): ForkThread 18 GGPROTO::img_dlgcallthread");
#endif
- gg->forkthread(&GGPROTO::img_dlgcallthread, dat);
+ gg->ForkThread(&GGPROTO::img_dlgcallthread, dat);
return dat;
}
@@ -1198,9 +1196,9 @@ INT_PTR GGPROTO::img_sendimg(WPARAM wParam, LPARAM lParam) // Create new dialog
#ifdef DEBUGMODE
- netlog("img_sendimg(): forkthread 19 GGPROTO::img_dlgcallthread");
+ netlog("img_sendimg(): ForkThread 19 GGPROTO::img_dlgcallthread");
#endif
- forkthread(&GGPROTO::img_dlgcallthread, dat);
+ ForkThread(&GGPROTO::img_dlgcallthread, dat);
while (WaitForSingleObjectEx(dat->hEvent, INFINITE, TRUE) != WAIT_OBJECT_0);
CloseHandle(dat->hEvent);
|