aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-contact-manager.c12
-rw-r--r--libempathy/empathy-contact-manager.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index bb5782aa4..c476d3523 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -27,6 +27,7 @@
#include "empathy-contact-manager.h"
#include "empathy-account-manager.h"
+#include "empathy-contact-monitor.h"
#include "empathy-contact-list.h"
#include "empathy-utils.h"
@@ -37,6 +38,7 @@
typedef struct {
GHashTable *lists;
EmpathyAccountManager *account_manager;
+ EmpathyContactMonitor *contact_monitor;
} EmpathyContactManagerPriv;
static void contact_manager_iface_init (EmpathyContactListIface *iface);
@@ -210,6 +212,7 @@ empathy_contact_manager_init (EmpathyContactManager *manager)
(GDestroyNotify) g_object_unref,
(GDestroyNotify) g_object_unref);
priv->account_manager = empathy_account_manager_new ();
+ priv->contact_monitor = empathy_contact_monitor_new_for_proxy (EMPATHY_CONTACT_LIST (manager));
g_signal_connect (priv->account_manager,
"account-connection-changed",
@@ -319,6 +322,14 @@ contact_manager_get_members (EmpathyContactList *manager)
return contacts;
}
+static EmpathyContactMonitor *
+contact_manager_get_monitor (EmpathyContactList *manager)
+{
+ EmpathyContactManagerPriv *priv = GET_PRIV (manager);
+
+ return priv->contact_monitor;
+}
+
static void
contact_manager_get_pendings_foreach (McAccount *account,
EmpathyTpContactList *list,
@@ -498,6 +509,7 @@ contact_manager_iface_init (EmpathyContactListIface *iface)
iface->add = contact_manager_add;
iface->remove = contact_manager_remove;
iface->get_members = contact_manager_get_members;
+ iface->get_monitor = contact_manager_get_monitor;
iface->get_pendings = contact_manager_get_pendings;
iface->get_all_groups = contact_manager_get_all_groups;
iface->get_groups = contact_manager_get_groups;
diff --git a/libempathy/empathy-contact-manager.h b/libempathy/empathy-contact-manager.h
index c2e0b67a2..9ba77966c 100644
--- a/libempathy/empathy-contact-manager.h
+++ b/libempathy/empathy-contact-manager.h
@@ -29,6 +29,7 @@
#include "empathy-contact.h"
#include "empathy-tp-contact-list.h"
#include "empathy-contact-list.h"
+#include "empathy-contact-monitor.h"
G_BEGIN_DECLS
@@ -57,6 +58,7 @@ EmpathyTpContactList * empathy_contact_manager_get_list (EmpathyContactManager *
McAccount *account);
gboolean empathy_contact_manager_can_add (EmpathyContactManager *manager,
McAccount *account);
+EmpathyContactMonitor *empathy_contact_manager_get_monitor (EmpathyContactManager *manager);
G_END_DECLS