summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-10-20 22:27:29 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-10-20 22:27:29 +0000
commit8942a206bef8abef8f6b9c7141d35c50d15049aa (patch)
tree8749955fc888e5b910e38c9b3721c9f1f5faba50 /protocols/Skype/src/skype_proto.cpp
parent01f5b9941dd8c9925fde3dfbb07fb28f41c01b51 (diff)
- fixed contact search async loading
- added search by email git-svn-id: http://svn.miranda-ng.org/main/trunk@2008 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r--protocols/Skype/src/skype_proto.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index c40ce6c854..7c96753ce3 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -154,7 +154,7 @@ DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HANDLE hContact)
switch(type)
{
case PFLAGNUM_1:
- return PF1_IM | PF1_BASICSEARCH | PF1_ADDSEARCHRES/* | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME*/;
+ return PF1_IM | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_SEARCHBYEMAIL/* | PF1_SEARCHBYNAME*/;
case PFLAGNUM_2:
case PFLAGNUM_3:
return PF2_ONLINE | PF2_SHORTAWAY | PF2_HEAVYDND | PF2_INVISIBLE;
@@ -187,19 +187,34 @@ HANDLE __cdecl CSkypeProto::SearchBasic(const TCHAR* id)
if ( !this->IsOnline())
return 0;
- wchar_t *sid = ::mir_tstrdup(id);
- this->ForkThread(&CSkypeProto::SearchContactBySidAsync, sid);
+ wchar_t *data = ::mir_tstrdup(id);
+ this->ForkThread(&CSkypeProto::SearchBySidAsync, data);
- return sid;
+ return (HANDLE)SKYPE_SEARCH_BYSID;
}
-HANDLE __cdecl CSkypeProto::SearchByEmail( const TCHAR* email )
+HANDLE __cdecl CSkypeProto::SearchByEmail(const TCHAR* email)
{
- return 0;
+ if ( !this->IsOnline())
+ return 0;
+
+ wchar_t *data = ::mir_tstrdup(email);
+ this->ForkThread(&CSkypeProto::SearchByEmailAsync, data);
+
+ return (HANDLE)SKYPE_SEARCH_BYEMAIL;
}
-HANDLE __cdecl CSkypeProto::SearchByName( const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName )
+HANDLE __cdecl CSkypeProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName)
{
- return 0;
+ PROTOSEARCHRESULT isr = {0};
+ isr.cbSize = sizeof(isr);
+ isr.flags = PSR_TCHAR;
+ isr.nick = ::mir_wstrdup(nick);
+ isr.firstName = ::mir_wstrdup(firstName);
+ isr.lastName = ::mir_wstrdup(lastName);
+
+ this->ForkThread(&CSkypeProto::SearchByNamesAsync, &isr);
+
+ return (HANDLE)SKYPE_SEARCH_BYNAMES;
}
HWND __cdecl CSkypeProto::SearchAdvanced( HWND owner ) { return 0; }