diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-16 19:43:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-16 19:43:24 +0000 |
commit | 0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 (patch) | |
tree | 700937499ee66952d1ca5b92928fc9ec3b034447 /protocols/Sametime/src | |
parent | 7a7a6637021d78ad995f3e21e9743fae69bd2562 (diff) |
- chats services replaces with functions;
- chat calls switched from CallServiceSync to direct calls everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@17305 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src')
-rw-r--r-- | protocols/Sametime/src/conference.cpp | 22 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime.cpp | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 585e74108e..976408d699 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -120,7 +120,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) gcs.ptszName = tszConfTitle;
gcs.dwItemData = 0;
- CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcs);
+ Chat_NewSession(&gcs);
mir_free(tszConfTitle);
//add a group
@@ -132,7 +132,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszStatus = TranslateT("Normal");
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
// add users
gcd.iType = GC_EVENT_JOIN;
@@ -147,7 +147,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) gce.ptszUID = tszUserId;
gce.bIsMe = (strcmp(((mwLoginInfo*)user->data)->login_id, proto->my_login_info->login_id) == 0);
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM) &gce);
+ Chat_Event(0, &gce);
mir_free(tszUserName);
mir_free(tszUserId);
@@ -155,10 +155,10 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) // finalize setup (show window)
gcd.iType = GC_EVENT_CONTROL;
- CallServiceSync(MS_GC_EVENT, SESSION_INITDONE, (LPARAM)&gce);
+ Chat_Event(SESSION_INITDONE, &gce);
gcd.iType = GC_EVENT_CONTROL;
- CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
+ Chat_Event(SESSION_ONLINE, &gce);
if (conf == proto->my_conference)
proto->ClearInviteQueue();
@@ -182,8 +182,8 @@ void mwServiceConf_conf_closed(mwConference* conf, guint32 reason) GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
- CallService(MS_GC_EVENT, SESSION_OFFLINE, (LPARAM)&gce);
- CallService(MS_GC_EVENT, SESSION_TERMINATE, (LPARAM)&gce);
+ Chat_Event(SESSION_OFFLINE, &gce);
+ Chat_Event(SESSION_TERMINATE, &gce);
mir_free(tszConfId);
}
@@ -224,7 +224,7 @@ void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user) gce.ptszStatus = L"Normal";
gce.time = (DWORD)time(0);
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM) &gce);
+ Chat_Event(0, &gce);
mir_free(tszUserName);
mir_free(tszUserId);
@@ -252,7 +252,7 @@ void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user) gce.ptszUID = tszUserId;
gce.ptszStatus = L"Normal";
gce.time = (DWORD)time(0);
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
}
/** triggered when someone says something */
@@ -278,7 +278,7 @@ void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* wh gce.ptszUID = tszUserId;
gce.time = (DWORD)time(0);
- CallService(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
mir_free(textT);
mir_free(tszUserName);
@@ -324,7 +324,7 @@ void CSametimeProto::TerminateConference(char* name) GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
- CallService(MS_GC_EVENT, SESSION_TERMINATE, (LPARAM)&gce);
+ Chat_Event(SESSION_TERMINATE, &gce);
mir_free(idt);
}
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index bcac4f2532..e4cfbe6949 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -202,7 +202,7 @@ int CSametimeProto::OnModulesLoaded(WPARAM, LPARAM) gcr.pszModule = m_szModuleName;
gcr.ptszDispName = m_tszUserName;
gcr.iMaxText = MAX_MESSAGE_SIZE;
- CallService(MS_GC_REGISTER, 0, (LPARAM)&gcr);
+ Chat_Register(&gcr);
return 0;
}
|