From 6adf63a8d746ad357a3bbfedebd2281080241f19 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Thu, 30 Jul 2015 11:48:24 +0000 Subject: SkypeWeb: refactoring git-svn-id: http://svn.miranda-ng.org/main/trunk@14758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_proto.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_proto.h') diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 4d2031acc6..6c97908cbb 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -64,6 +64,7 @@ public: //popups void InitPopups(); + void UninitPopups(); // languages static void InitLanguages(); @@ -81,7 +82,7 @@ public: private: - static UINT_PTR m_timer, m_trouterTimer; + static UINT_PTR m_timer; //---Accounts static LIST CSkypeProto::Accounts; @@ -92,6 +93,7 @@ private: bool isTerminated, HistorySynced; + std::map cookies; static std::map languages; @@ -99,8 +101,9 @@ private: m_hPollingThread, m_hTrouterThread, m_TrouterConnection, - m_hTrouterEvent, - m_hCallHook; + m_hTrouterEvent; + + static HANDLE m_hCallEvent; TRInfo TRouter; @@ -142,6 +145,7 @@ private: void InitNetwork(); void UnInitNetwork(); + void ShutdownConnections(); void PushRequest(HttpRequest *request); void PushRequest(HttpRequest *request, SkypeResponseCallback response); @@ -267,6 +271,8 @@ private: int __cdecl OnGroupChatEventHook(WPARAM, LPARAM lParam); int __cdecl OnGroupChatMenuHook(WPARAM, LPARAM lParam); + INT_PTR __cdecl OnJoinChatRoom(WPARAM hContact, LPARAM); + INT_PTR __cdecl OnLeaveChatRoom(WPARAM hContact, LPARAM); void StartChatRoom(const TCHAR *tid, const TCHAR *tname); @@ -274,8 +280,8 @@ private: void OnGetChatInfo(const NETLIBHTTPREQUEST *response, void *p); - INT_PTR __cdecl OnJoinChatRoom(WPARAM hContact, LPARAM); - INT_PTR __cdecl OnLeaveChatRoom(WPARAM hContact, LPARAM); + + void OnChatEvent(const JSONNode &node); void OnSendChatMessage(const TCHAR *chat_id, const TCHAR * tszMessage); char *GetChatUsers(const TCHAR *chat_id); @@ -299,7 +305,7 @@ private: void ProcessThreadUpdateRes(const JSONNode &node); // utils - bool IsOnline(); + inline bool IsOnline(); bool IsMe(const char *skypeName); MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob); @@ -353,7 +359,7 @@ private: template static INT_PTR __cdecl GlobalService(WPARAM wParam, LPARAM lParam) { - CSkypeProto *proto = CSkypeProto::GetContactAccount((MCONTACT)wParam); + CSkypeProto *proto = GetContactAccount((MCONTACT)wParam); return proto ? (proto->*Service)(wParam, lParam) : 0; } }; -- cgit v1.2.3