1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
=== modified file 'configure.ac'
--- configure.ac 2009-12-08 13:36:06 +0000
+++ configure.ac 2009-12-08 13:40:34 +0000
@@ -37,10 +37,10 @@
AC_SUBST(APPLET_LIBS)
DBUSMENUGLIB_REQUIRED_VERSION=0.1.1
-LIBEMPATHY_REQUIRED_VERSION=2.27.0
+TELEPATHYGLIB_REQUIRED_VERSION=0.9.0
PKG_CHECK_MODULES(STATUSSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION
- libempathy >= $LIBEMPATHY_REQUIRED_VERSION)
+ telepathy-glib >= $TELEPATHYGLIB_REQUIRED_VERSION)
AC_SUBST(STATUSERVICE_CFLAGS)
AC_SUBST(STATUSERVICE_LIBS)
=== modified file 'src/status-provider-mc5.c'
--- src/status-provider-mc5.c 2009-12-08 13:38:42 +0000
+++ src/status-provider-mc5.c 2009-12-08 14:06:05 +0000
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include "libempathy/empathy-account-manager.h"
+#include "telepathy-glib/account-manager.h"
#include "status-provider.h"
#include "status-provider-mc5.h"
@@ -65,7 +65,7 @@
typedef struct _StatusProviderMC5Private StatusProviderMC5Private;
struct _StatusProviderMC5Private {
- EmpathyAccountManager * manager;
+ TpAccountManager * manager;
StatusProviderStatus status;
DBusGProxy * dbus_proxy;
};
@@ -83,7 +83,7 @@
/* Internal Funcs */
static void set_status (StatusProvider * sp, StatusProviderStatus status);
static StatusProviderStatus get_status (StatusProvider * sp);
-static void presence_changed (EmpathyAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp);
+static void presence_changed (TpAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp);
static void dbus_namechange (DBusGProxy * proxy, const gchar * name, const gchar * prev, const gchar * new, StatusProviderMC5 * self);
static void mc5_exists_cb (DBusGProxy * proxy, gboolean exists, GError * error, gpointer userdata);
@@ -120,14 +120,14 @@
return;
}
- priv->manager = EMPATHY_ACCOUNT_MANAGER(g_object_new(EMPATHY_TYPE_ACCOUNT_MANAGER, NULL));
+ priv->manager = TP_ACCOUNT_MANAGER(g_object_new(TP_TYPE_ACCOUNT_MANAGER, NULL));
g_signal_connect(G_OBJECT(priv->manager), "global-presence-changed", G_CALLBACK(presence_changed), self);
return;
}
/* Creating an instance of the status provider. We set the variables
- and create an EmpathyAccountManager object. It does all the hard
+ and create an TpAccountManager object. It does all the hard
work in this module of tracking MissionControl and enumerating the
accounts and all that jazz. */
static void
@@ -267,7 +267,7 @@
build_eam(STATUS_PROVIDER_MC5(sp));
- empathy_account_manager_request_global_presence(priv->manager, sp_to_tp_map[status], sp_to_mc_map[status], "");
+ tp_account_manager_set_all_requested_presences(priv->manager, sp_to_tp_map[status], sp_to_mc_map[status], "");
return;
}
@@ -287,11 +287,11 @@
return priv->status;
}
-/* A signal handler for when the EmpatyAccountManager believes
+/* A signal handler for when the TpAccountManager believes
that the global status has changed. It roughly calculates this
by finding the most available of all accounts that are active. */
static void
-presence_changed (EmpathyAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp)
+presence_changed (TpAccountManager * eam, guint type, const gchar * type_str, const gchar * message, StatusProviderMC5 * sp)
{
StatusProviderMC5Private * priv = STATUS_PROVIDER_MC5_GET_PRIVATE(sp);
|