aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-02 18:11:19 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-15 20:02:21 +0800
commit2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3 (patch)
treef77cd9b2edffff5977a4105b9f80d08938768625
parentab58c837e285f16b639444865c47c0bc286ed4e7 (diff)
downloadgsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.tar
gsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.tar.gz
gsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.tar.bz2
gsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.tar.lz
gsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.tar.xz
gsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.tar.zst
gsoc2013-empathy-2ea5aa82155ce47ca9a91f5fa1a97b0610a487a3.zip
CameraMonitor: make EmpathyCamera a boxed type
-rw-r--r--libempathy/empathy-camera-monitor.c9
-rw-r--r--libempathy/empathy-camera-monitor.h3
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);