empathy r2055 - trunk/libempathy



Author: xclaesse
Date: Tue Jan  6 16:47:35 2009
New Revision: 2055
URL: http://svn.gnome.org/viewvc/empathy?rev=2055&view=rev

Log:
Implement _get_monitor () in EmpathyTpChat.

Modified:
   trunk/libempathy/empathy-tp-chat.c

Modified: trunk/libempathy/empathy-tp-chat.c
==============================================================================
--- trunk/libempathy/empathy-tp-chat.c	(original)
+++ trunk/libempathy/empathy-tp-chat.c	Tue Jan  6 16:47:35 2009
@@ -40,6 +40,7 @@
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyTpChat)
 typedef struct {
 	EmpathyContactFactory *factory;
+	EmpathyContactMonitor *contact_monitor;
 	EmpathyContact        *user;
 	EmpathyContact        *remote_contact;
 	EmpathyTpGroup        *group;
@@ -248,6 +249,18 @@
 	return members;
 }
 
+static EmpathyContactMonitor *
+tp_chat_get_monitor (EmpathyContactList *list)
+{
+	EmpathyTpChatPriv *priv;
+
+	g_return_val_if_fail (EMPATHY_IS_TP_CHAT (list), NULL);
+
+	priv = GET_PRIV (list);
+
+	return priv->contact_monitor;
+}
+
 static EmpathyMessage *
 tp_chat_build_message (EmpathyTpChat *chat,
 		       guint          type,
@@ -894,6 +907,7 @@
 		g_object_unref (priv->group);
 	}
 
+	g_object_unref (priv->contact_monitor);
 	g_object_unref (priv->factory);
 	g_object_unref (priv->user);
 	g_object_unref (priv->account);
@@ -1097,6 +1111,7 @@
 		EMPATHY_TYPE_TP_CHAT, EmpathyTpChatPriv);
 
 	chat->priv = priv;
+	priv->contact_monitor = empathy_contact_monitor_new_for_proxy (EMPATHY_CONTACT_LIST (chat));
 }
 
 static void
@@ -1105,6 +1120,7 @@
 	iface->add         = tp_chat_add;
 	iface->remove      = tp_chat_remove;
 	iface->get_members = tp_chat_get_members;
+	iface->get_monitor = tp_chat_get_monitor;
 }
 
 EmpathyTpChat *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]