diff options
-rw-r--r-- | libempathy/empathy-camera-monitor.c | 7 | ||||
-rw-r--r-- | 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 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__ */ |