summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skypekit/account.cpp
diff options
context:
space:
mode:
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