diff options
author | Damien Laniel <dlaniel@entrouvert.com> | 2007-04-11 12:04:19 +0000 |
---|---|---|
committer | Damien Laniel <dlaniel@entrouvert.com> | 2007-04-11 12:04:19 +0000 |
commit | c82cc5c950c61b8073531168acab1fd6dca07870 (patch) | |
tree | 1b5b8fd8906256e24367d66f5afab120a4b6789b | |
parent | 8f0c0a866ed6a13f9e68691af144eb2f78f0cdc7 (diff) | |
download | lasso-c82cc5c950c61b8073531168acab1fd6dca07870.tar.gz lasso-c82cc5c950c61b8073531168acab1fd6dca07870.tar.xz lasso-c82cc5c950c61b8073531168acab1fd6dca07870.zip |
implementing lasso_idwsf2_discovery_process_metadata_register_msg, not working yet
-rw-r--r-- | lasso/id-wsf-2.0/discovery.c | 42 | ||||
-rw-r--r-- | lasso/id-wsf-2.0/discovery.h | 17 | ||||
-rw-r--r-- | lasso/id-wsf-2.0/wsf2_profile.c | 38 | ||||
-rw-r--r-- | lasso/id-wsf-2.0/wsf2_profile.h | 3 | ||||
-rw-r--r-- | lasso/xml/id-wsf-2.0/Makefile.am | 8 | ||||
-rw-r--r-- | lasso/xml/id-wsf-2.0/disco_svc_md_register_response.c | 120 | ||||
-rw-r--r-- | lasso/xml/id-wsf-2.0/disco_svc_md_register_response.h | 78 | ||||
-rw-r--r-- | lasso/xml/id-wsf-2.0/util_status.c | 125 | ||||
-rw-r--r-- | lasso/xml/id-wsf-2.0/util_status.h | 79 | ||||
-rw-r--r-- | swig/Lasso-wsf2.i | 13 |
10 files changed, 514 insertions, 9 deletions
diff --git a/lasso/id-wsf-2.0/discovery.c b/lasso/id-wsf-2.0/discovery.c index 6b55d246..61203651 100644 --- a/lasso/id-wsf-2.0/discovery.c +++ b/lasso/id-wsf-2.0/discovery.c @@ -73,6 +73,14 @@ lasso_idwsf2_discovery_destroy(LassoIdwsf2Discovery *discovery) g_object_unref(G_OBJECT(discovery)); } +gchar * +lasso_idwsf2_discovery_get_metadata_dump(LassoIdwsf2Discovery *discovery) +{ + if (discovery->metadata == NULL) + return NULL; + return lasso_node_dump(LASSO_NODE(discovery->metadata)); +} + /** * lasso_discovery_init_query @@ -117,13 +125,43 @@ lasso_idwsf2_discovery_init_metadata_register(LassoIdwsf2Discovery *discovery, lasso_wsf2_profile_init_soap_request(LASSO_WSF2_PROFILE(discovery), LASSO_NODE(metadata_register)); - /* Get the url of the idp where we must send the soap request */ - LASSO_WSF2_PROFILE(discovery)->msg_url = g_strdup(disco_provider_id); + /* FIXME : Get the url of the disco service where we must send the soap request */ + /* LASSO_WSF2_PROFILE(discovery)->msg_url = g_strdup(disco_provider_id); */ printf(lasso_node_dump(LASSO_NODE(metadata_register))); return 0; } +gint +lasso_idwsf2_discovery_process_metadata_register_msg(LassoIdwsf2Discovery *discovery, const gchar *message) +{ + LassoDiscoSvcMDRegister *request; + int res = 0; + + g_return_val_if_fail(LASSO_IS_IDWSF2_DISCOVERY(discovery), + LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ); + g_return_val_if_fail(message != NULL, LASSO_PARAM_ERROR_INVALID_VALUE); + + res = lasso_wsf2_profile_process_soap_request_msg(LASSO_WSF2_PROFILE(discovery), message, + LASSO_IDWSF2_DISCO_HREF); + if (res != 0) + return res; + + request = LASSO_DISCO_SVC_MD_REGISTER(LASSO_WSF2_PROFILE(discovery)->request); + + if (request == NULL) + printf("\n\nrequest is NULL\n\n"); + + /* FIXME : foreach on the list instead */ + if (request != NULL && request->metadata_list != NULL + && g_list_first(request->metadata_list) != NULL) { + discovery->metadata = + LASSO_DISCO_SERVICE_METADATA(g_list_first(request->metadata_list)); + } + + return 0; +} + /*****************************************************************************/ /* private methods */ diff --git a/lasso/id-wsf-2.0/discovery.h b/lasso/id-wsf-2.0/discovery.h index 133974a2..211ed0e9 100644 --- a/lasso/id-wsf-2.0/discovery.h +++ b/lasso/id-wsf-2.0/discovery.h @@ -30,9 +30,11 @@ extern "C" { #endif /* __cplusplus */ +#include <lasso/id-wsf-2.0/wsf2_profile.h> + #include <lasso/xml/id-wsf-2.0/disco_query.h> #include <lasso/xml/id-wsf-2.0/disco_query_response.h> -#include <lasso/id-wsf-2.0/wsf2_profile.h> +#include <lasso/xml/id-wsf-2.0/disco_service_metadata.h> #define LASSO_TYPE_IDWSF2_DISCOVERY (lasso_idwsf2_discovery_get_type()) @@ -53,6 +55,9 @@ typedef struct _LassoIdwsf2DiscoveryPrivate LassoIdwsf2DiscoveryPrivate; struct _LassoIdwsf2Discovery { LassoWsf2Profile parent; + /* FIXME : Should be a list */ + LassoDiscoServiceMetadata *metadata; + /*< private >*/ LassoIdwsf2DiscoveryPrivate *private_data; }; @@ -67,12 +72,18 @@ LASSO_EXPORT LassoIdwsf2Discovery* lasso_idwsf2_discovery_new(LassoServer *serve LASSO_EXPORT void lasso_idwsf2_discovery_destroy(LassoIdwsf2Discovery *discovery); -LASSO_EXPORT gint lasso_idwsf2_discovery_init_query(LassoIdwsf2Discovery *discovery, - const gchar *security_mech_id); +LASSO_EXPORT gchar *lasso_idwsf2_discovery_get_metadata_dump(LassoIdwsf2Discovery *discovery); LASSO_EXPORT gint lasso_idwsf2_discovery_init_metadata_register(LassoIdwsf2Discovery *discovery, gchar *service_type, gchar *abstract, gchar *disco_provider_id); +LASSO_EXPORT gint lasso_idwsf2_discovery_process_metadata_register_msg( + LassoIdwsf2Discovery *discovery, const gchar *message); + +LASSO_EXPORT gint lasso_idwsf2_discovery_init_query(LassoIdwsf2Discovery *discovery, + const gchar *security_mech_id); + + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/lasso/id-wsf-2.0/wsf2_profile.c b/lasso/id-wsf-2.0/wsf2_profile.c index 3b8f548a..55edbd03 100644 --- a/lasso/id-wsf-2.0/wsf2_profile.c +++ b/lasso/id-wsf-2.0/wsf2_profile.c @@ -146,6 +146,44 @@ lasso_wsf2_profile_build_soap_request_msg(LassoWsf2Profile *profile) return 0; } +gint +lasso_wsf2_profile_process_soap_request_msg(LassoWsf2Profile *profile, const gchar *message, + const gchar *service_type) +{ + LassoDiscoServiceInstance *si; + LassoSoapBindingCorrelation *correlation; + LassoSoapEnvelope *envelope = NULL; + LassoSoapFault *fault = NULL; + gchar *messageId; + int res = 0; + xmlDoc *doc; + + g_return_val_if_fail(LASSO_IS_WSF2_PROFILE(profile), + LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ); + g_return_val_if_fail(message != NULL, LASSO_PARAM_ERROR_INVALID_VALUE); + + si = lasso_server_get_service(profile->server, (char *) service_type); + + doc = xmlParseMemory(message, strlen(message)); + + /* Get soap request and his message id */ + envelope = LASSO_SOAP_ENVELOPE(lasso_node_new_from_xmlNode(xmlDocGetRootElement(doc))); + + profile->request = LASSO_NODE(envelope->Body->any->data); + correlation = LASSO_SOAP_BINDING_CORRELATION(envelope->Header->Other->data); + messageId = correlation->messageID; + + /* Set soap response */ + envelope = lasso_wsf2_profile_build_soap_envelope(messageId, + LASSO_PROVIDER(profile->server)->ProviderID); + LASSO_WSF2_PROFILE(profile)->soap_envelope_response = envelope; + + xmlFreeDoc(doc); + + return res; +} + + /*****************************************************************************/ /* overrided parent class methods */ /*****************************************************************************/ diff --git a/lasso/id-wsf-2.0/wsf2_profile.h b/lasso/id-wsf-2.0/wsf2_profile.h index f9fb53c4..2cbb5fb3 100644 --- a/lasso/id-wsf-2.0/wsf2_profile.h +++ b/lasso/id-wsf-2.0/wsf2_profile.h @@ -83,6 +83,9 @@ LASSO_EXPORT LassoSoapEnvelope* lasso_wsf2_profile_build_soap_envelope(const cha LASSO_EXPORT gint lasso_wsf2_profile_build_soap_request_msg(LassoWsf2Profile *profile); +LASSO_EXPORT gint lasso_wsf2_profile_process_soap_request_msg(LassoWsf2Profile *profile, + const gchar *message, const gchar *service_type); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/lasso/xml/id-wsf-2.0/Makefile.am b/lasso/xml/id-wsf-2.0/Makefile.am index 3b0ca092..5caff126 100644 --- a/lasso/xml/id-wsf-2.0/Makefile.am +++ b/lasso/xml/id-wsf-2.0/Makefile.am @@ -16,7 +16,9 @@ liblasso_xml_id_wsf2_la_SOURCES = \ disco_service_context.c \ disco_svc_metadata.c \ disco_svc_md_register.c \ - soap_binding_framework.c + disco_svc_md_register_response.c \ + soap_binding_framework.c \ + util_status.c liblassoinclude_HEADERS = \ disco_endpoint_context.h \ @@ -26,4 +28,6 @@ liblassoinclude_HEADERS = \ disco_service_context.h \ disco_svc_metadata.h \ disco_svc_md_register.h \ - soap_binding_framework.h + disco_svc_md_register_response.h \ + soap_binding_framework.h \ + util_status.h diff --git a/lasso/xml/id-wsf-2.0/disco_svc_md_register_response.c b/lasso/xml/id-wsf-2.0/disco_svc_md_register_response.c new file mode 100644 index 00000000..51a70639 --- /dev/null +++ b/lasso/xml/id-wsf-2.0/disco_svc_md_register_response.c @@ -0,0 +1,120 @@ +/* $Id: disco_svc_md_register_response.c,v 1.0 2005/10/14 15:17:55 fpeters Exp $ + * + * Lasso - A free implementation of the Liberty Alliance specifications. + * + * Copyright (C) 2004-2007 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: See AUTHORS file in top-level directory. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "disco_svc_md_register_response.h" + +/* + * Schema fragment (liberty-idwsf-disco-svc-v2.0.xsd): + * + * <xs:complexType name="SvcMDRegisterResponseType"> + * <xs:sequence> + * + * <xs:element ref="lu:Status" /> + * <xs:element ref="SvcMDID" minOccurs="0" maxOccurs="unbounded" /> + * <xs:element ref="Keys" minOccurs="0" maxOccurs="unbounded" /> + * + * </xs:sequence> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "Status", SNIPPET_NODE, + G_STRUCT_OFFSET(LassoIdWsf2DiscoSvcMDRegisterResponse, Status), + "LassoIdWsf2UtilStatus" }, + { "SvcMDID", SNIPPET_LIST_CONTENT, + G_STRUCT_OFFSET(LassoIdWsf2DiscoSvcMDRegisterResponse, SvcMDID) }, + { "Keys", SNIPPET_LIST_NODES, + G_STRUCT_OFFSET(LassoIdWsf2DiscoSvcMDRegisterResponse, Keys) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoIdWsf2DiscoSvcMDRegisterResponse *node) +{ + node->Status = NULL; + node->SvcMDID = NULL; + node->Keys = NULL; +} + +static void +class_init(LassoIdWsf2DiscoSvcMDRegisterResponseClass *klass) +{ + LassoNodeClass *nclass = LASSO_NODE_CLASS(klass); + + parent_class = g_type_class_peek_parent(klass); + nclass->node_data = g_new0(LassoNodeClassData, 1); + lasso_node_class_set_nodename(nclass, "SvcMDRegisterResponse"); + lasso_node_class_set_ns(nclass, LASSO_IDWSF2_DISCO_HREF, LASSO_IDWSF2_DISCO_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_disco_svc_md_register_response_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoIdWsf2DiscoSvcMDRegisterResponseClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoIdWsf2DiscoSvcMDRegisterResponse), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoIdWsf2DiscoSvcMDRegisterResponse", &this_info, 0); + } + return this_type; +} + +/** + * lasso_disco_svc_md_register_response_new: + * + * Creates a new #LassoIdWsf2DiscoSvcMDRegisterResponse object. + * + * Return value: a newly created #LassoIdWsf2DiscoSvcMDRegisterResponse object + **/ +LassoNode* +lasso_disco_svc_md_register_response_new() +{ + return g_object_new(LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE, NULL); +} diff --git a/lasso/xml/id-wsf-2.0/disco_svc_md_register_response.h b/lasso/xml/id-wsf-2.0/disco_svc_md_register_response.h new file mode 100644 index 00000000..83d0b511 --- /dev/null +++ b/lasso/xml/id-wsf-2.0/disco_svc_md_register_response.h @@ -0,0 +1,78 @@ +/* $Id: disco_svc_md_register_response.h,v 1.0 2005/10/14 15:17:55 fpeters Exp $ + * + * Lasso - A free implementation of the Liberty Alliance specifications. + * + * Copyright (C) 2004-2007 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: See AUTHORS file in top-level directory. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LASSO_DISCO_SVC_MD_REGISTER_RESPONSE_H__ +#define __LASSO_DISCO_SVC_MD_REGISTER_RESPONSE_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> +#include "util_status.h" + +#define LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE (lasso_disco_svc_md_register_response_get_type()) +#define LASSO_DISCO_SVC_MD_REGISTER_RESPONSE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE, \ + LassoIdWsf2DiscoSvcMDRegisterResponse)) +#define LASSO_DISCO_SVC_MD_REGISTER_RESPONSE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE, \ + LassoIdWsf2DiscoSvcMDRegisterResponseClass)) +#define LASSO_IS_DISCO_SVC_MD_REGISTER_RESPONSE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE)) +#define LASSO_IS_DISCO_SVC_MD_REGISTER_RESPONSE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE)) +#define LASSO_DISCO_SVC_MD_REGISTER_RESPONSE_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCO_SVC_MD_REGISTER_RESPONSE, \ + LassoIdWsf2DiscoSvcMDRegisterResponseClass)) + +typedef struct _LassoIdWsf2DiscoSvcMDRegisterResponse LassoIdWsf2DiscoSvcMDRegisterResponse; +typedef struct _LassoIdWsf2DiscoSvcMDRegisterResponseClass LassoIdWsf2DiscoSvcMDRegisterResponseClass; + + +struct _LassoIdWsf2DiscoSvcMDRegisterResponse { + LassoNode parent; + + /*< public >*/ + /* elements */ + LassoIdWsf2UtilStatus *Status; + GList *SvcMDID; + GList *Keys; +}; + + +struct _LassoIdWsf2DiscoSvcMDRegisterResponseClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_disco_svc_md_register_response_get_type(void); +LASSO_EXPORT LassoNode* lasso_disco_svc_md_register_response_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_DISCO_SVC_MD_REGISTER_RESPONSE_H__ */ diff --git a/lasso/xml/id-wsf-2.0/util_status.c b/lasso/xml/id-wsf-2.0/util_status.c new file mode 100644 index 00000000..e0117f64 --- /dev/null +++ b/lasso/xml/id-wsf-2.0/util_status.c @@ -0,0 +1,125 @@ +/* $Id: util_status.c,v 1.0 2005/10/14 15:17:55 fpeters Exp $ + * + * Lasso - A free implementation of the Liberty Alliance specifications. + * + * Copyright (C) 2004-2007 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: See AUTHORS file in top-level directory. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "util_status.h" + +/* + * Schema fragment (liberty-idwsf-utility-v2.0.xsd): + * + * <xs:complexType name="StatusType"> + * <xs:annotation> + * <xs:documentation> + * A type that may be used for status codes. + * </xs:documentation> + * </xs:annotation> + * <xs:sequence> + * <xs:element ref="Status" minOccurs="0" maxOccurs="unbounded"/> + * </xs:sequence> + * <xs:attribute name="code" type="xs:string" use="required"/> + * <xs:attribute name="ref" type="IDReferenceType" use="optional"/> + * <xs:attribute name="comment" type="xs:string" use="optional"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "Status", SNIPPET_LIST_NODES, + G_STRUCT_OFFSET(LassoIdWsf2UtilStatus, Status) }, + { "code", SNIPPET_ATTRIBUTE, + G_STRUCT_OFFSET(LassoIdWsf2UtilStatus, code) }, + { "ref", SNIPPET_ATTRIBUTE, + G_STRUCT_OFFSET(LassoIdWsf2UtilStatus, ref) }, + { "comment", SNIPPET_ATTRIBUTE, + G_STRUCT_OFFSET(LassoIdWsf2UtilStatus, comment) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoIdWsf2UtilStatus *node) +{ + node->Status = NULL; + node->code = NULL; + node->ref = NULL; + node->comment = NULL; +} + +static void +class_init(LassoIdWsf2UtilStatusClass *klass) +{ + LassoNodeClass *nclass = LASSO_NODE_CLASS(klass); + + parent_class = g_type_class_peek_parent(klass); + nclass->node_data = g_new0(LassoNodeClassData, 1); + lasso_node_class_set_nodename(nclass, "Status"); + lasso_node_class_set_ns(nclass, LASSO_IDWSF2_UTIL_HREF, LASSO_IDWSF2_UTIL_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_util_status_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoIdWsf2UtilStatusClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoIdWsf2UtilStatus), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoIdWsf2UtilStatus", &this_info, 0); + } + return this_type; +} + +/** + * lasso_util_status_new: + * + * Creates a new #LassoIdWsf2UtilStatus object. + * + * Return value: a newly created #LassoIdWsf2UtilStatus object + **/ +LassoNode* +lasso_util_status_new() +{ + return g_object_new(LASSO_TYPE_UTIL_STATUS, NULL); +} diff --git a/lasso/xml/id-wsf-2.0/util_status.h b/lasso/xml/id-wsf-2.0/util_status.h new file mode 100644 index 00000000..66f050a5 --- /dev/null +++ b/lasso/xml/id-wsf-2.0/util_status.h @@ -0,0 +1,79 @@ +/* $Id: util_status.h,v 1.0 2005/10/14 15:17:55 fpeters Exp $ + * + * Lasso - A free implementation of the Liberty Alliance specifications. + * + * Copyright (C) 2004-2007 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: See AUTHORS file in top-level directory. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LASSO_UTIL_STATUS_H__ +#define __LASSO_UTIL_STATUS_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_UTIL_STATUS (lasso_util_status_get_type()) +#define LASSO_UTIL_STATUS(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_UTIL_STATUS, \ + LassoIdWsf2UtilStatus)) +#define LASSO_UTIL_STATUS_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_UTIL_STATUS, \ + LassoIdWsf2UtilStatusClass)) +#define LASSO_IS_UTIL_STATUS(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_UTIL_STATUS)) +#define LASSO_IS_UTIL_STATUS_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_UTIL_STATUS)) +#define LASSO_UTIL_STATUS_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_UTIL_STATUS, \ + LassoIdWsf2UtilStatusClass)) + +typedef struct _LassoIdWsf2UtilStatus LassoIdWsf2UtilStatus; +typedef struct _LassoIdWsf2UtilStatusClass LassoIdWsf2UtilStatusClass; + + +struct _LassoIdWsf2UtilStatus { + LassoNode parent; + + /*< public >*/ + /* elements */ + GList *Status; + /* attributes */ + char *code; + char *ref; + char *comment; +}; + + +struct _LassoIdWsf2UtilStatusClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_util_status_get_type(void); +LASSO_EXPORT LassoNode* lasso_util_status_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_UTIL_STATUS_H__ */ diff --git a/swig/Lasso-wsf2.i b/swig/Lasso-wsf2.i index ae0baaf8..992a6403 100644 --- a/swig/Lasso-wsf2.i +++ b/swig/Lasso-wsf2.i @@ -91,8 +91,15 @@ typedef struct { /* Methods */ THROW_ERROR() - int initMetadataRegister(char *service_type, char *abstract, - char *disco_provider_id); + gchar *getMetadataDump(); + END_THROW_ERROR() + + THROW_ERROR() + int initMetadataRegister(char *service_type, char *abstract, char *disco_provider_id); + END_THROW_ERROR() + + THROW_ERROR() + int processMetadataRegisterMsg(const gchar *message); END_THROW_ERROR() THROW_ERROR() @@ -156,7 +163,9 @@ typedef struct { /* Methods implementations */ +#define LassoIdwsf2Discovery_getMetadataDump lasso_idwsf2_discovery_get_metadata_dump #define LassoIdwsf2Discovery_initMetadataRegister lasso_idwsf2_discovery_init_metadata_register +#define LassoIdwsf2Discovery_processMetadataRegisterMsg lasso_idwsf2_discovery_process_metadata_register_msg #define LassoIdwsf2Discovery_initQuery lasso_idwsf2_discovery_init_query %} |