summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Laniel <dlaniel@entrouvert.com>2007-06-07 12:49:42 +0000
committerDamien Laniel <dlaniel@entrouvert.com>2007-06-07 12:49:42 +0000
commite89552953e3eca5a96a23ea0b569df070a827fce (patch)
tree4543996615c9f46ec189344e40f7b299ffdc974c
parentcb00d56e4efd8ae21c05024fdd040edd7f42d73d (diff)
added lasso_idwsf2_data_service_get_attribute_string
-rw-r--r--lasso/id-wsf-2.0/data_service.c12
-rw-r--r--lasso/id-wsf-2.0/data_service.h3
-rw-r--r--swig/Lasso-wsf2.i4
3 files changed, 17 insertions, 2 deletions
diff --git a/lasso/id-wsf-2.0/data_service.c b/lasso/id-wsf-2.0/data_service.c
index 56937efd..1247fd69 100644
--- a/lasso/id-wsf-2.0/data_service.c
+++ b/lasso/id-wsf-2.0/data_service.c
@@ -228,8 +228,7 @@ lasso_idwsf2_data_service_process_query_response_msg(LassoIdWsf2DataService *ser
}
xmlNode*
-lasso_idwsf2_data_service_get_attribute_node(LassoIdWsf2DataService *service,
- const gchar *item_id)
+lasso_idwsf2_data_service_get_attribute_node(LassoIdWsf2DataService *service, const gchar *item_id)
{
LassoWsf2Profile *profile = LASSO_WSF2_PROFILE(service);
LassoIdWsf2DstRefQueryResponse *response;
@@ -269,6 +268,15 @@ lasso_idwsf2_data_service_get_attribute_node(LassoIdWsf2DataService *service,
return xmlCopyNode(data->any->data, 1);
}
+gchar*
+lasso_idwsf2_data_service_get_attribute_string(LassoIdWsf2DataService *service,
+ const gchar *item_id)
+{
+ xmlNode *node = lasso_idwsf2_data_service_get_attribute_node(service, item_id);
+
+ return (gchar*)xmlNodeGetContent(node);
+}
+
/*****************************************************************************/
/* private methods */
/*****************************************************************************/
diff --git a/lasso/id-wsf-2.0/data_service.h b/lasso/id-wsf-2.0/data_service.h
index bfcb7a3a..358a20f0 100644
--- a/lasso/id-wsf-2.0/data_service.h
+++ b/lasso/id-wsf-2.0/data_service.h
@@ -93,6 +93,9 @@ LASSO_EXPORT gint lasso_idwsf2_data_service_process_query_response_msg(
LASSO_EXPORT xmlNode* lasso_idwsf2_data_service_get_attribute_node(LassoIdWsf2DataService *service,
const gchar *item_id);
+
+LASSO_EXPORT gchar* lasso_idwsf2_data_service_get_attribute_string(LassoIdWsf2DataService *service,
+ const gchar *item_id);
#ifdef __cplusplus
}
diff --git a/swig/Lasso-wsf2.i b/swig/Lasso-wsf2.i
index f42cccb4..e4a87c1a 100644
--- a/swig/Lasso-wsf2.i
+++ b/swig/Lasso-wsf2.i
@@ -373,6 +373,9 @@ typedef struct {
%newobject getAttributeNode;
char* getAttributeNode(const char *item_id = NULL);
+
+ %newobject getAttributeString;
+ char* getAttributeString(const char *item_id = NULL);
}
%{
@@ -443,6 +446,7 @@ typedef struct {
#define LassoIdWsf2DataService_processQueryResponseMsg lasso_idwsf2_data_service_process_query_response_msg
#define LassoIdWsf2DataService_getAttributeNode(self, itemId) \
get_xml_string(lasso_idwsf2_data_service_get_attribute_node(self, itemId))
+#define LassoIdWsf2DataService_getAttributeString lasso_idwsf2_data_service_get_attribute_string
%}