summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_contacts.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-12-20 17:25:21 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-12-20 17:25:21 +0000
commit5e77e8a1665382c76fee1bc3ca12e44aca9af2e7 (patch)
tree9d2d8d2710a15c6e5e407b8a9ef5aa0cdce7b857 /protocols/Skype/src/skype_contacts.cpp
parent27b52fd25b336a52cfd74d6ef74ed382a110a791 (diff)
- third approach of group chat support
- added connection options - fixed connection via proxy git-svn-id: http://svn.miranda-ng.org/main/trunk@2772 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_contacts.cpp')
-rw-r--r--protocols/Skype/src/skype_contacts.cpp45
1 files changed, 42 insertions, 3 deletions
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index eae999ef92..116149cd55 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -531,16 +531,17 @@ bool CSkypeProto::IsProtoContact(HANDLE hContact)
HANDLE CSkypeProto::GetContactBySid(const char *sid)
{
- HANDLE hContact = db_find_first();
+ HANDLE hContact = ::db_find_first();
while (hContact)
{
if (this->IsProtoContact(hContact) && !this->IsChatRoom(hContact))
{
- if (::strcmp(sid, ::DBGetString(hContact, this->m_szModuleName, "sid")) == 0)
+ char *contactSid = ::DBGetString(hContact, this->m_szModuleName, "sid");
+ if (contactSid && ::strcmp(sid, contactSid) == 0)
return hContact;
}
- hContact = db_find_next(hContact);
+ hContact = ::db_find_next(hContact);
}
return 0;
@@ -721,6 +722,44 @@ void __cdecl CSkypeProto::LoadContactList(void*)
this->UpdateContactStatusMessage(hContact, contact);
}
+ CConversation::Refs conversations;
+ g_skype->GetConversationList(conversations);
+ for (uint i = 0; i < conversations.size(); i++)
+ {
+ CConversation::TYPE type;
+ conversations[i]->GetPropType(type);
+
+ CConversation::MY_STATUS status;
+ conversations[i]->GetPropMyStatus(status);
+ if (type == CConversation::CONFERENCE)
+ {
+ SEString data;
+
+ conversations[i]->GetPropIdentity(data);
+ char *cid = ::mir_strdup((const char *)data);
+
+ conversations[i]->GetPropDisplayname(data);
+ char *name = ::mir_utf8decodeA((const char *)data);
+
+ HANDLE hContact = this->AddChatRoomByID(cid, name);
+
+ CConversation::LOCAL_LIVESTATUS live;
+ conversations[i]->GetPropLocalLivestatus(live);
+
+ if (status == CConversation::CONSUMER)// && live != CConversation::NONE)
+ {
+ this->JoinToChat(cid, false);
+ }
+ }
+ }
+
+ /*CConversation::Refs conversations;
+ g_skype->GetConversationList(conversations);
+ for (uint i = 0; i < conversations.size(); i++)
+ {
+ conversations[i]->Delete();
+ }*/
+
// raise auth event for all non auth contacts
CContact::Refs authContacts;
g_skype->GetHardwiredContactGroup(CContactGroup::CONTACTS_WAITING_MY_AUTHORIZATION, this->authWaitList);