diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-27 23:24:13 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-27 23:24:13 +0300 |
commit | f301df43fe8a0089ce581019804d4b3b25ca7ea9 (patch) | |
tree | 421c2349d965f2416ef3b287655479f3f7fcfb4f /protocols/Icq10/src | |
parent | a7f5e802e6f55ced84a11c9ec371b49f0d3e5663 (diff) |
Icq: support for user removing
Diffstat (limited to 'protocols/Icq10/src')
-rw-r--r-- | protocols/Icq10/src/proto.cpp | 55 | ||||
-rw-r--r-- | protocols/Icq10/src/proto.h | 8 |
2 files changed, 12 insertions, 51 deletions
diff --git a/protocols/Icq10/src/proto.cpp b/protocols/Icq10/src/proto.cpp index 5f47b960e4..afff41cd90 100644 --- a/protocols/Icq10/src/proto.cpp +++ b/protocols/Icq10/src/proto.cpp @@ -80,6 +80,15 @@ void CIcqProto::OnShutdown() { } +void CIcqProto::OnContactDeleted(MCONTACT hContact) +{ + auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/removeBuddy"); + pReq << CHAR_PARAM("f", "json") << CHAR_PARAM("aimsid", m_aimsid) << INT_PARAM("buddy", getDword(hContact, "UIN")) + << CHAR_PARAM("r", pReq->m_reqId) << INT_PARAM("allGroups", 1); + pReq->flags |= NLHRF_NODUMPSEND; + Push(pReq); +} + //////////////////////////////////////////////////////////////////////////////////////// // PS_AddToList - adds a contact to the contact list @@ -225,7 +234,8 @@ INT_PTR CIcqProto::GetCaps(int type, MCONTACT hContact) int CIcqProto::GetInfo(MCONTACT hContact, int infoType) { - return 1; // Failure + RetrieveUserInfo(hContact); + return 0; } //////////////////////////////////////////////////////////////////////////////////////// @@ -245,49 +255,6 @@ HANDLE CIcqProto::SearchBasic(const wchar_t *pszSearch) } //////////////////////////////////////////////////////////////////////////////////////// -// SearchByEmail - searches the contact by its e-mail - -HANDLE CIcqProto::SearchByEmail(const wchar_t *email) -{ - return nullptr; // Failure -} - -//////////////////////////////////////////////////////////////////////////////////////// -// PS_SearchByName - searches the contact by its first or last name, or by a nickname - -HANDLE CIcqProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) -{ - return nullptr; // Failure -} - -HWND CIcqProto::CreateExtendedSearchUI(HWND parent) -{ - return nullptr; // Failure -} - -HWND CIcqProto::SearchAdvanced(HWND hwndDlg) -{ - return nullptr; // Failure -} - -//////////////////////////////////////////////////////////////////////////////////////// -// RecvContacts - -int CIcqProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre) -{ - return 0; -} - -//////////////////////////////////////////////////////////////////////////////////////// -// SendContacts - -int CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hContactsList) -{ - // Exit with Failure - return 0; -} - -//////////////////////////////////////////////////////////////////////////////////////// // SendFile - sends a file HANDLE CIcqProto::SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles) diff --git a/protocols/Icq10/src/proto.h b/protocols/Icq10/src/proto.h index f6346ac1b5..c2c217969e 100644 --- a/protocols/Icq10/src/proto.h +++ b/protocols/Icq10/src/proto.h @@ -170,14 +170,7 @@ class CIcqProto : public PROTO<CIcqProto> int GetInfo(MCONTACT hContact, int infoType) override; HANDLE SearchBasic(const wchar_t *id) override; - HANDLE SearchByEmail(const wchar_t *email) override; - HANDLE SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) override; - HWND SearchAdvanced(HWND owner) override; - HWND CreateExtendedSearchUI(HWND owner) override; - int RecvContacts(MCONTACT hContact, PROTORECVEVENT*) override; - - int SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) override; HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override; int SendMsg(MCONTACT hContact, int flags, const char *msg) override; int SendUrl(MCONTACT hContact, int flags, const char *url) override; @@ -191,6 +184,7 @@ class CIcqProto : public PROTO<CIcqProto> int UserIsTyping(MCONTACT hContact, int type) override; + void OnContactDeleted(MCONTACT) override; void OnModulesLoaded() override; void OnShutdown() override; |