summaryrefslogtreecommitdiffstats
path: root/src/uca-camera.h
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-02 10:31:40 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-02 10:31:40 +0100
commita8436e9b42a1b5a2b30b13a13496539fc23f480e (patch)
treeb757c3a60b00ea3affd0ba10a92d9457194e4121 /src/uca-camera.h
parente26a093b4036083f13265bcbde5eae442d502377 (diff)
downloaduca-a8436e9b42a1b5a2b30b13a13496539fc23f480e.tar.gz
uca-a8436e9b42a1b5a2b30b13a13496539fc23f480e.tar.bz2
uca-a8436e9b42a1b5a2b30b13a13496539fc23f480e.tar.xz
uca-a8436e9b42a1b5a2b30b13a13496539fc23f480e.zip
Make UcaCamera a base class not an interface
Diffstat (limited to 'src/uca-camera.h')
-rw-r--r--src/uca-camera.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/uca-camera.h b/src/uca-camera.h
index 1d66d8f..4e30c0a 100644
--- a/src/uca-camera.h
+++ b/src/uca-camera.h
@@ -23,19 +23,35 @@
#define UCA_TYPE_CAMERA (uca_camera_get_type())
#define UCA_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), UCA_TYPE_CAMERA, UcaCamera))
#define UCA_IS_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), UCA_TYPE_CAMERA))
-#define UCA_CAMERA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), UCA_TYPE_CAMERA, UcaCameraInterface))
+#define UCA_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), UCA_TYPE_CAMERA, UcaCameraClass))
+#define UCA_IS_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), UCA_TYPE_CAMERA))
+#define UCA_CAMERA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), UCA_TYPE_CAMERA, UcaCameraClass))
+
+#define UCA_CAMERA_ERROR uca_camera_error_quark()
+typedef enum {
+ UCA_CAMERA_ERROR_RECORDING,
+ UCA_CAMERA_ERROR_NOT_RECORDING
+} UcaCameraError;
typedef struct _UcaCamera UcaCamera;
-typedef struct _UcaCameraInterface UcaCameraInterface;
+typedef struct _UcaCameraClass UcaCameraClass;
+typedef struct _UcaCameraPrivate UcaCameraPrivate;
+
+struct _UcaCamera {
+ /*< private >*/
+ GObject parent;
+
+ UcaCameraPrivate *priv;
+};
/**
* UcaCameraInterface:
*
* Base interface for cameras.
*/
-struct _UcaCameraInterface {
+struct _UcaCameraClass {
/*< private >*/
- GTypeInterface parent;
+ GObjectClass parent;
void (*start_recording) (UcaCamera *camera, GError **error);
void (*stop_recording) (UcaCamera *camera, GError **error);