diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-03 14:47:25 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-05-03 14:47:25 +0000 |
commit | 93d2e2120e56bae6e62cf4297ea82c3dc0ab295a (patch) | |
tree | ae7987e7d3f6f930b699bd18534f63a3f615951e /protocols/SkypeWeb/src/skype_utils.cpp | |
parent | cfa1c925749b1659a5e5e230bc42460de5a25aeb (diff) |
SkypeWeb: Updating contact list & auth requests every 10 minutes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13396 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 123c4945a8..81ccde08d5 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -729,4 +729,32 @@ HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &messa pHtmlDocRoot->Release();
}
return hr;
+}
+
+void CSkypeProto::ProcessTimer()
+{
+ if (IsOnline())
+ {
+ PushRequest(new GetContactListRequest(TokenSecret), &CSkypeProto::LoadContactList);
+ }
+}
+
+static VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
+{
+ for (int i = 0; i < skypeInstances.getCount(); i++)
+ {
+ skypeInstances[i]->ProcessTimer();
+ }
+}
+
+void CSkypeProto::SkypeSetTimer(void*)
+{
+ CSkypeProto::m_timer = SetTimer(NULL, 0, 600000, TimerProc);
+}
+
+void CSkypeProto::SkypeUnsetTimer(void*)
+{
+ if (CSkypeProto::m_timer)
+ KillTimer(NULL, CSkypeProto::m_timer);
+ CSkypeProto::m_timer = 0;
}
\ No newline at end of file |