From 5c2da0fd5b2542d99750747fc746013b7755ddae Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 14 Jun 2013 19:41:18 +0000 Subject: callbacks removed git-svn-id: http://svn.miranda-ng.org/main/trunk@4947 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skypekit/contact.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'protocols/Skype/src/skypekit/contact.cpp') diff --git a/protocols/Skype/src/skypekit/contact.cpp b/protocols/Skype/src/skypekit/contact.cpp index 6031837afe..30be4b478c 100644 --- a/protocols/Skype/src/skypekit/contact.cpp +++ b/protocols/Skype/src/skypekit/contact.cpp @@ -1,9 +1,10 @@ +#include "..\skype.h" #include "contact.h" -CContact::CContact(unsigned int oid, SERootObject* root) : Contact(oid, root) +CContact::CContact(CSkypeProto* _ppro, unsigned int oid, SERootObject* root) : + Contact(oid, root), + proto(_ppro) { - this->proto = NULL; - this->callback == NULL; } SEString CContact::GetSid() @@ -38,21 +39,14 @@ bool CContact::GetFullname(SEString &firstName, SEString &lastName) if (pos != -1) { firstName = fullname.substr(0, pos - 1); - lastName = fullname.right(fullname.size() - pos - 1); + lastName = fullname.right((int)fullname.size() - pos - 1); } else firstName = fullname; return true; } -void CContact::SetOnContactChangedCallback(OnContactChanged callback, CSkypeProto* proto) -{ - this->proto = proto; - this->callback = callback; -} - void CContact::OnChange(int prop) { - if (this->proto) - (proto->*callback)(this->ref(), prop); + proto->OnContactChanged(this->ref(), prop); } \ No newline at end of file -- cgit v1.2.3