[aravis] introspection: warning fixes.



commit e1b0771d1dba121609a74e09ca743455a4089df3
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Thu Apr 21 17:10:14 2011 +0200

    introspection: warning fixes.

 docs/reference/aravis/aravis-sections.txt |   18 +++--
 src/Makefile.am                           |   34 +++++----
 src/arvbuffer.c                           |    6 +-
 src/arvcamera.c                           |   24 +++---
 src/arvdevice.c                           |   11 +++
 src/arvfakecamera.c                       |   30 ++++++--
 src/arvfakecamera.h                       |    2 +-
 src/arvfakedevice.c                       |    6 ++
 src/arvfakeinterface.c                    |    8 ++
 src/arvfakestream.c                       |    9 +++
 src/arvgc.c                               |   12 ++--
 src/arvgcconverter.c                      |    2 +-
 src/arvgcconverter.h                      |    2 +-
 src/arvgcnode.c                           |    8 ++
 src/arvgcregister.c                       |   13 ++--
 src/arvgcregister.h                       |    8 +-
 src/arvgcswissknife.c                     |    2 +-
 src/arvgcswissknife.h                     |    2 +-
 src/arvgvcp.c                             |  112 +++++++++++++++++++++++++++++
 src/arvgvinterface.c                      |    8 ++
 src/arvgvstream.c                         |   11 +++
 src/arvinterface.c                        |    5 +-
 src/arvstream.c                           |   19 +++++-
 src/arvsystem.c                           |    8 ++
 src/arvtools.c                            |   59 +++++++++++++++-
 src/arvtools.h                            |    8 ++-
 src/arvzip.c                              |    7 ++
 27 files changed, 362 insertions(+), 72 deletions(-)
---
diff --git a/docs/reference/aravis/aravis-sections.txt b/docs/reference/aravis/aravis-sections.txt
index 10981f0..7931d1c 100644
--- a/docs/reference/aravis/aravis-sections.txt
+++ b/docs/reference/aravis/aravis-sections.txt
@@ -268,7 +268,7 @@ ArvGcIntegerInterface
 <TITLE>ArvGcConverter</TITLE>
 ArvGcConverter
 arv_gc_converter_new
-arv_gc_int_converter_new
+arv_gc_converter_new_integer
 <SUBSECTION Standard>
 ARV_GC_CONVERTER
 ARV_IS_GC_CONVERTER
@@ -527,7 +527,7 @@ ArvGcFloatInterface
 <TITLE>ArvGcSwissKnife</TITLE>
 ArvGcSwissKnife
 arv_gc_swiss_knife_new
-arv_gc_int_swiss_knife_new
+arv_gc_swiss_knife_new_integer
 <SUBSECTION Standard>
 ARV_GC_SWISS_KNIFE
 ARV_IS_GC_SWISS_KNIFE
@@ -614,10 +614,10 @@ ArvGcSign
 ArvGcRegisterType
 ArvGcRegister
 arv_gc_register_new
-arv_gc_integer_register_new
-arv_gc_masked_integer_register_new
-arv_gc_float_register_new
-arv_gc_string_register_new
+arv_gc_register_new_integer
+arv_gc_register_new_masked_integer
+arv_gc_register_new_float
+arv_gc_register_new_string
 arv_gc_register_get
 arv_gc_register_set
 arv_gc_register_get_address
@@ -738,13 +738,15 @@ arv_value_get_int64
 arv_value_get_double
 arv_value_holds_int64
 arv_value_holds_double
-arv_new_g_value_int64
-arv_new_g_value_string
+arv_create_int64_g_value
+arv_create_string_g_value
 arv_free_g_value
 arv_force_g_value_to_int64
 arv_force_g_value_to_double
 arv_force_g_value_to_string
 <SUBSECTION Private>
+ARV_TYPE_VALUE
+arv_value_get_type
 ArvValue
 arv_copy_memory_with_endianess
 arv_decompress
diff --git a/src/Makefile.am b/src/Makefile.am
index 32e0479..ff11e3c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,12 +26,10 @@ EXTRA_DIST += arvenumtypes.h.template \
 libaravis_ ARAVIS_API_VERSION@_la_LIBADD = 				\
 	$(ARAVIS_LIBS)
 
-libaravis_ ARAVIS_API_VERSION@_la_SOURCES =				\
+ARAVIS_SRCS =					\
 	arvenums.c				\
 	arvenumtypes.c				\
 	arvdebug.c				\
-	arvtools.c				\
-	arvzip.c				\
 	arvsystem.c				\
 	arvevaluator.c				\
 	arvcamera.c				\
@@ -55,8 +53,6 @@ libaravis_ ARAVIS_API_VERSION@_la_SOURCES =				\
 	arvdevice.c				\
 	arvstream.c				\
 	arvbuffer.c				\
-	arvgvcp.c				\
-	arvgvsp.c				\
 	arvgvinterface.c			\
 	arvgvdevice.c				\
 	arvgvstream.c				\
@@ -65,13 +61,17 @@ libaravis_ ARAVIS_API_VERSION@_la_SOURCES =				\
 	arvfakestream.c				\
 	arvfakecamera.c
 
+ARAVIS_SRCS_NO_INTRO =				\
+	arvtools.c				\
+	arvzip.c				\
+	arvgvcp.c				\
+	arvgvsp.c
+
 ARAVIS_HDRS = 					\
 	arv.h					\
 	arvtypes.h				\
 	arvenums.h				\
 	arvdebug.h				\
