summaryrefslogtreecommitdiff
path: root/protocols/Omegle
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-16 19:43:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-16 19:43:24 +0000
commit0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 (patch)
tree700937499ee66952d1ca5b92928fc9ec3b034447 /protocols/Omegle
parent7a7a6637021d78ad995f3e21e9743fae69bd2562 (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/Omegle')
-rw-r--r--protocols/Omegle/src/chat.cpp30
-rw-r--r--protocols/Omegle/src/proto.cpp2
2 files changed, 16 insertions, 16 deletions
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp
index 3cc30faaaf..e823ffa676 100644
--- a/protocols/Omegle/src/chat.cpp
+++ b/protocols/Omegle/src/chat.cpp
@@ -44,7 +44,7 @@ void OmegleProto::UpdateChat(const wchar_t *name, const wchar_t *message, bool a
gce.ptszNick = name;
gce.ptszUID = gce.ptszNick;
- CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0, &gce);
}
int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
@@ -223,7 +223,7 @@ void OmegleProto::SendChatMessage(std::string text)
{
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
-CallServiceSync(MS_GC_EVENT,WINDOW_CLEARLOG,reinterpret_cast<LPARAM>(&gce));
+Chat_Event(WINDOW_CLEARLOG,&gce);
}*/
void OmegleProto::AddChatContact(const wchar_t *name)
@@ -245,7 +245,7 @@ void OmegleProto::AddChatContact(const wchar_t *name)
else
gce.ptszStatus = L"Normal";
- CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0, &gce);
}
void OmegleProto::DeleteChatContact(const wchar_t *name)
@@ -261,7 +261,7 @@ void OmegleProto::DeleteChatContact(const wchar_t *name)
else
gce.bIsMe = mir_wstrcmp(name, this->facy.nick_);
- CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0, &gce);
}
INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress)
@@ -272,7 +272,7 @@ INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress)
gcw.ptszID = m_tszUserName;
gcw.ptszName = m_tszUserName;
gcw.pszModule = m_szModuleName;
- CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
+ Chat_NewSession(&gcw);
if (m_iStatus == ID_STATUS_OFFLINE)
return 0;
@@ -282,10 +282,10 @@ INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress)
GCEVENT gce = { sizeof(gce), &gcd };
gce.ptszStatus = L"Admin";
- CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(NULL, &gce);
gce.ptszStatus = L"Normal";
- CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(NULL, &gce);
SetTopic();
@@ -307,7 +307,7 @@ void OmegleProto::SetTopic(const wchar_t *topic)
else
gce.ptszText = topic;
- CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0, &gce);
}
INT_PTR OmegleProto::OnLeaveChat(WPARAM, LPARAM)
@@ -316,8 +316,8 @@ INT_PTR OmegleProto::OnLeaveChat(WPARAM, LPARAM)
GCEVENT gce = { sizeof(gce), &gcd };
gce.time = ::time(NULL);
- CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, reinterpret_cast<LPARAM>(&gce));
- CallServiceSync(MS_GC_EVENT, SESSION_TERMINATE, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(SESSION_OFFLINE, &gce);
+ Chat_Event(SESSION_TERMINATE, &gce);
return 0;
}
@@ -340,12 +340,12 @@ void OmegleProto::SetChatStatus(int status)
// Add self contact
AddChatContact(facy.nick_);
- CallServiceSync(MS_GC_EVENT, SESSION_INITDONE, reinterpret_cast<LPARAM>(&gce));
- CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(SESSION_INITDONE, &gce);
+ Chat_Event(SESSION_ONLINE, &gce);
}
else
{
- CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(SESSION_OFFLINE, &gce);
}
}
@@ -356,7 +356,7 @@ void OmegleProto::ClearChat()
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallServiceSync(MS_GC_EVENT, WINDOW_CLEARLOG, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(WINDOW_CLEARLOG, &gce);
}
// TODO: Could this be done better?
@@ -379,7 +379,7 @@ MCONTACT OmegleProto::GetChatHandle()
gci.Flags = GCF_HCONTACT;
gci.pszModule = m_szModuleName;
gci.pszID = m_tszUserName;
- CallService(MS_GC_GETINFO, 0, (LPARAM)&gci);
+ Chat_GetInfo(&gci);
return gci.hContact;
} \ No newline at end of file
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp
index 91d79f0d5f..838e1c559e 100644
--- a/protocols/Omegle/src/proto.cpp
+++ b/protocols/Omegle/src/proto.cpp
@@ -172,7 +172,7 @@ int OmegleProto::OnModulesLoaded(WPARAM, LPARAM)
gcr.iMaxText = OMEGLE_MESSAGE_LIMIT;
gcr.nColors = 0;
gcr.pColors = NULL;
- CallService(MS_GC_REGISTER, 0, reinterpret_cast<LPARAM>(&gcr));
+ Chat_Register(&gcr);
return 0;
}