From a6175cc98ca2b8ca61faa927e934f49375cee685 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 2 Oct 2012 18:39:38 +0000 Subject: - added simple contacts loading - added contact status updating git-svn-id: http://svn.miranda-ng.org/main/trunk@1766 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_subclassing.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'protocols/Skype/src/skype_subclassing.cpp') diff --git a/protocols/Skype/src/skype_subclassing.cpp b/protocols/Skype/src/skype_subclassing.cpp index c206f65ef5..bb943a708e 100644 --- a/protocols/Skype/src/skype_subclassing.cpp +++ b/protocols/Skype/src/skype_subclassing.cpp @@ -43,12 +43,6 @@ void CAccount::OnChange(int prop) } -void CContact::SetOnContactChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto) -{ - this->proto = proto; - this->callback = callback; -} - void CAccount::BlockWhileLoggingIn() { while (this->isLoggedOut) @@ -72,17 +66,18 @@ void CContactGroup::OnChange(const ContactRef& contact) CContact::CContact(unsigned int oid, SERootObject* root) : Contact(oid, root) { + this->proto = NULL; + this->callback == NULL; } -//void CAccount::SetOnChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto) -//{ -// this->proto = proto; -// this->callback = callback; -//} +void CContact::SetOnContactChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto) +{ + this->proto = proto; + this->callback = callback; +} void CContact::OnChange(int prop) { - //SEString identity; - //this->GetIdentity(identity); - (proto->*callback)(this, prop); + if (this->callback && this->proto) + (proto->*callback)(this, prop); } \ No newline at end of file -- cgit v1.2.3