From 74a853fd31f1fd7356fb3fd041b5e6722ab80eed Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Tue, 7 Oct 2014 04:59:17 +0000 Subject: VKontakte: move search proto function to vk_search.cpp move TFakeAckParams to vk_proto.h git-svn-id: http://svn.miranda-ng.org/main/trunk@10723 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_proto.cpp | 43 ----------------------------------- protocols/VKontakte/src/vk_proto.h | 10 ++++++++ protocols/VKontakte/src/vk_search.cpp | 27 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 43 deletions(-) (limited to 'protocols') diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 830e1f6cb1..dfe178f683 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -317,16 +317,6 @@ int CVkProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) ////////////////////////////////////////////////////////////////////////////// -struct TFakeAckParams -{ - __inline TFakeAckParams(MCONTACT _hContact, int _msgid) : - hContact(_hContact), msgid(_msgid) - {} - - MCONTACT hContact; - int msgid; -}; - void CVkProto::SendMsgAck(void *param) { TFakeAckParams *ack = (TFakeAckParams*)param; @@ -446,29 +436,6 @@ int CVkProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) } ////////////////////////////////////////////////////////////////////////////// -HANDLE CVkProto::SearchBasic(const PROTOCHAR* id) -{ - ForkThread(&CVkProto::SearchBasicThread, (void *) id); - return (HANDLE)1; -} - -HANDLE CVkProto::SearchByEmail(const PROTOCHAR* email) -{ - ForkThread(&CVkProto::SearchByMailThread, (void *)email); - return (HANDLE)1; -} - -HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) -{ - PROTOSEARCHBYNAME * psr = new (PROTOSEARCHBYNAME); - - psr->pszFirstName = mir_wstrdup(firstName); - psr->pszLastName = mir_wstrdup(lastName); - psr->pszNick = mir_wstrdup(nick); - - ForkThread(&CVkProto::SearchThread, (void *)psr); - return (HANDLE)1; -} MCONTACT CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr) { @@ -596,16 +563,6 @@ int CVkProto::GetInfo(MCONTACT hContact, int infoType) return 0; } -HWND CVkProto::SearchAdvanced(HWND owner) -{ - return NULL; -} - -HWND CVkProto::CreateExtendedSearchUI(HWND owner) -{ - return NULL; -} - int CVkProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *) { return 1; diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 84796e4188..b79b7d18ab 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -149,6 +149,16 @@ struct CVkFileUploadParam { __forceinline char* fileName() { return fname; } }; +struct TFakeAckParams +{ + __inline TFakeAckParams(MCONTACT _hContact, int _msgid) : + hContact(_hContact), msgid(_msgid) + {} + + MCONTACT hContact; + int msgid; +}; + struct CVkProto : public PROTO { CVkProto(const char*, const TCHAR*); diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp index be75b5e3ff..7c3c86ad6d 100644 --- a/protocols/VKontakte/src/vk_search.cpp +++ b/protocols/VKontakte/src/vk_search.cpp @@ -17,6 +17,33 @@ along with this program. If not, see . #include "stdafx.h" +HWND CVkProto::SearchAdvanced(HWND owner) { return NULL; } +HWND CVkProto::CreateExtendedSearchUI(HWND owner) { return NULL; } + +HANDLE CVkProto::SearchBasic(const PROTOCHAR* id) +{ + ForkThread(&CVkProto::SearchBasicThread, (void *)id); + return (HANDLE)1; +} + +HANDLE CVkProto::SearchByEmail(const PROTOCHAR* email) +{ + ForkThread(&CVkProto::SearchByMailThread, (void *)email); + return (HANDLE)1; +} + +HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) +{ + PROTOSEARCHBYNAME * psr = new (PROTOSEARCHBYNAME); + + psr->pszFirstName = mir_wstrdup(firstName); + psr->pszLastName = mir_wstrdup(lastName); + psr->pszNick = mir_wstrdup(nick); + + ForkThread(&CVkProto::SearchThread, (void *)psr); + return (HANDLE)1; +} + void CVkProto::SearchBasicThread(void* id) { -- cgit v1.2.3