aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:08:04 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:08:04 +0800
commitf1de7218621b82fe0622aa04f380445150af39fc (patch)
tree8f113ca2346c0838fd62dad8201971327263807c /libempathy
parentc23031cdb33273d6396657f93d5daa064b7d7cac (diff)
downloadgsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.gz
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.bz2
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.lz
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.xz
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.zst
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.zip
Move empathy_notification_is_enabled () to src/
svn path=/trunk/; revision=2294
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-utils.c20
-rw-r--r--libempathy/empathy-utils.h2
2 files changed, 21 insertions, 1 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e4ada9f80..bda638dff 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -41,6 +41,7 @@
#include "empathy-contact-manager.h"
#include "empathy-dispatcher.h"
#include "empathy-dispatch-operation.h"
+#include "empathy-idle.h"
#include "empathy-tp-call.h"
#include <extensions/extensions.h>
@@ -482,3 +483,22 @@ empathy_start_call_with_contact (EmpathyContact *contact)
empathy_dispatcher_call_with_contact (contact, empathy_call_request_cb,
contact);
}
+
+gboolean
+empathy_check_available_state (void)
+{
+ McPresence presence;
+ EmpathyIdle *idle;
+
+ idle = empathy_idle_dup_singleton ();
+ presence = empathy_idle_get_state (idle);
+ g_object_unref (idle);
+
+ if (presence != MC_PRESENCE_AVAILABLE &&
+ presence != MC_PRESENCE_UNSET) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index dc17353da..46fa193c0 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -87,7 +87,7 @@ McAccount * empathy_channel_get_account (TpChannel *channel);
gboolean empathy_proxy_equal (gconstpointer a,
gconstpointer b);
guint empathy_proxy_hash (gconstpointer key);
-
+gboolean empathy_check_available_state (void);
/* Temporary utility function, should be replaces by better voip infrastructure
* soon */
void empathy_start_call_with_contact (EmpathyContact *contact);