summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_subclassing.cpp
diff options
context:
space:
mode:
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