[empathy] Add empathy_camera_monitor_get_available



commit 3a54e248335203c6979ef733adc7b07a25660613
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Tue May 10 11:48:35 2011 +0100

    Add empathy_camera_monitor_get_available

 libempathy/empathy-camera-monitor.c |    7 +++++++
 libempathy/empathy-camera-monitor.h |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-camera-monitor.c b/libempathy/empathy-camera-monitor.c
index e86bcb8..3d80d40 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 0a9a498..d2d9bb8 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__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]