-	arvtools.h				\
-	arvzip.h				\
 	arvsystem.h				\
 	arvevaluator.h				\
 	arvcamera.h				\
@@ -95,8 +95,6 @@ ARAVIS_HDRS = 					\
 	arvdevice.h				\
 	arvstream.h				\
 	arvbuffer.h				\
-	arvgvcp.h				\
-	arvgvsp.h				\
 	arvgvinterface.h			\
 	arvgvdevice.h				\
 	arvgvstream.h				\
@@ -105,19 +103,27 @@ ARAVIS_HDRS = 					\
 	arvfakestream.h				\
 	arvfakecamera.h
 
+ARAVIS_HDRS_NO_INTRO =				\
+	arvtools.h				\
+	arvzip.h				\
+	arvgvcp.h				\
+	arvgvsp.h
+
 arv_fake_cameradir = $(aravis_datadir)
 arv_fake_camera_DATA = arv-fake-camera.xml
 
 EXTRA_DIST += arv-fake-camera.xml
 
+libaravis_ ARAVIS_API_VERSION@_la_SOURCES = $(ARAVIS_SRCS) $(ARAVIS_SRCS_NO_INTRO)
+
 libaravis_ ARAVIS_API_VERSION@_ladir = $(includedir)/aravis- ARAVIS_API_VERSION@
-libaravis_ ARAVIS_API_VERSION@_la_HEADERS = $(ARAVIS_HDRS)
+libaravis_ ARAVIS_API_VERSION@_la_HEADERS = $(ARAVIS_HDRS) $(ARAVIS_HDRS_NO_INTRO)
 libaravis_ ARAVIS_API_VERSION@_la_HEADERS += arvenumtypes.h arvconfig.h
 
-arvenumtypes.h: arvenumtypes.h.template $(ARAVIS_HDRS) $(GLIB_MKENUMS)
+arvenumtypes.h: arvenumtypes.h.template $(ARAVIS_HDRS) $(ARAVIS_HDRS_NO_INTRO) $(GLIB_MKENUMS)
 	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.h.template $(libaravis_ ARAVIS_API_VERSION@_la_HEADERS)) > $@
 
-arvenumtypes.c: arvenumtypes.c.template $(ARAVIS_HDRS) $(GLIB_MKENUMS)
+arvenumtypes.c: arvenumtypes.c.template $(ARAVIS_HDRS) $(ARAVIS_HDRS_NO_INTRO) $(GLIB_MKENUMS)
 	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template arvenumtypes.c.template $(libaravis_ ARAVIS_API_VERSION@_la_HEADERS)) > $@
 
 bin_PROGRAMS = arv-fake-gv-camera- ARAVIS_API_VERSION@ arv-show-devices- ARAVIS_API_VERSION@
@@ -132,12 +138,12 @@ CLEANFILES = $(BUILT_SOURCES)
 
 if HAVE_INTROSPECTION
 
-introspection_files = $(libaravis_ ARAVIS_API_VERSION@_la_SOURCES) \
+introspection_files = $(ARAVIS_SRCS) \
 		      $(ARAVIS_HDRS)
 
 Aravis- ARAVIS_API_VERSION@.gir: $(INTROSPECTION_SCANNER)
 Aravis_0_2_gir_INCLUDES = GObject-2.0 Gio-2.0
-Aravis_0_2_gir_SCANNERFLAGS = --identifier-prefix=Arv
+Aravis_0_2_gir_SCANNERFLAGS = --identifier-prefix=Arv --warn-all
 Aravis_0_2_gir_CFLAGS = $(INCLUDES) -I$(top_srcdir)/src
 Aravis_0_2_gir_LIBS = libaravis- ARAVIS_API_VERSION@.la
 Aravis_0_2_gir_FILES = $(addprefix $(srcdir)/,$(introspection_files))
diff --git a/src/arvbuffer.c b/src/arvbuffer.c
index fb3116e..6ffab56 100644
--- a/src/arvbuffer.c
+++ b/src/arvbuffer.c
@@ -37,9 +37,9 @@
 static GObjectClass *parent_class = NULL;
 
 /**
- * arv_buffer_new:
+ * arv_buffer_new_full:
  * @size: payload size
- * @preallocated: (transfer none): preallocated memory buffer
+ * @preallocated: (transfer none) (allow-none): preallocated memory buffer
  * @user_data: (transfer none): a pointer to user data associated to this buffer
  * @user_data_destroy_func: an optional user data destroy callback
  *
@@ -76,7 +76,7 @@ arv_buffer_new_full (size_t size, void *preallocated, void *user_data, GDestroyN
 /**
  * arv_buffer_new:
  * @size: payload size
- * @preallocated: (transfer none): preallocated memory buffer
+ * @preallocated: (allow-none) (transfer none): preallocated memory buffer
  *
  * Creates a new buffer for the storage of the video stream images. 
  * The data space can be either preallocated, and the caller is responsible
diff --git a/src/arvcamera.c b/src/arvcamera.c
index 4a0405c..ed74e6b 100644
--- a/src/arvcamera.c
+++ b/src/arvcamera.c
@@ -77,16 +77,16 @@ struct _ArvCameraPrivate {
 /**
  * arv_camera_create_stream:
  * @camera: a #ArvCamera
- * @callback: a frame processing callback
- * @user_data: closure
- * Return value: a new #ArvStream.
+ * @callback: (scope call): a frame processing callback
+ * @user_data: (closure) user data for @callback
+ * Return value: (transfer full): a new #ArvStream.
  *
  * Creates a new #ArvStream for video stream handling. See
- * @arv_device_create_stream for details regarding the callback function.
+ * @ArvStreamCallback for details regarding the callback function.
  */
 
 ArvStream *
