diff options
Diffstat (limited to 'protocols/Skype/src/skypekit')
-rw-r--r-- | protocols/Skype/src/skypekit/account.cpp | 3 | ||||
-rw-r--r-- | protocols/Skype/src/skypekit/account.h | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skypekit/skypekit.cpp | 78 | ||||
-rw-r--r-- | protocols/Skype/src/skypekit/skypekit.h | 43 |
4 files changed, 2 insertions, 126 deletions
diff --git a/protocols/Skype/src/skypekit/account.cpp b/protocols/Skype/src/skypekit/account.cpp index fa931d179e..08c37d67e2 100644 --- a/protocols/Skype/src/skypekit/account.cpp +++ b/protocols/Skype/src/skypekit/account.cpp @@ -1,5 +1,4 @@ #include "account.h"
-#include "skypekit.h"
CAccount::CAccount(unsigned int oid, SERootObject* root) : Account(oid, root)
{
@@ -9,7 +8,7 @@ CAccount::CAccount(unsigned int oid, SERootObject* root) : Account(oid, root) void CAccount::SetOnAccountChangedCallback(OnAccountChanged callback, CSkypeProto* proto)
{
- this->skype = (CSkype *)root;
+ this->skype = (Skype *)root;
this->proto = proto;
this->callback = callback;
diff --git a/protocols/Skype/src/skypekit/account.h b/protocols/Skype/src/skypekit/account.h index 07ff0b929c..36a78e745b 100644 --- a/protocols/Skype/src/skypekit/account.h +++ b/protocols/Skype/src/skypekit/account.h @@ -2,8 +2,6 @@ #include "common.h"
-class CSkype;
-
class CAccount : public Account
{
public:
@@ -20,7 +18,7 @@ public: void SetOnAccountChangedCallback(OnAccountChanged callback, CSkypeProto* proto);
private:
- CSkype *skype;
+ Skype *skype;
CSkypeProto* proto;
OnAccountChanged callback;
void OnChange(int prop);
diff --git a/protocols/Skype/src/skypekit/skypekit.cpp b/protocols/Skype/src/skypekit/skypekit.cpp deleted file mode 100644 index d06f505969..0000000000 --- a/protocols/Skype/src/skypekit/skypekit.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "skypekit.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);
-}
-
-bool CSkype::CreateConferenceWithConsumers(ConversationRef &conference, const SEStringList &identities)
-{
- if (this->CreateConference(conference))
- {
- conference->SetOption(CConversation::P_OPT_JOINING_ENABLED, true);
- conference->SetOption(CConversation::P_OPT_ENTRY_LEVEL_RANK, CParticipant::WRITER);
- conference->SetOption(CConversation::P_OPT_DISCLOSE_HISTORY, 1);
- conference->AddConsumers(identities);
-
- return true;
- }
-
- return false;
-}
-
-void CSkype::SetOnMessageCallback(OnMessaged callback, CSkypeProto* proto)
-{
- this->proto = proto;
- this->onMessagedCallback = callback;
-}
-
-void CSkype::OnMessage (
- const MessageRef & message,
- const bool & changesInboxTimestamp,
- const MessageRef & supersedesHistoryMessage,
- const ConversationRef & conversation)
-{
- if (this->proto && this->onMessagedCallback)
- (proto->*onMessagedCallback)(conversation, message);
-}
diff --git a/protocols/Skype/src/skypekit/skypekit.h b/protocols/Skype/src/skypekit/skypekit.h deleted file mode 100644 index 3f1d7b1e58..0000000000 --- a/protocols/Skype/src/skypekit/skypekit.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once
-
-#include "common.h"
-
-#include "group.h"
-#include "search.h"
-#include "account.h"
-#include "contact.h"
-#include "message.h"
-#include "transfer.h"
-#include "participant.h"
-#include "conversation.h"
-
-class CSkype : public Skype
-{
-public:
- typedef void (CSkypeProto::* OnMessaged)(CConversation::Ref conversation, CMessage::Ref message);
-
- CAccount* newAccount(int oid);
- CContactGroup* newContactGroup(int oid);
- CConversation* newConversation(int oid);
- CContactSearch* newContactSearch(int oid);
- CParticipant* newParticipant(int oid);
- CContact* newContact(int oid);
- CMessage* newMessage(int oid);
- CTransfer* newTransfer(int oid);
-
- CSkype(int num_threads = 1);
-
- void SetOnMessageCallback(OnMessaged callback, CSkypeProto* proto);
-
- bool CreateConferenceWithConsumers(ConversationRef &conference, const SEStringList &identities);
-
-private:
- CSkypeProto* proto;
- OnMessaged onMessagedCallback;
-
- void OnMessage(
- const MessageRef & message,
- const bool & changesInboxTimestamp,
- const MessageRef & supersedesHistoryMessage,
- const ConversationRef & conversation);
-};
\ No newline at end of file |