aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-31 01:08:04 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-31 01:08:04 +0800
commit13ef586215d888a939e8f34c44f703b93aa916c7 (patch)
tree8f113ca2346c0838fd62dad8201971327263807c /libempathy
parent66d91eccce66c3b1657ab10c1881c29bf1fe22fe (diff)
downloadgsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.tar
gsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.tar.gz
gsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.tar.bz2
gsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.tar.lz
gsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.tar.xz
gsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.tar.zst
gsoc2013-empathy-13ef586215d888a939e8f34c44f703b93aa916c7.zip
Move empathy_notification_is_enabled () to src/
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2294 4ee84921-47dd-4033-b63a-18d7a039a3e4
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);