summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_subclassing.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2012-12-16 19:08:08 +0000
committerAlexander Lantsev <aunsane@gmail.com>2012-12-16 19:08:08 +0000
commit375155f8dcd69863f1b9a220c5f890596844e99d (patch)
tree7e2a2662539ac8f6175e71096ffe6607ed5bf2af /protocols/Skype/src/skype_subclassing.cpp
parent94bb72aca84414a28e556e5fe406eb3bd8cf8567 (diff)
- reworked message receiving/sending (by another instance)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2756 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.cpp')
-rw-r--r--protocols/Skype/src/skype_subclassing.cpp40
1 files changed, 6 insertions, 34 deletions
diff --git a/protocols/Skype/src/skype_subclassing.cpp b/protocols/Skype/src/skype_subclassing.cpp
index 4ae99d087a..adbd6a5120 100644
--- a/protocols/Skype/src/skype_subclassing.cpp
+++ b/protocols/Skype/src/skype_subclassing.cpp
@@ -5,8 +5,7 @@
CSkype::CSkype(int num_threads) : Skype(num_threads)
{
this->proto = NULL;
- this->onMessageReceivedCallback = NULL;
- this->onConversationAddedCallback = NULL;
+ this->onMessagedCallback = NULL;
}
CAccount* CSkype::newAccount(int oid)
@@ -49,43 +48,16 @@ void CSkype::OnMessage (
skype->GetUnixTimestamp(now);
conversation->SetConsumedHorizon(now);*/
- Message::TYPE messageType;
- message->GetPropType(messageType);
-
- Message::SENDING_STATUS sendingStatus;
- message->GetPropSendingStatus(sendingStatus);
-
- if (messageType == Message::POSTED_TEXT && !sendingStatus)
- {
- if (this->proto)
- (proto->*onMessageReceivedCallback)(message->ref());
- }
-}
-
-void CSkype::SetOnMessageReceivedCallback(OnMessageReceived callback, CSkypeProto* proto)
-{
- this->proto = proto;
- this->onMessageReceivedCallback = callback;
-}
+ if (this->proto)
+ (proto->*onMessagedCallback)(conversation->ref(), message->ref());
-void CSkype::OnConversationListChange(
- const ConversationRef &conversation,
- const Conversation::LIST_TYPE &type,
- const bool &added)
-{
- if ((type == Conversation::INBOX_CONVERSATIONS) && (added) && (!inbox.contains(conversation)))
- {
- conversation.fetch();
- inbox.append(conversation);
- if (this->proto)
- (proto->*onConversationAddedCallback)(conversation->ref());
- }
+
}
-void CSkype::SetOnConversationAddedCallback(OnConversationAdded callback, CSkypeProto* proto)
+void CSkype::SetOnMessageCallback(OnMessaged callback, CSkypeProto* proto)
{
this->proto = proto;
- this->onConversationAddedCallback = callback;
+ this->onMessagedCallback = callback;
}
// CAccount