[aravis] genicam: actually use the Value or pValue element content.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] genicam: actually use the Value or pValue element content.
- Date: Sat, 3 Apr 2010 08:47:47 +0000 (UTC)
commit 1bcdef03bd8a6c1cd39b4d95161db1a3036612cb
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Fri Apr 2 20:10:30 2010 +0200
genicam: actually use the Value or pValue element content.
src/arvgcenumeration.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/arvgcenumeration.c b/src/arvgcenumeration.c
index b161035..8970719 100644
--- a/src/arvgcenumeration.c
+++ b/src/arvgcenumeration.c
@@ -23,6 +23,7 @@
#include <arvgcenumeration.h>
#include <arvgcenumentry.h>
#include <arvgc.h>
+#include <arvtools.h>
#include <string.h>
static GObjectClass *parent_class = NULL;
@@ -41,10 +42,13 @@ arv_gc_enumeration_can_add_child (ArvGcNode *node, ArvGcNode *child)
static void
arv_gc_enumeration_add_element (ArvGcNode *node, const char *name, const char *content, const char **attributes)
{
-/* ArvGcEnumeration *gc_enumeration = ARV_GC_ENUMERATION (node);*/
+ ArvGcEnumeration *gc_enumeration = ARV_GC_ENUMERATION (node);
- if (strcmp (name, "pValue") == 0) {
- g_warning ("TODO");
+ if (strcmp (name, "Value") == 0) {
+ arv_force_g_value_to_int64 (&gc_enumeration->value,
+ g_ascii_strtoll (content, NULL, 0));
+ } else if (strcmp (name, "pValue") == 0) {
+ arv_force_g_value_to_string (&gc_enumeration->value, content);
} else
ARV_GC_NODE_CLASS (parent_class)->add_element (node, name, content, attributes);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]