-arv_camera_create_stream (ArvCamera *camera, ArvStreamCallback callback, void *user_data)
+arv_camera_create_stream (ArvCamera *camera, ArvStreamCallback callback, gpointer user_data)
 {
 	g_return_val_if_fail (ARV_IS_CAMERA (camera), NULL);
 
@@ -142,8 +142,8 @@ arv_camera_get_device_id (ArvCamera *camera)
 /**
  * arv_camera_get_sensor_size:
  * @camera: a #ArvCamera
- * @width: camera sensor width placeholder
- * @height: camera sensor height placeholder
+ * @width: (out): camera sensor width placeholder
+ * @height: (out): camera sensor height placeholder
  */
 
 void
@@ -187,10 +187,10 @@ arv_camera_set_region (ArvCamera *camera, gint x, gint y, gint width, gint heigh
 /**
  * arv_camera_get_region:
  * @camera: a #ArvCamera
- * @x: x offset placeholder
- * @y: y_offset placeholder
- * @width: region width placeholder
- * @height: region height placeholder
+ * @x: (out): x offset placeholder
+ * @y: (out): y_offset placeholder
+ * @width: (out): region width placeholder
+ * @height: (out): region height placeholder
  *
  * Retrieves the current region of interest.
  */
@@ -763,7 +763,7 @@ arv_camera_get_payload (ArvCamera *camera)
 /**
  * arv_camera_get_device:
  * @camera: a #ArvCamera
- * Return value: the underlying device object.
+ * Return value: (transfer none): the underlying device object.
  *
  * Retrieves the #ArvDevice object for more complete access to the camera features.
  */
diff --git a/src/arvdevice.c b/src/arvdevice.c
index bd3e180..e3db484 100644
--- a/src/arvdevice.c
+++ b/src/arvdevice.c
@@ -41,6 +41,17 @@
 
 static GObjectClass *parent_class = NULL;
 
+/**
+ * arv_device_create_stream:
+ * @device: a #ArvDevice
+ * @callback: (scope call): a frame processing callback
+ * @user_data: (closure) user data for @callback
+ * Return value: (transfer full): a new #ArvStream.
+ *
+ * Creates a new #ArvStream for video stream handling. See
+ * @ArvStreamCallback for details regarding the callback function.
+ */
+
 ArvStream *
 arv_device_create_stream (ArvDevice *device, ArvStreamCallback callback, void *user_data)
 {
diff --git a/src/arvfakecamera.c b/src/arvfakecamera.c
index fc30f11..0f81833 100644
--- a/src/arvfakecamera.c
+++ b/src/arvfakecamera.c
@@ -50,7 +50,7 @@ struct _ArvFakeCameraPrivate {
 	double trigger_frequency;
 
 	GMutex *fill_pattern_mutex;
-	ArvFakeCameraFillPattern fill_pattern;
+	ArvFakeCameraFillPattern fill_pattern_callback;
 	void *fill_pattern_data;
 };
 
@@ -198,19 +198,28 @@ arv_fake_camera_diagonal_ramp (ArvBuffer *buffer, void *fill_pattern_data,
 		}
 }
 
+/**
+ * arv_fake_camera_set_fill_pattern:
+ * @camera: a #ArvFakeCamera
+ * @fill_pattern_callback: (scope call): callback for image filling
+ * @fill_pattern_data: (closure): image filling user data
+ *
+ * Sets the fill pattern callback for custom test images.
+ */
+
 void
 arv_fake_camera_set_fill_pattern (ArvFakeCamera *camera,
-				  ArvFakeCameraFillPattern fill_pattern,
+				  ArvFakeCameraFillPattern fill_pattern_callback,
 				  void *fill_pattern_data)
 {
 	g_return_if_fail (ARV_IS_FAKE_CAMERA (camera));
 
 	g_mutex_lock (camera->priv->fill_pattern_mutex);
-	if (fill_pattern != NULL) {
-		camera->priv->fill_pattern = fill_pattern;
+	if (fill_pattern_callback != NULL) {
+		camera->priv->fill_pattern_callback = fill_pattern_callback;
 		camera->priv->fill_pattern_data = fill_pattern_data;
 	} else {
-		camera->priv->fill_pattern = arv_fake_camera_diagonal_ramp;
+		camera->priv->fill_pattern_callback = arv_fake_camera_diagonal_ramp;
 		camera->priv->fill_pattern_data = NULL;
 	}
 	g_mutex_unlock (camera->priv->fill_pattern_mutex);
@@ -255,7 +264,8 @@ arv_fake_camera_fill_buffer (ArvFakeCamera *camera, ArvBuffer *buffer)
 	arv_fake_camera_read_register (camera, ARV_FAKE_CAMERA_REGISTER_EXPOSURE_TIME_US, &exposure_time_us);
 	arv_fake_camera_read_register (camera, ARV_FAKE_CAMERA_REGISTER_GAIN_RAW, &gain);
 	arv_fake_camera_read_register (camera, ARV_FAKE_CAMERA_REGISTER_PIXEL_FORMAT, &pixel_format);
-	camera->priv->fill_pattern (buffer, camera->priv->fill_pattern_data, exposure_time_us, gain, pixel_format);
+	camera->priv->fill_pattern_callback (buffer, camera->priv->fill_pattern_data,
+					     exposure_time_us, gain, pixel_format);
 	g_mutex_unlock (camera->priv->fill_pattern_mutex);
 }
 
@@ -282,6 +292,12 @@ arv_fake_camera_get_acquisition_status (ArvFakeCamera *camera)
 	return _get_register (camera, ARV_FAKE_CAMERA_REGISTER_ACQUISITION);
 }
 
+/**
+ * arv_fake_camera_get_stream_address:
+ * @camera: a #ArvFakeCamera
+ * Return value: (transfer full): the data stream #GSocketAddress for this camera
+ */
+
 GSocketAddress *
 arv_fake_camera_get_stream_address (ArvFakeCamera *camera)
 {
@@ -397,7 +413,7 @@ arv_fake_camera_new (const char *serial_number)
 	memory = g_malloc0 (ARV_FAKE_CAMERA_MEMORY_SIZE);
 
 	fake_camera->priv->fill_pattern_mutex = g_mutex_new ();
-	fake_camera->priv->fill_pattern = arv_fake_camera_diagonal_ramp;
+	fake_camera->priv->fill_pattern_callback = arv_fake_camera_diagonal_ramp;
 	fake_camera->priv->fill_pattern_data = NULL;
 
 	fake_camera->priv->genicam_xml = arv_get_fake_camera_genicam_xml (&fake_camera->priv->genicam_xml_size);
diff --git a/src/arvfakecamera.h b/src/arvfakecamera.h
index fe1aa34..20e87ec 100644
--- a/src/arvfakecamera.h
+++ b/src/arvfakecamera.h
@@ -122,7 +122,7 @@ void		arv_fake_camera_set_control_channel_privilege	(ArvFakeCamera *camera, guin
 guint32		arv_fake_camera_get_heartbeat_timeout		(ArvFakeCamera *camera);
 
 void		arv_fake_camera_set_fill_pattern	(ArvFakeCamera *camera,
-							 ArvFakeCameraFillPattern fill_pattern,
+							 ArvFakeCameraFillPattern fill_pattern_callback,
 							 void *fill_pattern_data);
 void 		arv_fake_camera_set_trigger_frequency 	(ArvFakeCamera *camera, double frequency);
 
diff --git a/src/arvfakedevice.c b/src/arvfakedevice.c
index 9070de6..2c6951d 100644
--- a/src/arvfakedevice.c
+++ b/src/arvfakedevice.c
@@ -97,6 +97,12 @@ arv_fake_device_write_register (ArvDevice *device, guint32 address, guint32 valu
 	return arv_fake_camera_write_register (ARV_FAKE_DEVICE (device)->priv->camera, address, value);
 }
 
+/**
+ * arv_fake_device_get_fake_camera:
+ * @device: a fake device
+ * Return value: (transfer none): the #ArvFakeCamera used by this device instance.
+ */
+
 ArvFakeCamera *
 arv_fake_device_get_fake_camera	(ArvFakeDevice *device)
 {
diff --git a/src/arvfakeinterface.c b/src/arvfakeinterface.c
index 81cc148..00a7bde 100644
--- a/src/arvfakeinterface.c
+++ b/src/arvfakeinterface.c
@@ -59,6 +59,14 @@ arv_fake_interface_open_device (ArvInterface *interface, const char *device_id)
 static ArvInterface *fake_interface = NULL;
 static GStaticMutex fake_interface_mutex = G_STATIC_MUTEX_INIT;
 
+/**
+ * arv_fake_interface_get_instance:
+ *
+ * Gets the unique instance of the fake interface.
+ *
+ * Returns: (transfer none): a #ArvInterface singleton.
+ */
+
 ArvInterface *
 arv_fake_interface_get_instance (void)
 {
diff --git a/src/arvfakestream.c b/src/arvfakestream.c
index ed9f32a..a86eb9d 100644
--- a/src/arvfakestream.c
+++ b/src/arvfakestream.c
@@ -94,6 +94,15 @@ arv_fake_stream_thread (void *data)
 
 /* ArvFakeStream implemenation */
 
+
+/**
+ * arv_fake_stream_new: (skip)
+ * @camera: a #ArvFakeCamera
+ * @callback: (scope call): image processing callback
+ * @user_data: (closure): user data for @callback
+ * Return Value: (transfer full): a new #ArvStream.
+ */
+
 ArvStream *
 arv_fake_stream_new (ArvFakeCamera *camera, ArvStreamCallback callback, void *user_data)
 {
diff --git a/src/arvgc.c b/src/arvgc.c
index be9d6aa..aa6cb9b 100644
--- a/src/arvgc.c
+++ b/src/arvgc.c
@@ -63,15 +63,15 @@ arv_gc_create_node (ArvGc *genicam, const char *type)
 	else if (strcmp (type, "Converter") == 0)
 		node = arv_gc_converter_new ();
 	else if (strcmp (type, "IntConverter") == 0)
-		node = arv_gc_int_converter_new ();
+		node = arv_gc_converter_new_integer ();
 	else if (strcmp (type, "IntReg") == 0)
-		node = arv_gc_integer_register_new ();
+		node = arv_gc_register_new_integer ();
 	else if (strcmp (type, "MaskedIntReg") == 0)
-		node = arv_gc_masked_integer_register_new ();
+		node = arv_gc_register_new_masked_integer ();
 	else if (strcmp (type, "FloatReg") == 0)
-		node = arv_gc_float_register_new ();
+		node = arv_gc_register_new_float ();
 	else if (strcmp (type, "StringReg") == 0)
-		node = arv_gc_string_register_new ();
+		node = arv_gc_register_new_string ();
 	else if (strcmp (type, "Integer") == 0)
 		node = arv_gc_integer_node_new ();
 	else if (strcmp (type, "Float") == 0)
@@ -85,7 +85,7 @@ arv_gc_create_node (ArvGc *genicam, const char *type)
 	else if (strcmp (type, "SwissKnife") == 0)
 		node = arv_gc_swiss_knife_new ();
 	else if (strcmp (type, "IntSwissKnife") == 0)
-		node = arv_gc_int_swiss_knife_new ();
+		node = arv_gc_swiss_knife_new_integer ();
 	else if (strcmp (type, "Port") == 0)
 		node = arv_gc_port_new ();
 
diff --git a/src/arvgcconverter.c b/src/arvgcconverter.c
index 008ad5d..fd4f29e 100644
--- a/src/arvgcconverter.c
+++ b/src/arvgcconverter.c
@@ -109,7 +109,7 @@ arv_gc_converter_new (void)
 }
 
 ArvGcNode *
-arv_gc_int_converter_new (void)
+arv_gc_converter_new_integer (void)
 {
 	ArvGcConverter *converter;
 
diff --git a/src/arvgcconverter.h b/src/arvgcconverter.h
index b00af29..89c8c86 100644
--- a/src/arvgcconverter.h
+++ b/src/arvgcconverter.h
@@ -54,7 +54,7 @@ struct _ArvGcConverterClass {
 GType 		arv_gc_converter_get_type 	(void);
 
 ArvGcNode * 	arv_gc_converter_new 		(void);
-ArvGcNode * 	arv_gc_int_converter_new 	(void);
+ArvGcNode * 	arv_gc_converter_new_integer 	(void);
 
 G_END_DECLS
 
diff --git a/src/arvgcnode.c b/src/arvgcnode.c
index 2f73d57..722d6df 100644
--- a/src/arvgcnode.c
+++ b/src/arvgcnode.c
@@ -191,6 +191,14 @@ arv_gc_node_set_genicam	(ArvGcNode *node, ArvGc *genicam)
 	node->priv->genicam = genicam;
 }
 
+/**
+ * arv_gc_node_get_genicam:
+ * @gc_node: a #ArvGcNode
+ * Return value: (transfer none): the parent #ArvGc
+ *
+ * Retrieves the parent genicam document of @node.
+ */
+
 ArvGc *
 arv_gc_node_get_genicam	(ArvGcNode *node)
 {
diff --git a/src/arvgcregister.c b/src/arvgcregister.c
index 5604a23..1f7c669 100644
--- a/src/arvgcregister.c
+++ b/src/arvgcregister.c
@@ -52,10 +52,11 @@ arv_gc_register_add_element (ArvGcNode *node, const char *name, const char *cont
 
 	if (strcmp (name, "Address") == 0) {
 		gc_register->addresses = g_slist_prepend (gc_register->addresses,
-							  arv_new_g_value_int64 (g_ascii_strtoull (content,
+							  arv_create_int64_g_value (g_ascii_strtoull (content,
 												   NULL, 0)));
 	} else if (strcmp (name, "pAddress") == 0) {
-		gc_register->addresses = g_slist_prepend (gc_register->addresses, arv_new_g_value_string (content));
+		gc_register->addresses = g_slist_prepend (gc_register->addresses,
+							  arv_create_string_g_value (content));
 	} else if (strcmp (name, "pIndex") == 0) {
 		int i;
 
@@ -325,7 +326,7 @@ arv_gc_register_new (void)
 }
 
 ArvGcNode *
-arv_gc_integer_register_new (void)
+arv_gc_register_new_integer (void)
 {
 	ArvGcRegister *gc_register;
 
@@ -337,7 +338,7 @@ arv_gc_integer_register_new (void)
 }
 
 ArvGcNode *
-arv_gc_masked_integer_register_new (void)
+arv_gc_register_new_masked_integer (void)
 {
 	ArvGcRegister *gc_register;
 
@@ -349,7 +350,7 @@ arv_gc_masked_integer_register_new (void)
 }
 
 ArvGcNode *
-arv_gc_float_register_new (void)
+arv_gc_register_new_float (void)
 {
 	ArvGcRegister *gc_register;
 
@@ -361,7 +362,7 @@ arv_gc_float_register_new (void)
 }
 
 ArvGcNode *
-arv_gc_string_register_new (void)
+arv_gc_register_new_string (void)
 {
 	ArvGcRegister *gc_register;
 
diff --git a/src/arvgcregister.h b/src/arvgcregister.h
index 23c4cd5..6383822 100644
--- a/src/arvgcregister.h
+++ b/src/arvgcregister.h
@@ -97,10 +97,10 @@ struct _ArvGcRegisterClass {
 
 GType 		arv_gc_register_get_type 		(void);
 ArvGcNode * 	arv_gc_register_new 			(void);
-ArvGcNode * 	arv_gc_integer_register_new 		(void);
-ArvGcNode * 	arv_gc_masked_integer_register_new 	(void);
-ArvGcNode * 	arv_gc_float_register_new 		(void);
-ArvGcNode * 	arv_gc_string_register_new 		(void);
+ArvGcNode * 	arv_gc_register_new_integer 		(void);
+ArvGcNode * 	arv_gc_register_new_masked_integer 	(void);
+ArvGcNode * 	arv_gc_register_new_float	 	(void);
+ArvGcNode * 	arv_gc_register_new_string 		(void);
 void 		arv_gc_register_get			(ArvGcRegister *gc_register, void *buffer, guint64 Length);
 void 		arv_gc_register_set			(ArvGcRegister *gc_register, void *buffer, guint64 Length);
 guint64 	arv_gc_register_get_address 		(ArvGcRegister *gc_register);
diff --git a/src/arvgcswissknife.c b/src/arvgcswissknife.c
index a9d2da1..377e2d9 100644
--- a/src/arvgcswissknife.c
+++ b/src/arvgcswissknife.c
@@ -103,7 +103,7 @@ arv_gc_swiss_knife_new (void)
 }
 
 ArvGcNode *
-arv_gc_int_swiss_knife_new (void)
+arv_gc_swiss_knife_new_integer (void)
 {
 	ArvGcSwissKnife *swiss_knife;
 
diff --git a/src/arvgcswissknife.h b/src/arvgcswissknife.h
index 53c03a9..b78f759 100644
--- a/src/arvgcswissknife.h
+++ b/src/arvgcswissknife.h
@@ -52,7 +52,7 @@ struct _ArvGcSwissKnifeClass {
 GType 		arv_gc_swiss_knife_get_type 	(void);
 
 ArvGcNode * 	arv_gc_swiss_knife_new 		(void);
-ArvGcNode * 	arv_gc_int_swiss_knife_new 	(void);
+ArvGcNode * 	arv_gc_swiss_knife_new_integer 	(void);
 
 G_END_DECLS
 
diff --git a/src/arvgvcp.c b/src/arvgvcp.c
index c1fc94d..5a3b155 100644
--- a/src/arvgvcp.c
+++ b/src/arvgvcp.c
@@ -36,6 +36,17 @@ arv_gvcp_packet_free (ArvGvcpPacket *packet)
 	g_free (packet);
 }
 
+/**
+ * arv_gvcp_packet_new_read_memory_cmd: (skip)
+ * @address: read address
+ * @size: read size, in bytes
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a memory read command.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_read_memory_cmd (guint32 address, guint32 size, guint32 packet_count, size_t *packet_size)
 {
@@ -60,6 +71,17 @@ arv_gvcp_packet_new_read_memory_cmd (guint32 address, guint32 size, guint32 pack
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_read_memory_ack: (skip)
+ * @address: read address
+ * @size: read size, in bytes
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a memory read acknowledge.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_read_memory_ack (guint32 address, guint32 size, guint32 packet_count, size_t *packet_size)
 {
@@ -82,6 +104,17 @@ arv_gvcp_packet_new_read_memory_ack (guint32 address, guint32 size, guint32 pack
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_write_memory_cmd: (skip)
+ * @address: write address
+ * @size: write size, in bytes
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a memory write command.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_write_memory_cmd (guint32 address, guint32 size, guint32 packet_count, size_t *packet_size)
 {
@@ -104,6 +137,16 @@ arv_gvcp_packet_new_write_memory_cmd (guint32 address, guint32 size, guint32 pac
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_write_memory_ack: (skip)
+ * @address: write address
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a memory write acknowledge.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_write_memory_ack (guint32 address,
 				      guint32 packet_count, size_t *packet_size)
@@ -127,6 +170,16 @@ arv_gvcp_packet_new_write_memory_ack (guint32 address,
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_read_register_cmd: (skip)
+ * @address: write address
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a register read command.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_read_register_cmd (guint32 address, guint32 packet_count, size_t *packet_size)
 {
@@ -149,6 +202,16 @@ arv_gvcp_packet_new_read_register_cmd (guint32 address, guint32 packet_count, si
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_read_register_ack: (skip)
+ * @value: read value
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a register read acknowledge.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_read_register_ack (guint32 value,
 				       guint32 packet_count, size_t *packet_size)
@@ -172,6 +235,17 @@ arv_gvcp_packet_new_read_register_ack (guint32 value,
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_write_register_cmd: (skip)
+ * @address: write address
+ * @value: value to write
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a register write command.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_write_register_cmd (guint32 address, guint32 value,
 					guint32 packet_count, size_t *packet_size)
@@ -197,6 +271,16 @@ arv_gvcp_packet_new_write_register_cmd (guint32 address, guint32 value,
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_write_register_ack: (skip)
+ * @address: write address
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a register write acknowledge.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_write_register_ack 	(guint32 address,
 					 guint32 packet_count, size_t *packet_size)
@@ -220,6 +304,14 @@ arv_gvcp_packet_new_write_register_ack 	(guint32 address,
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_discovery_cmd: (skip)
+ * @size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a discovery command.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_discovery_cmd (size_t *packet_size)
 {
@@ -239,6 +331,14 @@ arv_gvcp_packet_new_discovery_cmd (size_t *packet_size)
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_discovery_ack: (skip)
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a discovery acknowledge.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_discovery_ack (size_t *packet_size)
 {
@@ -258,6 +358,18 @@ arv_gvcp_packet_new_discovery_ack (size_t *packet_size)
 	return packet;
 }
 
+/**
+ * arv_gvcp_packet_new_packet_resend_cmd: (skip)
+ * @frame_id: frame id
+ * @first_block: first missing packet
+ * @last_block: last missing packet
+ * @packet_count: current packet count
+ * @packet_size: (out): packet size, in bytes
+ * Return value: (transfer full): a new #ArvGvcpPacket
+ *
+ * Create a gvcp packet for a packet resend command.
+ */
+
 ArvGvcpPacket *
 arv_gvcp_packet_new_packet_resend_cmd (guint32 frame_id,
 				       guint32 first_block, guint32 last_block,
diff --git a/src/arvgvinterface.c b/src/arvgvinterface.c
index 127399b..5b964f2 100644
--- a/src/arvgvinterface.c
+++ b/src/arvgvinterface.c
@@ -332,6 +332,14 @@ arv_gv_interface_open_device (ArvInterface *interface, const char *device_id)
 static ArvInterface *gv_interface = NULL;
 static GStaticMutex gv_interface_mutex = G_STATIC_MUTEX_INIT;
 
+/**
+ * arv_gv_interface_get_instance:
+ *
+ * Gets the unique instance of the GV interface.
+ *
+ * Returns: (transfer none): a #ArvInterface singleton.
+ */
+
 ArvInterface *
 arv_gv_interface_get_instance (void)
 {
diff --git a/src/arvgvstream.c b/src/arvgvstream.c
index f8f11b9..bf9e1d1 100644
--- a/src/arvgvstream.c
+++ b/src/arvgvstream.c
@@ -629,6 +629,17 @@ arv_gv_stream_get_port (ArvGvStream *gv_stream)
 	return g_inet_socket_address_get_port (local_address);
 }
 
+/**
+ * arv_gv_stream_new: (skip)
+ * @device_address: inet device address for gvsp
+ * @port: inet port
+ * @callback: (scope call): processing callback
+ * @user_data: (closure): user data for @callback
+ * @timestamp_tick_frequency: camera tick frequency for timestamping
+ * @packet_size: gvsp packet size, in bytes
+ * Return value: (transfer full): a new #ArvStream.
+ */
+
 ArvStream *
 arv_gv_stream_new (GInetAddress *device_address, guint16 port,
 		   ArvStreamCallback callback, void *user_data,
diff --git a/src/arvinterface.c b/src/arvinterface.c
index 757988a..13e8320 100644
--- a/src/arvinterface.c
+++ b/src/arvinterface.c
@@ -99,9 +99,10 @@ arv_interface_get_device_id (ArvInterface *interface, unsigned int index)
 /**
  * arv_interface_open_device
  * @interface: a #ArvInterface
- * @device_id: device unique id
+ * @device_id: (allow-none): device unique id
+ * Return value: (transfer full): a new #ArvDevice
  *
- * Creates a new #ArvDevice object corresponding to the given id.
+ * Creates a new #ArvDevice object corresponding to the given device id string. The first available device is returned if @device_id is null.
  **/
 
 ArvDevice *
diff --git a/src/arvstream.c b/src/arvstream.c
index c671887..5a4aa9e 100644
--- a/src/arvstream.c
+++ b/src/arvstream.c
@@ -77,7 +77,7 @@ arv_stream_push_buffer (ArvStream *stream, ArvBuffer *buffer)
 /**
  * arv_stream_pop_buffer:
  * @stream: a #ArvStream
- * Returns: a #ArvBuffer
+ * Returns: (transfer full): a #ArvBuffer
  *
  * Pops a buffer from the output queue of @stream. The retrieved buffer
  * may contain an invalid image. Caller should check the buffer status before using it.
@@ -91,6 +91,16 @@ arv_stream_pop_buffer (ArvStream *stream)
 	return g_async_queue_try_pop (stream->priv->output_queue);
 }
 
+/**
+ * arv_stream_timed_pop_buffer:
+ * @stream: a #ArvStream
+ * @timeout: timeout, in µs
+ * Returns: (transfer full): a #ArvBuffer
+ *
+ * Pops a buffer from the output queue of @stream, waiting no more than @timeout. The retrieved buffer
+ * may contain an invalid image. Caller should check the buffer status before using it.
+ */
+
 ArvBuffer *
 arv_stream_timed_pop_buffer (ArvStream *stream, guint64 timeout)
 {
@@ -104,6 +114,13 @@ arv_stream_timed_pop_buffer (ArvStream *stream, guint64 timeout)
 	return g_async_queue_timed_pop (stream->priv->output_queue, &end_time);
 }
 
+/**
+ * arv_stream_pop_input_buffer: (skip)
+ * @stream: (transfer full): a #ArvStream
+ *
+ * Pos a buffer from the input queue of @stream.
+ */
+
 ArvBuffer *
 arv_stream_pop_input_buffer (ArvStream *stream)
 {
diff --git a/src/arvsystem.c b/src/arvsystem.c
index 0e0cb02..f6d8824 100644
--- a/src/arvsystem.c
+++ b/src/arvsystem.c
@@ -102,6 +102,14 @@ arv_get_device_id (unsigned int index)
 	return NULL;
 }
 
+/**
+ * arv_open_device:
+ * @device_id: (allow-none): a device identifier string
+ * Return value: (transfer full): a new #ArvDevice instance
+ *
+ * Open a device corresponding to the given identifier. A null string makes this function return the first available device.
+ */
+
 ArvDevice *
 arv_open_device (const char *device_id)
 {
diff --git a/src/arvtools.c b/src/arvtools.c
index 747990c..4ffe4dd 100644
--- a/src/arvtools.c
+++ b/src/arvtools.c
@@ -77,6 +77,15 @@ _arv_statistic_free (ArvStatistic *statistic)
 	g_free (statistic);
 }
 
+/**
+ * arv_statistic_new: (skip)
+ * @n_histograms: number of histograms
+ * @n_bins: number of bins for each histogram
+ * @bin_step: bin step
+ * @offset: offset of the first bin
+ * Return value: a new #ArvStatistic structure
+ */
+
 ArvStatistic *
 arv_statistic_new (unsigned int n_histograms, unsigned n_bins, unsigned int bin_step, int offset)
 {
@@ -434,6 +443,32 @@ arv_value_copy (ArvValue *to, const ArvValue *from)
 	*to = *from;
 }
 
+ArvValue *
+arv_value_duplicate (const ArvValue *from)
+{
+	ArvValue *value = g_new (ArvValue, 1);
+
+	if (from == NULL)
+		return NULL;
+
+	*value = *from;
+
+	return value;
+}
+
+GType
+arv_value_get_type (void)
+{
+	GType type_id = 0;
+
+	if (type_id == 0)
+		type_id = g_boxed_type_register_static ("ArvValue",
+							(GBoxedCopyFunc) arv_value_duplicate,
+							(GBoxedFreeFunc) arv_value_free);
+
+	return type_id;
+}
+
 void
 arv_value_set_int64 (ArvValue *value, gint64 v_int64)
 {
@@ -480,8 +515,14 @@ arv_value_holds_double (ArvValue *value)
 
 /* GValue utilities */
 
+/**
+ * arv_create_int64_g_value:
+ * @v_int64: default 64 bit integer value
+ * Return value: (transfer full) a new GValue holding a gint64.
+ */
+
 GValue *
-arv_new_g_value_int64 (gint64 v_int64)
+arv_create_int64_g_value (gint64 v_int64)
 {
 	GValue *value = g_new0 (GValue, 1);
 
@@ -491,8 +532,14 @@ arv_new_g_value_int64 (gint64 v_int64)
 	return value;
 }
 
+/**
+ * arv_create_string_g_value:
+ * @v_string: default 64 bit integer value
+ * Return value: (transfer full) a new GValue holding a string.
+ */
+
 GValue *
-arv_new_g_value_string (const char *v_string)
+arv_create_string_g_value (const char *v_string)
 {
 	GValue *value = g_new0 (GValue, 1);
 
@@ -598,6 +645,14 @@ arv_copy_memory_with_endianess (void *to, size_t to_size, guint to_endianess,
 
 #define ARV_DECOMPRESS_CHUNK 16384
 
+/**
+ * arv_decompress:
+ * @input_buffer: compressed data
+ * @input_buffer: size of compressed data
+ * @output_size: (out): placeholder for inflated data
+ * Return value: (transfer full): a newly allocated buffer
+ **/
+
 void *
 arv_decompress (void *input_buffer, size_t input_size, size_t *output_size)
 {
diff --git a/src/arvtools.h b/src/arvtools.h
index ec1b2d5..e028bf2 100644
--- a/src/arvtools.h
+++ b/src/arvtools.h
@@ -75,6 +75,10 @@ arv_str_skip_colon_and_spaces (char **str)
 		(*str)++;
 }
 
+#define ARV_TYPE_VALUE (arv_value_get_type())
+
+GType arv_value_get_type (void);
+
 typedef struct _ArvValue ArvValue;
 struct _ArvValue {
 	GType type;
@@ -95,8 +99,8 @@ double 		arv_value_get_double 		(ArvValue *value);
 gboolean 	arv_value_holds_int64 		(ArvValue *value);
 double 		arv_value_holds_double 		(ArvValue *value);
 
-GValue * 	arv_new_g_value_int64 		(gint64 v_int64);
-GValue * 	arv_new_g_value_string 		(const char *v_string);
+GValue * 	arv_create_int64_g_value 	(gint64 v_int64);
+GValue * 	arv_create_string_g_value	(const char *v_string);
 void 		arv_free_g_value 		(GValue *value);
 void		arv_force_g_value_to_int64	(GValue *value, gint64 v_int64);
 void		arv_force_g_value_to_double	(GValue *value, double v_double);
diff --git a/src/arvzip.c b/src/arvzip.c
index c01c572..716f668 100644
--- a/src/arvzip.c
+++ b/src/arvzip.c
@@ -135,6 +135,13 @@ arv_zip_get_file_data (ArvZip *zip, ArvZipFile *zip_file)
 		GUINT16_FROM_LE_PTR (ptr + 28) + 30;
 }
 
+/**
+ * arv_zip_new: (skip)
+ * @buffer: zipped data
+ * @size: size of the zipped data
+ * Return value: a new #ArvZip instance
+ */
+
 ArvZip *
 arv_zip_new (const void *buffer, size_t size)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]