diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-06-04 16:00:00 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-06-04 16:00:00 +0100 |
commit | 6d0a4ba8dcef17a3abdf52e10316999c5fcf20d5 (patch) | |
tree | 6c73a7fecca6dd46bc8b92e8e36729ecdde0a66e /telepathy-glib/base-contact-list.h | |
parent | 232752fa44039cfe2fe69e5b93410df00a138936 (diff) | |
download | telepathy-glib-6d0a4ba8dcef17a3abdf52e10316999c5fcf20d5.tar.gz |
Move contact group alterations to TpMutableContactGroupListInterface
This clarifies the situation regarding partial implementations: you're
meant to implement all of them.
Diffstat (limited to 'telepathy-glib/base-contact-list.h')
-rw-r--r-- | telepathy-glib/base-contact-list.h | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/telepathy-glib/base-contact-list.h b/telepathy-glib/base-contact-list.h index d18e9c092..1f17f49f0 100644 --- a/telepathy-glib/base-contact-list.h +++ b/telepathy-glib/base-contact-list.h @@ -294,31 +294,51 @@ typedef void (*TpBaseContactListCreateGroupsFunc) ( const gchar * const *normalized_names, gsize n_names); -void tp_base_contact_list_class_implement_create_groups ( - TpBaseContactListClass *cls, - TpBaseContactListCreateGroupsFunc impl); +void tp_base_contact_list_create_groups (TpBaseContactList *self, + const gchar * const *normalized_names, + gsize n_names); -typedef void (*TpBaseContactListGroupContactsFunc) ( - TpBaseContactList *self, +typedef void (*TpBaseContactListGroupContactsFunc) (TpBaseContactList *self, const gchar *group, TpHandleSet *contacts); -void tp_base_contact_list_class_implement_add_to_group ( - TpBaseContactListClass *cls, - TpBaseContactListGroupContactsFunc impl); - -void tp_base_contact_list_class_implement_remove_from_group ( - TpBaseContactListClass *cls, - TpBaseContactListGroupContactsFunc impl); +void tp_base_contact_list_add_to_group (TpBaseContactList *self, + const gchar *group, + TpHandleSet *contacts); -typedef gboolean (*TpBaseContactListRemoveGroupFunc) ( - TpBaseContactList *self, +void tp_base_contact_list_remove_from_group (TpBaseContactList *self, const gchar *group, - GError **error); + TpHandleSet *contacts); + +typedef void (*TpBaseContactListRemoveGroupFunc) (TpBaseContactList *self, + const gchar *group); + +void tp_base_contact_list_remove_group (TpBaseContactList *self, + const gchar *group); -void tp_base_contact_list_class_implement_remove_group ( - TpBaseContactListClass *cls, - TpBaseContactListRemoveGroupFunc impl); +#define TP_TYPE_MUTABLE_CONTACT_GROUP_LIST \ + (tp_mutable_contact_group_list_get_type ()) +GType tp_mutable_contact_group_list_get_type (void) G_GNUC_CONST; + +#define TP_IS_MUTABLE_CONTACT_GROUP_LIST(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + TP_TYPE_MUTABLE_CONTACT_GROUP_LIST)) + +#define TP_MUTABLE_CONTACT_GROUP_LIST_GET_INTERFACE(obj) \ + (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \ + TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, TpMutableContactGroupListInterface)) + +typedef struct _TpMutableContactGroupListInterface + TpMutableContactGroupListInterface; + +struct _TpMutableContactGroupListInterface { + GTypeInterface parent; + /* mandatory to implement */ + TpBaseContactListCreateGroupsFunc create_groups; + TpBaseContactListGroupContactsFunc add_to_group; + TpBaseContactListGroupContactsFunc remove_from_group; + TpBaseContactListRemoveGroupFunc remove_group; +}; G_END_DECLS |