aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-account-manager.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-05-31 03:15:31 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-05-31 04:15:42 +0800
commit327b8e56ecbaca67d550802f2fac741a78d81eb8 (patch)
tree62b8a9f51ecdcbfeae7dcdef81c4420d65a7aedc /libempathy/empathy-account-manager.c
parentf93b95e549591cc8302d894e44641f42751b7f67 (diff)
downloadgsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.tar
gsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.tar.gz
gsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.tar.bz2
gsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.tar.lz
gsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.tar.xz
gsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.tar.zst
gsoc2013-empathy-327b8e56ecbaca67d550802f2fac741a78d81eb8.zip
Remove usage of McPresence as much as possible
Diffstat (limited to 'libempathy/empathy-account-manager.c')
-rw-r--r--libempathy/empathy-account-manager.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index ed8ee996f..dd0a72f59 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -44,7 +44,7 @@ typedef struct {
typedef struct {
TpConnection *connection;
- McPresence presence;
+ TpConnectionPresenceType presence;
TpConnectionStatus status;
gboolean is_enabled;
@@ -424,10 +424,35 @@ account_status_changed_cb (MissionControl *mc,
EmpathyAccountManager *manager)
{
ChangedSignalData *data;
+ TpConnectionPresenceType tp_presence;
+
+ switch (presence)
+ {
+ case MC_PRESENCE_OFFLINE:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_OFFLINE;
+ break;
+ case MC_PRESENCE_AVAILABLE:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_AVAILABLE;
+ break;
+ case MC_PRESENCE_AWAY:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_AWAY;
+ break;
+ case MC_PRESENCE_EXTENDED_AWAY:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_EXTENDED_AWAY;
+ break;
+ case MC_PRESENCE_HIDDEN:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_HIDDEN;
+ break;
+ case MC_PRESENCE_DO_NOT_DISTURB:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_BUSY;
+ break;
+ default:
+ tp_presence = TP_CONNECTION_PRESENCE_TYPE_UNSET;
+ }
data = g_slice_new0 (ChangedSignalData);
data->status = status;
- data->presence = presence;
+ data->presence = tp_presence;
data->reason = reason;
data->unique_name = g_strdup (unique_name);
data->manager = g_object_ref (manager);