summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-10-21 13:08:51 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-10-21 13:08:51 +0000
commita2149ab3eaefef81d2bfc92f73981128ca8af21e (patch)
tree4d2121b91b363fe9965cac0a7fd9d526307dd0b3 /protocols/Skype/src/skype_utils.cpp
parent0c9c36e0c60d45e3da803c83733fc1bf47a3f255 (diff)
- added message sending
git-svn-id: http://svn.miranda-ng.org/main/trunk@2016 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_utils.cpp')
-rw-r--r--protocols/Skype/src/skype_utils.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index db4e5f60ba..c712d10e2e 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -3,6 +3,13 @@
int CSkypeProto::countriesCount;
CountryListEntry* CSkypeProto::countryList;
+void CSkypeProto::FakeAsync(void *param)
+{
+ ::Sleep(100);
+ ::CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)param);
+ ::mir_free(param);
+}
+
int CSkypeProto::GetCountryIdByName(const char* countryName)
{
for (int i = 0; i < CSkypeProto::countriesCount; i++)
@@ -109,6 +116,22 @@ int CSkypeProto::SendBroadcast(HANDLE hContact, int type, int result, HANDLE hPr
return ::CallService(MS_PROTO_BROADCASTACK, 0, (LPARAM)&ack);
}
+DWORD CSkypeProto::SendBroadcastAsync(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam, size_t paramSize)
+{
+ ACKDATA *ack = (ACKDATA *)::mir_calloc(sizeof(ACKDATA) + paramSize);
+ ack->cbSize = sizeof(ACKDATA);
+ ack->szModule = this->m_szModuleName;
+ ack->hContact = hContact;
+ ack->type = type;
+ ack->result = hResult;
+ ack->hProcess = hProcess;
+ ack->lParam = lParam;
+ if (paramSize)
+ ::memcpy(ack+1, (void*)lParam, paramSize);
+ ::mir_forkthread(&CSkypeProto::FakeAsync, ack);
+ return 0;
+}
+
void CSkypeProto::ForkThread(SkypeThreadFunc pFunc, void *param)
{
UINT threadID;