diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2012-10-21 10:24:15 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2012-10-21 10:24:15 +0000 |
commit | 84fc6ba7d2399bfe5db16c044bace2642f9df8a6 (patch) | |
tree | 5db5b725fb3fbafe16b92f1895727bc77ddeea3c /protocols/Skype/src/skype_subclassing.h | |
parent | 68d9f580b716d6ba9103663f3fc1637f41e162fc (diff) |
- added message receiving
git-svn-id: http://svn.miranda-ng.org/main/trunk@2011 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.h')
-rw-r--r-- | protocols/Skype/src/skype_subclassing.h | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/protocols/Skype/src/skype_subclassing.h b/protocols/Skype/src/skype_subclassing.h index a4da27ccbd..4835023894 100644 --- a/protocols/Skype/src/skype_subclassing.h +++ b/protocols/Skype/src/skype_subclassing.h @@ -10,13 +10,19 @@ struct CSkypeProto; class CConversation : public Conversation
{
public:
- typedef DRef<CConversation, Conversation> Ref;
- typedef DRefs<CConversation, Conversation> Refs;
-
- CConversation(unsigned int oid, SERootObject* root);// : Conversation(oid, root) {};
+ typedef void (CSkypeProto::* OnMessageReceived)(const char *sid, const char *text);
-protected:
- void OnMessage(const MessageRef & message);
+ typedef DRef<CConversation, Conversation> Ref;
+ typedef DRefs<CConversation, Conversation> Refs;
+
+ CConversation(unsigned int oid, SERootObject* root);
+
+ void SetOnMessageReceivedCallback(OnMessageReceived callback, CSkypeProto* proto);
+
+private: + CSkypeProto* proto;
+ OnMessageReceived callback;
+ void OnMessage(const MessageRef & message);
};
class CContact : public Contact @@ -111,9 +117,26 @@ private: class CSkype : public Skype
{
public:
+ typedef void (CSkypeProto::* OnConversationAdded)(CConversation::Ref conversation);
+
CAccount* newAccount(int oid);
CContactGroup* newContactGroup(int oid);
CConversation* newConversation(int oid);
CContactSearch* newContactSearch(int oid);
CContact* newContact(int oid);
+
+ CConversation::Refs inbox;
+
+ CSkype(int num_threads = 1);
+
+ void SetOnConversationAddedCallback(OnConversationAdded callback, CSkypeProto* proto);
+
+private:
+ CSkypeProto* proto;
+ OnConversationAdded callback;
+
+ void OnConversationListChange(
+ const ConversationRef &conversation,
+ const Conversation::LIST_TYPE &type,
+ const bool &added);
};
\ No newline at end of file |