summaryrefslogtreecommitdiffstats
path: root/src/cameras/uca-mock-camera.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-01 17:23:14 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-01 17:23:14 +0100
commite26a093b4036083f13265bcbde5eae442d502377 (patch)
tree1fd30bbeba4eb7c7ee6d1c6d4f5e9593f30882da /src/cameras/uca-mock-camera.c
parentb29c78f818ac92f42621c69c29736fe5c8e32c6f (diff)
downloaduca-e26a093b4036083f13265bcbde5eae442d502377.tar.gz
uca-e26a093b4036083f13265bcbde5eae442d502377.tar.bz2
uca-e26a093b4036083f13265bcbde5eae442d502377.tar.xz
uca-e26a093b4036083f13265bcbde5eae442d502377.zip
First draft at clean pco object construction
Diffstat (limited to 'src/cameras/uca-mock-camera.c')
-rw-r--r--src/cameras/uca-mock-camera.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cameras/uca-mock-camera.c b/src/cameras/uca-mock-camera.c
index feae389..ba92a67 100644
--- a/src/cameras/uca-mock-camera.c
+++ b/src/cameras/uca-mock-camera.c
@@ -30,6 +30,8 @@ enum {
PROP_0,
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
+ N_INTERFACE_PROPERTIES,
+
N_PROPERTIES
};
@@ -44,19 +46,19 @@ struct _UcaMockCameraPrivate {
guint16 *dummy_data;
};
-static void uca_mock_camera_start_recording(UcaCamera *camera)
+static void uca_mock_camera_start_recording(UcaCamera *camera, GError **error)
{
g_return_if_fail(UCA_IS_MOCK_CAMERA(camera));
g_print("start recording\n");
}
-static void uca_mock_camera_stop_recording(UcaCamera *camera)
+static void uca_mock_camera_stop_recording(UcaCamera *camera, GError **error)
{
g_return_if_fail(UCA_IS_MOCK_CAMERA(camera));
g_print("stop recording\n");
}
-static void uca_mock_camera_grab(UcaCamera *camera, gchar *data)
+static void uca_mock_camera_grab(UcaCamera *camera, gchar *data, GError **error)
{
g_return_if_fail(UCA_IS_MOCK_CAMERA(camera));
/* g_memmove(data, camera->priv->dummy_data, camera->priv->width * camera->priv->height * 2); */
@@ -110,8 +112,8 @@ static void uca_mock_camera_class_init(UcaMockCameraClass *klass)
gobject_class->get_property = uca_mock_camera_get_property;
gobject_class->finalize = uca_mock_camera_finalize;
- for (guint property_id = PROP_0+1; property_id < N_PROPERTIES; property_id++)
- g_object_class_override_property(gobject_class, property_id, mock_overrideables[property_id-1]);
+ for (guint id = PROP_0 + 1; id < N_INTERFACE_PROPERTIES; id++)
+ g_object_class_override_property(gobject_class, id, mock_overrideables[id-1]);
g_type_class_add_private(klass, sizeof(UcaMockCameraPrivate));
}