diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2012-10-20 18:58:08 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2012-10-20 18:58:08 +0000 |
commit | 0414c927e4a23bd6232e0ef64c34dbc3482793b1 (patch) | |
tree | 472cadf74a4a6cf48b46fe68a448248f23f8abd6 /protocols/Skype/src/skype_subclassing.cpp | |
parent | 13ff5e8e9ff54af333a2d11d439122515addb0b5 (diff) |
- added basic search
git-svn-id: http://svn.miranda-ng.org/main/trunk@2002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.cpp')
-rw-r--r-- | protocols/Skype/src/skype_subclassing.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_subclassing.cpp b/protocols/Skype/src/skype_subclassing.cpp index ad3c265749..587a4ba6cf 100644 --- a/protocols/Skype/src/skype_subclassing.cpp +++ b/protocols/Skype/src/skype_subclassing.cpp @@ -94,6 +94,45 @@ void CContactGroup::OnChange(const ContactRef& contact) (proto->*callback)(contact); } +// CContactSearch + +CContactSearch::CContactSearch(unsigned int oid, SERootObject* root) : ContactSearch(oid, root) +{ + this->isSeachFailed = false; + this->isSeachFinished = false; +} + +void CContactSearch::OnChange(int prop) +{ + if (prop == P_CONTACT_SEARCH_STATUS) + { + CContactSearch::STATUS status; + this->GetPropContactSearchStatus(status); + if (status == FINISHED) + this->isSeachFinished = true; + if (status == FAILED) + this->isSeachFailed = true; + } + + //SEString value = GetProp(prop); + //List_String dbg = getPropDebug(prop, value); + //fprintf(stdout,"CONTACTSEARCH.%d:%s = %s\n", getOID(), (const char*)dbg[1], (const char*)dbg[2]); +} + +void CContactSearch::OnNewResult(const ContactRef& contact, const uint& rankValue) +{ + Sid::String identity; + contact->GetIdentity(identity); +} + +void CContactSearch::BlockWhileSearching() +{ + this->isSeachFailed = false; + this->isSeachFinished = false; + while ( !this->isSeachFailed && !this->isSeachFinished) + Sleep(1); +} + // CContact CContact::CContact(unsigned int oid, SERootObject* root) : Contact(oid, root) |