diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-23 19:47:32 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-23 19:47:32 +0000 |
commit | a2184eb00d2b02d48ec14e72615736281b9d5f81 (patch) | |
tree | 94ade86705cd11d5868d6b33675773642a05f199 /protocols/Skype/src/skypekit/search.cpp | |
parent | bfeb3b2b1088278afb247d82085174aaf97e2cc6 (diff) |
- changed project file structure
- skype runtime initialization moved to plugin load func
- fixed password encription
- disabled message sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@4518 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skypekit/search.cpp')
-rw-r--r-- | protocols/Skype/src/skypekit/search.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/protocols/Skype/src/skypekit/search.cpp b/protocols/Skype/src/skypekit/search.cpp new file mode 100644 index 0000000000..362e412c86 --- /dev/null +++ b/protocols/Skype/src/skypekit/search.cpp @@ -0,0 +1,53 @@ +#include "search.h"
+
+CContactSearch::CContactSearch(unsigned int oid, SERootObject* root) : ContactSearch(oid, root)
+{
+ this->proto = NULL;
+ this->SearchCompletedCallback == NULL;
+ this->ContactFindedCallback == NULL;
+}
+
+void CContactSearch::OnChange(int prop)
+{
+ if (prop == P_CONTACT_SEARCH_STATUS)
+ {
+ CContactSearch::STATUS status;
+ this->GetPropContactSearchStatus(status);
+ if (status == FINISHED || status == FAILED)
+ {
+ this->isSeachFinished = true;
+ if (this->proto)
+ (proto->*SearchCompletedCallback)(this->hSearch);
+ }
+ }
+}
+
+void CContactSearch::OnNewResult(const ContactRef &contact, const uint &rankValue)
+{
+ if (this->proto)
+ (proto->*ContactFindedCallback)(contact, this->hSearch);
+}
+
+void CContactSearch::BlockWhileSearch()
+{
+ this->isSeachFinished = false;
+ this->isSeachFailed = false;
+ while (!this->isSeachFinished && !this->isSeachFailed)
+ Sleep(1);
+}
+
+void CContactSearch::SetProtoInfo(CSkypeProto* proto, HANDLE hSearch)
+{
+ this->proto = proto;
+ this->hSearch = hSearch;
+}
+
+void CContactSearch::SetOnSearchCompleatedCallback(OnSearchCompleted callback)
+{
+ this->SearchCompletedCallback = callback;
+}
+
+void CContactSearch::SetOnContactFindedCallback(OnContactFinded callback)
+{
+ this->ContactFindedCallback = callback;
+}
\ No newline at end of file |