From 3b3dea953dc54158db9cb35378852175e55c669d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Apr 2025 16:12:38 +0300 Subject: Teams: new format of subscription request + massive code cleaning --- protocols/Teams/src/teams_proto.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'protocols/Teams/src/teams_proto.h') diff --git a/protocols/Teams/src/teams_proto.h b/protocols/Teams/src/teams_proto.h index 7cf8952023..fdbee4d39e 100644 --- a/protocols/Teams/src/teams_proto.h +++ b/protocols/Teams/src/teams_proto.h @@ -165,8 +165,8 @@ public: // other data int m_iPollingId, m_iMessageId = 1; - ptrA m_szToken, m_szEndpoint, m_szOwnSkypeId; - CMStringA m_szSkypename, m_szMyname, m_szSkypeToken; + ptrA m_szToken, m_szOwnSkypeId; + CMStringA m_szSkypename, m_szMyname, m_szSkypeToken, m_szEndpoint; MCONTACT m_hMyContact; __forceinline CMStringA getId(MCONTACT hContact) { @@ -298,14 +298,16 @@ private: bool ParseMessage(const JSONNode &node, DB::EventInfo &dbei); - // utils - template - __inline static void FreeList(const LIST &lst) - { - for (auto &it : lst) - mir_free(it); - } + // server requests + void GetProfileInfo(MCONTACT hContact); + + void SetServerStatus(int iStatus); + void CreateSubscription(); + void CreateContactSubscription(); + + + // utils __forceinline bool IsOnline() const { return (m_iStatus > ID_STATUS_OFFLINE); } @@ -320,8 +322,6 @@ private: static time_t IsoToUnixTime(const std::string &stamp); - void SetServerStatus(int iStatus); - void ShowNotification(const wchar_t *message, MCONTACT hContact = NULL); void ShowNotification(const wchar_t *caption, const wchar_t *message, MCONTACT hContact = NULL, int type = 0); static bool IsFileExists(std::wstring path); @@ -340,7 +340,6 @@ private: INT_PTR __cdecl SvcLoadHistory(WPARAM hContact, LPARAM); INT_PTR __cdecl SvcEmptyHistory(WPARAM hContact, LPARAM); INT_PTR __cdecl SvcCreateChat(WPARAM, LPARAM); - INT_PTR __cdecl SvcSetMood(WPARAM, LPARAM); INT_PTR __cdecl ParseSkypeUriService(WPARAM, LPARAM lParam); // trouter -- cgit v1.2.3