]> git.0d.be Git - empathy.git/commitdiff
Add empathy_camera_monitor_get_available
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Tue, 10 May 2011 10:48:35 +0000 (11:48 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Tue, 12 Jul 2011 09:11:08 +0000 (10:11 +0100)
libempathy/empathy-camera-monitor.c
libempathy/empathy-camera-monitor.h

index e86bcb8fbe5fded0936b9d63b6ed88941f951a3e..3d80d40b79375aa2f2589645a9dbaa233edf4c3d 100644 (file)
@@ -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;
+}
index 0a9a4981eae019af4743dc42ee73ae635cdc2132..d2d9bb89e6764d357ec0f013b0fd2d89566084ed 100644 (file)
@@ -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__ */