aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-05-10 18:48:35 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 17:11:08 +0800
commit3a54e248335203c6979ef733adc7b07a25660613 (patch)
tree63198c2979883d3c5d9d0f6604b2969d0d1643ad
parent20fe4d7b990d32e70fcdb9fd46cde2ed00c6d71d (diff)
downloadgsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.tar
gsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.tar.gz
gsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.tar.bz2
gsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.tar.lz
gsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.tar.xz
gsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.tar.zst
gsoc2013-empathy-3a54e248335203c6979ef733adc7b07a25660613.zip
Add empathy_camera_monitor_get_available
-rw-r--r--libempathy/empathy-camera-monitor.c7
-rw-r--r--libempathy/empathy-camera-monitor.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/libempathy/empathy-camera-monitor.c b/libempathy/empathy-camera-monitor.c
index e86bcb8fb..3d80d40b7 100644
--- a/libempathy/empathy-camera-monitor.c
+++ b/libempathy/empathy-camera-monitor.c
@@ -177,3 +177,10 @@ empathy_camera_monitor_dup_singleton (void)
{
return g_object_new (EMPATHY_TYPE_CAMERA_MONITOR, NULL);
}
+
+gboolean empathy_camera_monitor_get_available (EmpathyCameraMonitor *self)
+{
+ g_return_val_if_fail (EMPATHY_IS_CAMERA_MONITOR (self), FALSE);
+
+ return self->priv->num_cameras > 0;
+}
diff --git a/libempathy/empathy-camera-monitor.h b/libempathy/empathy-camera-monitor.h
index 0a9a4981e..d2d9bb89e 100644
--- a/libempathy/empathy-camera-monitor.h
+++ b/libempathy/empathy-camera-monitor.h
@@ -50,5 +50,7 @@ GType empathy_camera_monitor_get_type (void) G_GNUC_CONST;
EmpathyCameraMonitor *empathy_camera_monitor_dup_singleton (void);
+gboolean empathy_camera_monitor_get_available (EmpathyCameraMonitor *self);
+
G_END_DECLS
#endif /* __EMPATHY_CAMERA_MONITOR_H__ */