diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2012-10-07 13:47:03 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2012-10-07 13:47:03 +0000 |
commit | 8aded02eb09d418873002ea6d3e41d4d700e7e07 (patch) | |
tree | a1c9e40687203ea16c271481b6e3e8459bf0eb09 /protocols/Skype/src/skype_subclassing.h | |
parent | 9eff79c4337785d0f2efee63bc3121b3955d161e (diff) |
- added first approach of contfct adding/deleting
git-svn-id: http://svn.miranda-ng.org/main/trunk@1801 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.h')
-rw-r--r-- | protocols/Skype/src/skype_subclassing.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/protocols/Skype/src/skype_subclassing.h b/protocols/Skype/src/skype_subclassing.h index a4ea9a1264..bef67606a8 100644 --- a/protocols/Skype/src/skype_subclassing.h +++ b/protocols/Skype/src/skype_subclassing.h @@ -5,25 +5,35 @@ #include <skype-embedded_2.h>
-class CContact;
struct CSkypeProto;
-typedef void (CSkypeProto::* OnContactChangeFunc)(CContact* contact, int);
+class CConversation : public Conversation
+{
+public:
+ typedef DRef<CConversation, Conversation> Ref;
+ typedef DRefs<CConversation, Conversation> Refs;
+
+ CConversation(unsigned int oid, SERootObject* root);// : Conversation(oid, root) {};
+
+protected:
+ void OnMessage(const MessageRef & message);
+};
class CContact : public Contact {
public:
+ typedef void (CSkypeProto::* OnContactChanged)(CContact::Ref contact, int);
+
typedef DRef<CContact, Contact> Ref;
typedef DRefs<CContact, Contact> Refs;
CContact(unsigned int oid, SERootObject* root); - void SetOnContactChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto); + void SetOnContactChangedCallback(OnContactChanged callback, CSkypeProto* proto); private: - CSkypeProto* proto;
-
- OnContactChangeFunc callback; + CSkypeProto* proto;
+ OnContactChanged callback; void OnChange(int prop); };
@@ -31,13 +41,21 @@ private: class CContactGroup : public ContactGroup
{
public:
+ typedef void (CSkypeProto::* OnContactListChanged)(const ContactRef& contact);
+
typedef DRef<CContactGroup, ContactGroup> Ref;
typedef DRefs<CContactGroup, ContactGroup> Refs;
CContactGroup(unsigned int oid, SERootObject* root);
CContact::Refs ContactList;
+ void SetOnContactListChangedCallback(OnContactListChanged callback, CSkypeProto* proto);
+
+ bool Contains(const ContactRef& contact);
private:
+ CSkypeProto* proto;
+ OnContactListChanged callback;
+
void OnChange(const ContactRef& contact);
}; @@ -63,5 +81,6 @@ class CSkype : public Skype public:
CAccount* newAccount(int oid);
CContactGroup* newContactGroup(int oid);
+ CConversation* newConversation(int oid);
CContact* newContact(int oid);
};
\ No newline at end of file |