From a7faef63d55ba76fd8bd0f6ae6c403f94e3fe58c Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 11 Apr 2011 16:00:09 +0200 Subject: Move definitions out of structure --- src/uca.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/uca.c') diff --git a/src/uca.c b/src/uca.c index d6d2faf..7b6cef4 100644 --- a/src/uca.c +++ b/src/uca.c @@ -208,12 +208,14 @@ void uca_destroy(struct uca *u) uca_unlock(); } -enum uca_property_ids uca_get_property_id(const char *property_name) +uint32_t uca_get_property_id(const char *property_name, enum uca_property_ids *prop_id) { int i = 0; while (property_map[i].name != NULL) { - if (!strcmp(property_map[i].name, property_name)) - return i; + if (!strcmp(property_map[i].name, property_name)) { + *prop_id = (enum uca_property_ids) i; + return UCA_NO_ERROR; + } i++; } return UCA_ERR_CAMERA | UCA_ERR_PROP | UCA_ERR_INVALID; -- cgit v1.2.3