diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-10 19:15:07 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-10 19:31:49 +0800 |
commit | c3a3fdbca5129984d875b217d8204531ccf900ab (patch) | |
tree | 4c3c338aa975430b8203216e0f5f918069e15f55 /libempathy | |
parent | 869f0b954dc31895406b3766cd432d0029afbb5b (diff) | |
download | gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.tar gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.tar.gz gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.tar.bz2 gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.tar.lz gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.tar.xz gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.tar.zst gsoc2013-empathy-c3a3fdbca5129984d875b217d8204531ccf900ab.zip |
implement empathy_tp_chat_get_members as a method on TpChat
That means EmpathyTpChat doesn't have to implement the EmpathyContactList
interface any more.
https://bugzilla.gnome.org/show_bug.cgi?id=673821
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-chat.c | 20 | ||||
-rw-r--r-- | libempathy/empathy-tp-chat.h | 2 |
2 files changed, 5 insertions, 17 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index b13d097dd..4daac8c53 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -28,7 +28,6 @@ #include "empathy-tp-chat.h" #include "empathy-tp-contact-factory.h" -#include "empathy-contact-list.h" #include "empathy-request-util.h" #include "empathy-time.h" #include "empathy-utils.h" @@ -65,8 +64,6 @@ struct _EmpathyTpChatPrivate GSimpleAsyncResult *ready_result; }; -static void tp_chat_iface_init (EmpathyContactListIface *iface); - enum { PROP_0, @@ -89,9 +86,7 @@ enum static guint signals[LAST_SIGNAL]; -G_DEFINE_TYPE_WITH_CODE (EmpathyTpChat, empathy_tp_chat, TP_TYPE_TEXT_CHANNEL, - G_IMPLEMENT_INTERFACE (EMPATHY_TYPE_CONTACT_LIST, - tp_chat_iface_init)); +G_DEFINE_TYPE (EmpathyTpChat, empathy_tp_chat, TP_TYPE_TEXT_CHANNEL) static void tp_chat_set_delivery_status (EmpathyTpChat *self, @@ -216,14 +211,11 @@ empathy_tp_chat_add (EmpathyTpChat *self, } } -static GList * -tp_chat_get_members (EmpathyContactList *list) +GList * +empathy_tp_chat_get_members (EmpathyTpChat *self) { - EmpathyTpChat *self = (EmpathyTpChat *) list; GList *members = NULL; - g_return_val_if_fail (EMPATHY_IS_TP_CHAT (list), NULL); - if (self->priv->members) { members = g_list_copy (self->priv->members); @@ -1304,12 +1296,6 @@ empathy_tp_chat_init (EmpathyTpChat *self) g_str_hash, g_str_equal, g_free, NULL); } -static void -tp_chat_iface_init (EmpathyContactListIface *iface) -{ - iface->get_members = tp_chat_get_members; -} - EmpathyTpChat * empathy_tp_chat_new (TpSimpleClientFactory *factory, TpAccount *account, diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h index adb2ee1c5..5aa949ba2 100644 --- a/libempathy/empathy-tp-chat.h +++ b/libempathy/empathy-tp-chat.h @@ -107,6 +107,8 @@ void empathy_tp_chat_add (EmpathyTpChat *self, EmpathyContact *contact, const gchar *message); +GList * empathy_tp_chat_get_members (EmpathyTpChat *self); + G_END_DECLS #endif /* __EMPATHY_TP_CHAT_H__ */ |