summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skypekit/skypekit.cpp
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-04-24 06:50:50 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-04-24 06:50:50 +0000
commit3a83f75a76d4b8f27b5abf476e9d3e5a4cb7e673 (patch)
treef9d32fdb6b7d85e04a69f5c78776973494754e18 /protocols/Skype/src/skypekit/skypekit.cpp
parent603f91c42bd35dfc51388d8abdc1b70a54644812 (diff)
- compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@4520 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skypekit/skypekit.cpp')
-rw-r--r--protocols/Skype/src/skypekit/skypekit.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/protocols/Skype/src/skypekit/skypekit.cpp b/protocols/Skype/src/skypekit/skypekit.cpp
new file mode 100644
index 0000000000..fe22f548c8
--- /dev/null
+++ b/protocols/Skype/src/skypekit/skypekit.cpp
@@ -0,0 +1,63 @@
+#include "skype.h"
+
+CSkype::CSkype(int num_threads) : Skype(num_threads)
+{
+ this->proto = NULL;
+ this->onMessagedCallback = NULL;
+}
+
+CAccount* CSkype::newAccount(int oid)
+{
+ return new CAccount(oid, this);
+}
+
+CContactGroup* CSkype::newContactGroup(int oid)
+{
+ return new CContactGroup(oid, this);
+}
+
+CContact* CSkype::newContact(int oid)
+{
+ return new CContact(oid, this);
+}
+
+CConversation* CSkype::newConversation(int oid)
+{
+ return new CConversation(oid, this);
+}
+
+CParticipant* CSkype::newParticipant(int oid)
+{
+ return new CParticipant(oid, this);
+}
+
+CMessage* CSkype::newMessage(int oid)
+{
+ return new CMessage(oid, this);
+}
+
+CTransfer* CSkype::newTransfer(int oid)
+{
+ return new CTransfer(oid, this);
+}
+
+CContactSearch* CSkype::newContactSearch(int oid)
+{
+ return new CContactSearch(oid, this);
+}
+
+void CSkype::OnMessage (
+ const MessageRef & message,
+ const bool & changesInboxTimestamp,
+ const MessageRef & supersedesHistoryMessage,
+ const ConversationRef & conversation)
+{
+ if (this->proto)
+ (proto->*onMessagedCallback)(conversation, message);
+}
+
+void CSkype::SetOnMessageCallback(OnMessaged callback, CSkypeProto* proto)
+{
+ this->proto = proto;
+ this->onMessagedCallback = callback;
+} \ No newline at end of file