diff options
-rw-r--r-- | libempathy/empathy-camera-monitor.c | 9 | ||||
-rw-r--r-- | libempathy/empathy-camera-monitor.h | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libempathy/empathy-camera-monitor.c b/libempathy/empathy-camera-monitor.c index 98d021867..694e6ff96 100644 --- a/libempathy/empathy-camera-monitor.c +++ b/libempathy/empathy-camera-monitor.c @@ -62,6 +62,12 @@ empathy_camera_new (const gchar *id, return camera; } +static EmpathyCamera * +empathy_camera_copy (EmpathyCamera *camera) +{ + return empathy_camera_new (camera->id, camera->device, camera->name); +} + static void empathy_camera_free (EmpathyCamera *camera) { @@ -72,6 +78,9 @@ empathy_camera_free (EmpathyCamera *camera) g_slice_free (EmpathyCamera, camera); } +G_DEFINE_BOXED_TYPE (EmpathyCamera, empathy_camera, + empathy_camera_copy, empathy_camera_free) + static gint empathy_camera_find (gconstpointer a, gconstpointer b) diff --git a/libempathy/empathy-camera-monitor.h b/libempathy/empathy-camera-monitor.h index 19fbafa2e..2f26670dd 100644 --- a/libempathy/empathy-camera-monitor.h +++ b/libempathy/empathy-camera-monitor.h @@ -53,6 +53,9 @@ typedef struct gchar *name; } EmpathyCamera; +#define EMPATHY_TYPE_CAMERA (empathy_camera_get_type ()) +GType empathy_camera_get_type (void) G_GNUC_CONST; + GType empathy_camera_monitor_get_type (void) G_GNUC_CONST; EmpathyCameraMonitor *empathy_camera_monitor_dup_singleton (void); |