diff options
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 |