summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_subclassing.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-04-20 15:27:52 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-04-20 15:27:52 +0000
commit66e9197603643cc587909fb1bce7402383dbad69 (patch)
tree43ac141616878a37e9a8fbfe842cb5a51909ffe7 /protocols/Skype/src/skype_subclassing.cpp
parenta346491026d5df1ffe0d41e4881613a47ca6ca47 (diff)
- temporary commit. may contain non-working code
git-svn-id: http://svn.miranda-ng.org/main/trunk@4483 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.cpp')
-rw-r--r--protocols/Skype/src/skype_subclassing.cpp45
1 files changed, 43 insertions, 2 deletions
diff --git a/protocols/Skype/src/skype_subclassing.cpp b/protocols/Skype/src/skype_subclassing.cpp
index 4d10e982c9..a055f0782f 100644
--- a/protocols/Skype/src/skype_subclassing.cpp
+++ b/protocols/Skype/src/skype_subclassing.cpp
@@ -446,6 +446,46 @@ CContact::CContact(unsigned int oid, SERootObject* root) : Contact(oid, root)
this->callback == NULL;
}
+SEString CContact::GetSid()
+{
+ SEString result;
+ CContact::AVAILABILITY availability;
+ this->GetPropAvailability(availability);
+ if (availability == CContact::SKYPEOUT)
+ this->GetPropPstnnumber(result);
+ else
+ this->GetPropSkypename(result);
+ return result;
+}
+
+SEString CContact::GetNick()
+{
+ SEString result;
+ CContact::AVAILABILITY availability;
+ this->GetPropAvailability(availability);
+ if (availability == CContact::SKYPEOUT)
+ result = this->GetSid();
+ else
+ this->GetPropDisplayname(result);
+ return result;
+}
+
+bool CContact::GetFullname(SEString &firstName, SEString &lastName)
+{
+ SEString fullname;
+ this->GetPropFullname(fullname);
+ int pos = fullname.find(" ");
+ if (pos && pos < fullname.length())
+ {
+ firstName = fullname.substr(0, pos);
+ lastName = fullname.right(pos);
+ }
+
+ firstName = fullname;
+
+ return true;
+}
+
void CContact::SetOnContactChangedCallback(OnContactChanged callback, CSkypeProto* proto)
{
this->proto = proto;
@@ -491,10 +531,11 @@ void CConversation::OnChange(int prop)
}
}
-CConversation::Ref CConversation::FindBySid(CSkype *skype, SEString sid)
+CConversation::Ref CConversation::FindBySid(CSkype *skype, const wchar_t *sid)
{
+ SEString identity = ::mir_u2a(sid);
SEStringList participants;
- participants.append(sid);
+ participants.append(identity);
CConversation::Ref conversation;
skype->GetConversationByParticipants(participants, conversation);