summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skypekit/account.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-04-23 19:47:32 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-04-23 19:47:32 +0000
commita2184eb00d2b02d48ec14e72615736281b9d5f81 (patch)
tree94ade86705cd11d5868d6b33675773642a05f199 /protocols/Skype/src/skypekit/account.cpp
parentbfeb3b2b1088278afb247d82085174aaf97e2cc6 (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/account.cpp')
-rw-r--r--protocols/Skype/src/skypekit/account.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/protocols/Skype/src/skypekit/account.cpp b/protocols/Skype/src/skypekit/account.cpp
new file mode 100644
index 0000000000..313b1cf50d
--- /dev/null
+++ b/protocols/Skype/src/skypekit/account.cpp
@@ -0,0 +1,34 @@
+#include "account.h"
+#include "skype.h"
+
+CAccount::CAccount(unsigned int oid, SERootObject* root) : Account(oid, root)
+{
+ this->proto = NULL;
+ this->callback == NULL;
+}
+
+void CAccount::SetOnAccountChangedCallback(OnAccountChanged callback, CSkypeProto* proto)
+{
+ this->skype = (CSkype *)root;
+
+ this->proto = proto;
+ this->callback = callback;
+}
+
+bool CAccount::SetAvatar(SEBinary avatar, Skype::VALIDATERESULT &result)
+{
+ int fbl;
+ if (!this->skype->ValidateAvatar(avatar, result, fbl) || result != Skype::VALIDATED_OK)
+ return false;
+
+ if (!this->SetBinProperty(Account::P_AVATAR_IMAGE, avatar))
+ return false;
+
+ return true;
+}
+
+void CAccount::OnChange(int prop)
+{
+ if (this->proto)
+ (proto->*callback)(prop);
+} \ No newline at end of file