[aravis] Rename of name parameter to device_id.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] Rename of name parameter to device_id.
- Date: Mon, 27 Sep 2010 12:57:25 +0000 (UTC)
commit 3f7ad88569c57cf43dc24d2ea8640dd60339ffb9
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Mon Sep 27 14:57:07 2010 +0200
Rename of name parameter to device_id.
src/arvfakeinterface.c | 4 ++--
src/arvgvinterface.c | 6 +++---
src/arvinterface.c | 12 ++++++------
src/arvinterface.h | 4 ++--
src/arvsystem.c | 4 ++--
src/arvsystem.h | 2 +-
6 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/src/arvfakeinterface.c b/src/arvfakeinterface.c
index 70e0d79..cc2e31e 100644
--- a/src/arvfakeinterface.c
+++ b/src/arvfakeinterface.c
@@ -48,9 +48,9 @@ arv_fake_interface_update_device_list (ArvInterface *interface, GArray *device_i
}
static ArvDevice *
-arv_fake_interface_open_device (ArvInterface *interface, const char *name)
+arv_fake_interface_open_device (ArvInterface *interface, const char *device_id)
{
- if (g_strcmp0 (name, ARV_FAKE_DEVICE_ID) == 0)
+ if (g_strcmp0 (device_id, ARV_FAKE_DEVICE_ID) == 0)
return arv_fake_device_new ("1");
return NULL;
diff --git a/src/arvgvinterface.c b/src/arvgvinterface.c
index ad6060d..e53d740 100644
--- a/src/arvgvinterface.c
+++ b/src/arvgvinterface.c
@@ -300,7 +300,7 @@ arv_gv_interface_update_device_list (ArvInterface *interface, GArray *device_ids
}
static ArvDevice *
-arv_gv_interface_open_device (ArvInterface *interface, const char *name)
+arv_gv_interface_open_device (ArvInterface *interface, const char *device_id)
{
ArvGvInterface *gv_interface;
ArvDevice *device = NULL;
@@ -309,14 +309,14 @@ arv_gv_interface_open_device (ArvInterface *interface, const char *name)
gv_interface = ARV_GV_INTERFACE (interface);
- if (name == NULL) {
+ if (device_id == NULL) {
GList *device_list;
device_list = g_hash_table_get_values (gv_interface->priv->devices);
device_infos = device_list != NULL ? device_list->data : NULL;
g_list_free (device_list);
} else
- device_infos = g_hash_table_lookup (gv_interface->priv->devices, name);
+ device_infos = g_hash_table_lookup (gv_interface->priv->devices, device_id);
if (device_infos == NULL)
return NULL;
diff --git a/src/arvinterface.c b/src/arvinterface.c
index 4809925..757988a 100644
--- a/src/arvinterface.c
+++ b/src/arvinterface.c
@@ -26,7 +26,7 @@
*
* #ArvCamera is an abstract base class for camera discovery. It maintains a
* list of the available devices and help to instantiate the corresponding
- * #ArvDevice object. If user already knows he name of the device, he should
+ * #ArvDevice object. If user already knows the device id of the device, he should
* not worry about this class and just use arv_camera_new() or
* arv_open_device().
*/
@@ -99,26 +99,26 @@ arv_interface_get_device_id (ArvInterface *interface, unsigned int index)
/**
* arv_interface_open_device
* @interface: a #ArvInterface
- * @name: device unique id or name
+ * @device_id: device unique id
*
- * Creates a new #ArvDevice object corresponding to the given name.
+ * Creates a new #ArvDevice object corresponding to the given id.
**/
ArvDevice *
-arv_interface_open_device (ArvInterface *interface, const char *name)
+arv_interface_open_device (ArvInterface *interface, const char *device_id)
{
ArvDevice *device;
g_return_val_if_fail (ARV_IS_INTERFACE (interface), NULL);
- device = ARV_INTERFACE_GET_CLASS (interface)->open_device (interface, name);
+ device = ARV_INTERFACE_GET_CLASS (interface)->open_device (interface, device_id);
if (device != NULL)
return device;
arv_interface_update_device_list (interface);
- return ARV_INTERFACE_GET_CLASS (interface)->open_device (interface, name);
+ return ARV_INTERFACE_GET_CLASS (interface)->open_device (interface, device_id);
}
static void
diff --git a/src/arvinterface.h b/src/arvinterface.h
index 343a39b..48fead8 100644
--- a/src/arvinterface.h
+++ b/src/arvinterface.h
@@ -47,7 +47,7 @@ struct _ArvInterfaceClass {
GObjectClass parent_class;
void (*update_device_list) (ArvInterface *interface, GArray *device_ids);
- ArvDevice * (*open_device) (ArvInterface *interface, const char *name);
+ ArvDevice * (*open_device) (ArvInterface *interface, const char *device_id);
};
GType arv_interface_get_type (void);
@@ -55,7 +55,7 @@ GType arv_interface_get_type (void);
void arv_interface_update_device_list (ArvInterface *interface);
unsigned int arv_interface_get_n_devices (ArvInterface *interface);
const char * arv_interface_get_device_id (ArvInterface *interface, unsigned int index);
-ArvDevice * arv_interface_open_device (ArvInterface *interface, const char *name);
+ArvDevice * arv_interface_open_device (ArvInterface *interface, const char *device_id);
G_END_DECLS
diff --git a/src/arvsystem.c b/src/arvsystem.c
index 0722fe7..aa2c6c2 100644
--- a/src/arvsystem.c
+++ b/src/arvsystem.c
@@ -102,7 +102,7 @@ arv_get_device_id (unsigned int index)
}
ArvDevice *
-arv_open_device (const char *name)
+arv_open_device (const char *device_id)
{
unsigned int i;
@@ -111,7 +111,7 @@ arv_open_device (const char *name)
ArvDevice *device;
interface = interfaces[i].get_interface_instance ();
- device = arv_interface_open_device (interface, name);
+ device = arv_interface_open_device (interface, device_id);
if (device != NULL)
return device;
}
diff --git a/src/arvsystem.h b/src/arvsystem.h
index 0c27335..9fe75a0 100644
--- a/src/arvsystem.h
+++ b/src/arvsystem.h
@@ -34,7 +34,7 @@ void arv_update_device_list (void);
unsigned int arv_get_n_devices (void);
const char * arv_get_device_id (unsigned int index);
-ArvDevice * arv_open_device (const char *name);
+ArvDevice * arv_open_device (const char *device_id);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]