summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_utils.cpp
diff options
context:
space:
mode:
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;