From 4adc7e198f49bbd5b39141f13322b653402c8a79 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 10 Jun 2013 19:42:11 +0000 Subject: Skype: - fixed chat role updating - fixed chat commands git-svn-id: http://svn.miranda-ng.org/main/trunk@4911 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_events.cpp | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'protocols/Skype/src/skype_events.cpp') diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index e889326d8d..8d48c579c7 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -250,4 +250,46 @@ void CSkypeProto::OnMessage ( //case CMessage::BLOCKED: // break; } +} + +void CSkypeProto::OnConversationChanged(const ConversationRef &conversation, int prop) +{ + if (prop == Conversation::P_LOCAL_LIVESTATUS) + { + Conversation::LOCAL_LIVESTATUS liveStatus; + conversation->GetPropLocalLivestatus(liveStatus); + if (liveStatus == Conversation::RINGING_FOR_ME) + { + SEString data; + + CConversation::TYPE type; + conversation->GetPropType(type); + if (type == 0 || type == CConversation::DIALOG) + { + ParticipantRefs participants; + conversation->GetParticipants(participants, Conversation::OTHER_CONSUMERS); + + participants[0]->GetPropIdentity(data); + + ContactRef author; + this->GetContact(data, author); + + HANDLE hContact = this->AddContact(author); + + char *message = ::mir_utf8encode(::Translate("Incoming call received")); + + this->AddDBEvent( + hContact, + SKYPE_DB_EVENT_TYPE_CALL, + time(NULL), + DBEF_UTF, + (DWORD)::strlen(message) + 1, + (PBYTE)message); + } + //temp popup + TCHAR popuptext[MAX_PATH]; + mir_sntprintf(popuptext, SIZEOF(popuptext), TranslateT("Incoming call from %s. Use offical skype for calling."), ptrW(::mir_utf8decodeW(data))); + this->ShowNotification(popuptext); + } + } } \ No newline at end of file -- cgit v1.2.3