diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2007-04-11 13:10:20 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2007-04-11 13:10:20 +0000 |
| commit | dc25a012e95b482f20399fe96a77569b1f24e361 (patch) | |
| tree | 3bdda110a60a95f295cb4da61789bcccebdc2807 | |
| parent | 7ac97ec93bde8884ec8c0ef5bd92f2e46bea0372 (diff) | |
added WS-Addr classes
| -rw-r--r-- | configure.ac | 1 | ||||
| -rw-r--r-- | lasso/xml/Makefile.am | 2 | ||||
| -rw-r--r-- | lasso/xml/strings.h | 8 | ||||
| -rw-r--r-- | lasso/xml/ws/Makefile.am | 32 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_any.c | 108 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_any.h | 75 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_qname.c | 131 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_qname.h | 78 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_unsigned_long.c | 112 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_unsigned_long.h | 77 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_uri.c | 131 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_attributed_uri.h | 78 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_endpoint_reference.c | 123 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_endpoint_reference.h | 82 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_metadata.c | 108 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_metadata.h | 75 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_problem_action.c | 116 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_problem_action.h | 79 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_reference_parameters.c | 108 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_reference_parameters.h | 75 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_relates_to.c | 135 | ||||
| -rw-r--r-- | lasso/xml/ws/wsa_relates_to.h | 79 |
22 files changed, 1810 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 7bb71d85..d9087ed4 100644 --- a/configure.ac +++ b/configure.ac @@ -879,6 +879,7 @@ lasso/id-wsf-2.0/Makefile lasso/xml/Makefile lasso/xml/saml-2.0/Makefile lasso/xml/id-wsf-2.0/Makefile +lasso/xml/ws/Makefile perl/Makefile php/Makefile php5/Makefile diff --git a/lasso/xml/Makefile.am b/lasso/xml/Makefile.am index 35617848..5e167f7d 100644 --- a/lasso/xml/Makefile.am +++ b/lasso/xml/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = saml-2.0 id-wsf-2.0 +SUBDIRS = saml-2.0 id-wsf-2.0 ws liblassoincludedir = $(includedir)/lasso/xml diff --git a/lasso/xml/strings.h b/lasso/xml/strings.h index 99281544..4e99db45 100644 --- a/lasso/xml/strings.h +++ b/lasso/xml/strings.h @@ -295,9 +295,7 @@ #define LASSO_SOAP_ENV_ACTOR "http://schemas.xmlsoap.org/soap/actor/next" #define LASSO_SOAP_BINDING_HREF "urn:liberty:sb:2003-08" -#define LASSO_IDWSF2_SOAP_BINDING_HREF "urn:liberty:sb:2006-08" #define LASSO_SOAP_BINDING_PREFIX "sb" -#define LASSO_IDWSF2_SOAP_BINDING_PREFIX "sb" #define LASSO_SOAP_BINDING_EXT_HREF "urn:liberty:sb:2004-04" #define LASSO_SOAP_BINDING_EXT_PREFIX "sbe" @@ -503,6 +501,8 @@ #define LASSO_IDWSF2_SEC_HREF "urn:liberty:security:2006-08" #define LASSO_IDWSF2_SEC_PREFIX "sec" +#define LASSO_IDWSF2_SOAP_BINDING_HREF "urn:liberty:sb:2006-08" +#define LASSO_IDWSF2_SOAP_BINDING_PREFIX "sb2" /*****************************************************************************/ /* Others */ @@ -512,6 +512,10 @@ #define LASSO_XSI_HREF "http://www.w3.org/2001/XMLSchema-instance" #define LASSO_XSI_PREFIX "xsi" +/* WS-Addr */ +#define LASSO_WSA_HREF "http://www.w3.org/2005/08/addressing" +#define LASSO_WSA_PREFIX "wsa" + #define LASSO_SOAP_FAULT_CODE_SERVER "Server" #endif /* __LASSO_STRINGS_H__ */ diff --git a/lasso/xml/ws/Makefile.am b/lasso/xml/ws/Makefile.am new file mode 100644 index 00000000..e67c0195 --- /dev/null +++ b/lasso/xml/ws/Makefile.am @@ -0,0 +1,32 @@ +liblassoincludedir = $(includedir)/lasso/xml/ws + +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lasso \ + $(LASSO_CORE_CFLAGS) \ + -DG_LOG_DOMAIN=\"lasso\" + +noinst_LTLIBRARIES = liblasso-xml-ws.la + +liblasso_xml_ws_la_SOURCES = \ + wsa_attributed_any.c \ + wsa_attributed_qname.c \ + wsa_attributed_unsigned_long.c \ + wsa_attributed_uri.c \ + wsa_endpoint_reference.c \ + wsa_metadata.c \ + wsa_problem_action.c \ + wsa_reference_parameters.c \ + wsa_relates_to.c + +liblassoinclude_HEADERS = \ + wsa_attributed_any.h \ + wsa_attributed_qname.h \ + wsa_attributed_unsigned_long.h \ + wsa_attributed_uri.h \ + wsa_endpoint_reference.h \ + wsa_metadata.h \ + wsa_problem_action.h \ + wsa_reference_parameters.h \ + wsa_relates_to.h + diff --git a/lasso/xml/ws/wsa_attributed_any.c b/lasso/xml/ws/wsa_attributed_any.c new file mode 100644 index 00000000..4ff54fe0 --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_any.c @@ -0,0 +1,108 @@ +/* $Id: wsa_attributed_any.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 "wsa_attributed_any.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="AttributedAnyType" mixed="false"> + * <xs:sequence> + * <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/> + * </xs:sequence> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrAttributedAny, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrAttributedAny *node) +{ +} + +static void +class_init(LassoWsAddrAttributedAnyClass *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, "AttributedAny"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_attributed_any_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrAttributedAnyClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrAttributedAny), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrAttributedAny", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_attributed_any_new: + * + * Creates a new #LassoWsAddrAttributedAny object. + * + * Return value: a newly created #LassoWsAddrAttributedAny object + **/ +LassoNode* +lasso_wsa_attributed_any_new() +{ + return g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_ANY, NULL); +} diff --git a/lasso/xml/ws/wsa_attributed_any.h b/lasso/xml/ws/wsa_attributed_any.h new file mode 100644 index 00000000..2e2dfe7d --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_any.h @@ -0,0 +1,75 @@ +/* $Id: wsa_attributed_any.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_WSA_ATTRIBUTED_ANY_H__ +#define __LASSO_WSA_ATTRIBUTED_ANY_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_ATTRIBUTED_ANY (lasso_wsa_attributed_any_get_type()) +#define LASSO_WSA_ATTRIBUTED_ANY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_ATTRIBUTED_ANY, \ + LassoWsAddrAttributedAny)) +#define LASSO_WSA_ATTRIBUTED_ANY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_ATTRIBUTED_ANY, \ + LassoWsAddrAttributedAnyClass)) +#define LASSO_IS_WSA_ATTRIBUTED_ANY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_ATTRIBUTED_ANY)) +#define LASSO_IS_WSA_ATTRIBUTED_ANY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_ATTRIBUTED_ANY)) +#define LASSO_WSA_ATTRIBUTED_ANY_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_ATTRIBUTED_ANY, \ + LassoWsAddrAttributedAnyClass)) + +typedef struct _LassoWsAddrAttributedAny LassoWsAddrAttributedAny; +typedef struct _LassoWsAddrAttributedAnyClass LassoWsAddrAttributedAnyClass; + + +struct _LassoWsAddrAttributedAny { + LassoNode parent; + + /*< public >*/ + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrAttributedAnyClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_attributed_any_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_attributed_any_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_ATTRIBUTED_ANY_H__ */ diff --git a/lasso/xml/ws/wsa_attributed_qname.c b/lasso/xml/ws/wsa_attributed_qname.c new file mode 100644 index 00000000..d23c38fb --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_qname.c @@ -0,0 +1,131 @@ +/* $Id: wsa_attributed_qname.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 "wsa_attributed_qname.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="AttributedQNameType" mixed="false"> + * <xs:simpleContent> + * <xs:extension base="xs:QName"> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:extension> + * </xs:simpleContent> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "content", SNIPPET_CONTENT, + G_STRUCT_OFFSET(LassoWsAddrAttributedQName, content) }, + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrAttributedQName, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrAttributedQName *node) +{ + node->content = NULL; +} + +static void +class_init(LassoWsAddrAttributedQNameClass *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, "AttributedQName"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_attributed_qname_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrAttributedQNameClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrAttributedQName), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrAttributedQName", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_attributed_qname_new: + * + * Creates a new #LassoWsAddrAttributedQName object. + * + * Return value: a newly created #LassoWsAddrAttributedQName object + **/ +LassoNode* +lasso_wsa_attributed_qname_new() +{ + return g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_QNAME, NULL); +} + + +/** + * lasso_wsa_attributed_qname_new_with_string: + * @content: + * + * Creates a new #LassoWsAddrAttributedQName object and initializes it + * with @content. + * + * Return value: a newly created #LassoWsAddrAttributedQName object + **/ +LassoNode* +lasso_wsa_attributed_qname_new_with_string(char *content) +{ + LassoWsAddrAttributedQName *object; + object = g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_QNAME, NULL); + object->content = g_strdup(content); + return LASSO_NODE(object); +} diff --git a/lasso/xml/ws/wsa_attributed_qname.h b/lasso/xml/ws/wsa_attributed_qname.h new file mode 100644 index 00000000..0481b9e6 --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_qname.h @@ -0,0 +1,78 @@ +/* $Id: wsa_attributed_qname.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_WSA_ATTRIBUTED_QNAME_H__ +#define __LASSO_WSA_ATTRIBUTED_QNAME_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_ATTRIBUTED_QNAME (lasso_wsa_attributed_qname_get_type()) +#define LASSO_WSA_ATTRIBUTED_QNAME(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_ATTRIBUTED_QNAME, \ + LassoWsAddrAttributedQName)) +#define LASSO_WSA_ATTRIBUTED_QNAME_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_ATTRIBUTED_QNAME, \ + LassoWsAddrAttributedQNameClass)) +#define LASSO_IS_WSA_ATTRIBUTED_QNAME(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_ATTRIBUTED_QNAME)) +#define LASSO_IS_WSA_ATTRIBUTED_QNAME_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_ATTRIBUTED_QNAME)) +#define LASSO_WSA_ATTRIBUTED_QNAME_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_ATTRIBUTED_QNAME, \ + LassoWsAddrAttributedQNameClass)) + +typedef struct _LassoWsAddrAttributedQName LassoWsAddrAttributedQName; +typedef struct _LassoWsAddrAttributedQNameClass LassoWsAddrAttributedQNameClass; + + +struct _LassoWsAddrAttributedQName { + LassoNode parent; + + /*< public >*/ + /* elements */ + char *content; + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrAttributedQNameClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_attributed_qname_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_attributed_qname_new(void); + +LASSO_EXPORT LassoNode* lasso_wsa_attributed_qname_new_with_string(char *content); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_ATTRIBUTED_QNAME_H__ */ diff --git a/lasso/xml/ws/wsa_attributed_unsigned_long.c b/lasso/xml/ws/wsa_attributed_unsigned_long.c new file mode 100644 index 00000000..0b956fd2 --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_unsigned_long.c @@ -0,0 +1,112 @@ +/* $Id: wsa_attributed_unsigned_long.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 "wsa_attributed_unsigned_long.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="AttributedUnsignedLongType" mixed="false"> + * <xs:simpleContent> + * <xs:extension base="xs:unsignedLong"> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:extension> + * </xs:simpleContent> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "content", SNIPPET_TEXT_CHILD | SNIPPET_INTEGER, + G_STRUCT_OFFSET(LassoWsAddrAttributedUnsignedLong, content) }, + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrAttributedUnsignedLong, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrAttributedUnsignedLong *node) +{ + node->content = NULL; +} + +static void +class_init(LassoWsAddrAttributedUnsignedLongClass *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, "AttributedUnsignedLong"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_attributed_unsigned_long_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrAttributedUnsignedLongClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrAttributedUnsignedLong), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrAttributedUnsignedLong", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_attributed_unsigned_long_new: + * + * Creates a new #LassoWsAddrAttributedUnsignedLong object. + * + * Return value: a newly created #LassoWsAddrAttributedUnsignedLong object + **/ +LassoNode* +lasso_wsa_attributed_unsigned_long_new() +{ + return g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG, NULL); +} diff --git a/lasso/xml/ws/wsa_attributed_unsigned_long.h b/lasso/xml/ws/wsa_attributed_unsigned_long.h new file mode 100644 index 00000000..f3064c2b --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_unsigned_long.h @@ -0,0 +1,77 @@ +/* $Id: wsa_attributed_unsigned_long.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_WSA_ATTRIBUTED_UNSIGNED_LONG_H__ +#define __LASSO_WSA_ATTRIBUTED_UNSIGNED_LONG_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG (lasso_wsa_attributed_unsigned_long_get_type()) +#define LASSO_WSA_ATTRIBUTED_UNSIGNED_LONG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG, \ + LassoWsAddrAttributedUnsignedLong)) +#define LASSO_WSA_ATTRIBUTED_UNSIGNED_LONG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG, \ + LassoWsAddrAttributedUnsignedLongClass)) +#define LASSO_IS_WSA_ATTRIBUTED_UNSIGNED_LONG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG)) +#define LASSO_IS_WSA_ATTRIBUTED_UNSIGNED_LONG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG)) +#define LASSO_WSA_ATTRIBUTED_UNSIGNED_LONG_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_ATTRIBUTED_UNSIGNED_LONG, \ + LassoWsAddrAttributedUnsignedLongClass)) + +typedef struct _LassoWsAddrAttributedUnsignedLong LassoWsAddrAttributedUnsignedLong; +typedef struct _LassoWsAddrAttributedUnsignedLongClass LassoWsAddrAttributedUnsignedLongClass; + + +struct _LassoWsAddrAttributedUnsignedLong { + LassoNode parent; + + /*< public >*/ + /* elements */ + int content; + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrAttributedUnsignedLongClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_attributed_unsigned_long_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_attributed_unsigned_long_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_ATTRIBUTED_UNSIGNED_LONG_H__ */ diff --git a/lasso/xml/ws/wsa_attributed_uri.c b/lasso/xml/ws/wsa_attributed_uri.c new file mode 100644 index 00000000..2b45b89b --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_uri.c @@ -0,0 +1,131 @@ +/* $Id: wsa_attributed_uri.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 "wsa_attributed_uri.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="AttributedURIType" mixed="false"> + * <xs:simpleContent> + * <xs:extension base="xs:anyURI"> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:extension> + * </xs:simpleContent> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "content", SNIPPET_CONTENT, + G_STRUCT_OFFSET(LassoWsAddrAttributedURI, content) }, + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrAttributedURI, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrAttributedURI *node) +{ + node->content = NULL; +} + +static void +class_init(LassoWsAddrAttributedURIClass *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, "AttributedURI"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_attributed_uri_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrAttributedURIClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrAttributedURI), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrAttributedURI", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_attributed_uri_new: + * + * Creates a new #LassoWsAddrAttributedURI object. + * + * Return value: a newly created #LassoWsAddrAttributedURI object + **/ +LassoNode* +lasso_wsa_attributed_uri_new() +{ + return g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_URI, NULL); +} + + +/** + * lasso_wsa_attributed_uri_new_with_string: + * @content: + * + * Creates a new #LassoWsAddrAttributedURI object and initializes it + * with @content. + * + * Return value: a newly created #LassoWsAddrAttributedURI object + **/ +LassoNode* +lasso_wsa_attributed_uri_new_with_string(char *content) +{ + LassoWsAddrAttributedURI *object; + object = g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_URI, NULL); + object->content = g_strdup(content); + return LASSO_NODE(object); +} diff --git a/lasso/xml/ws/wsa_attributed_uri.h b/lasso/xml/ws/wsa_attributed_uri.h new file mode 100644 index 00000000..cd5ad5f2 --- /dev/null +++ b/lasso/xml/ws/wsa_attributed_uri.h @@ -0,0 +1,78 @@ +/* $Id: wsa_attributed_uri.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_WSA_ATTRIBUTED_URI_H__ +#define __LASSO_WSA_ATTRIBUTED_URI_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_ATTRIBUTED_URI (lasso_wsa_attributed_uri_get_type()) +#define LASSO_WSA_ATTRIBUTED_URI(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_ATTRIBUTED_URI, \ + LassoWsAddrAttributedURI)) +#define LASSO_WSA_ATTRIBUTED_URI_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_ATTRIBUTED_URI, \ + LassoWsAddrAttributedURIClass)) +#define LASSO_IS_WSA_ATTRIBUTED_URI(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_ATTRIBUTED_URI)) +#define LASSO_IS_WSA_ATTRIBUTED_URI_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_ATTRIBUTED_URI)) +#define LASSO_WSA_ATTRIBUTED_URI_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_ATTRIBUTED_URI, \ + LassoWsAddrAttributedURIClass)) + +typedef struct _LassoWsAddrAttributedURI LassoWsAddrAttributedURI; +typedef struct _LassoWsAddrAttributedURIClass LassoWsAddrAttributedURIClass; + + +struct _LassoWsAddrAttributedURI { + LassoNode parent; + + /*< public >*/ + /* elements */ + char *content; + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrAttributedURIClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_attributed_uri_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_attributed_uri_new(void); + +LASSO_EXPORT LassoNode* lasso_wsa_attributed_uri_new_with_string(char *content); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_ATTRIBUTED_URI_H__ */ diff --git a/lasso/xml/ws/wsa_endpoint_reference.c b/lasso/xml/ws/wsa_endpoint_reference.c new file mode 100644 index 00000000..9c91cd19 --- /dev/null +++ b/lasso/xml/ws/wsa_endpoint_reference.c @@ -0,0 +1,123 @@ +/* $Id: wsa_endpoint_reference.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 "wsa_endpoint_reference.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="EndpointReferenceType" mixed="false"> + * <xs:sequence> + * <xs:element name="Address" type="tns:AttributedURIType"/> + * <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/> + * <xs:element ref="tns:Metadata" minOccurs="0"/> + * <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + * </xs:sequence> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "Address", SNIPPET_NODE, + G_STRUCT_OFFSET(LassoWsAddrEndpointReference, Address), + "LassoWsAddrAttributedURI" }, + { "ReferenceParameters", SNIPPET_NODE, + G_STRUCT_OFFSET(LassoWsAddrEndpointReference, ReferenceParameters), + "LassoWsAddrReferenceParameters" }, + { "Metadata", SNIPPET_NODE, + G_STRUCT_OFFSET(LassoWsAddrEndpointReference, Metadata), + "LassoWsAddrMetadata" }, + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrEndpointReference, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrEndpointReference *node) +{ + node->Address = NULL; + node->ReferenceParameters = NULL; + node->Metadata = NULL; +} + +static void +class_init(LassoWsAddrEndpointReferenceClass *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, "EndpointReference"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_endpoint_reference_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrEndpointReferenceClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrEndpointReference), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrEndpointReference", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_endpoint_reference_new: + * + * Creates a new #LassoWsAddrEndpointReference object. + * + * Return value: a newly created #LassoWsAddrEndpointReference object + **/ +LassoNode* +lasso_wsa_endpoint_reference_new() +{ + return g_object_new(LASSO_TYPE_WSA_ENDPOINT_REFERENCE, NULL); +} diff --git a/lasso/xml/ws/wsa_endpoint_reference.h b/lasso/xml/ws/wsa_endpoint_reference.h new file mode 100644 index 00000000..bf2eb8fa --- /dev/null +++ b/lasso/xml/ws/wsa_endpoint_reference.h @@ -0,0 +1,82 @@ +/* $Id: wsa_endpoint_reference.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_WSA_ENDPOINT_REFERENCE_H__ +#define __LASSO_WSA_ENDPOINT_REFERENCE_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> +#include "wsa_attributed_uri.h" +#include "wsa_metadata.h" +#include "wsa_reference_parameters.h" + +#define LASSO_TYPE_WSA_ENDPOINT_REFERENCE (lasso_wsa_endpoint_reference_get_type()) +#define LASSO_WSA_ENDPOINT_REFERENCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_ENDPOINT_REFERENCE, \ + LassoWsAddrEndpointReference)) +#define LASSO_WSA_ENDPOINT_REFERENCE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_ENDPOINT_REFERENCE, \ + LassoWsAddrEndpointReferenceClass)) +#define LASSO_IS_WSA_ENDPOINT_REFERENCE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_ENDPOINT_REFERENCE)) +#define LASSO_IS_WSA_ENDPOINT_REFERENCE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_ENDPOINT_REFERENCE)) +#define LASSO_WSA_ENDPOINT_REFERENCE_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_ENDPOINT_REFERENCE, \ + LassoWsAddrEndpointReferenceClass)) + +typedef struct _LassoWsAddrEndpointReference LassoWsAddrEndpointReference; +typedef struct _LassoWsAddrEndpointReferenceClass LassoWsAddrEndpointReferenceClass; + + +struct _LassoWsAddrEndpointReference { + LassoNode parent; + + /*< public >*/ + /* elements */ + LassoWsAddrAttributedURI *Address; + LassoWsAddrReferenceParameters *ReferenceParameters; + LassoWsAddrMetadata *Metadata; + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrEndpointReferenceClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_endpoint_reference_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_endpoint_reference_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_ENDPOINT_REFERENCE_H__ */ diff --git a/lasso/xml/ws/wsa_metadata.c b/lasso/xml/ws/wsa_metadata.c new file mode 100644 index 00000000..3b69bae9 --- /dev/null +++ b/lasso/xml/ws/wsa_metadata.c @@ -0,0 +1,108 @@ +/* $Id: wsa_metadata.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 "wsa_metadata.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="MetadataType" mixed="false"> + * <xs:sequence> + * <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + * </xs:sequence> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrMetadata, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrMetadata *node) +{ +} + +static void +class_init(LassoWsAddrMetadataClass *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, "Metadata"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_metadata_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrMetadataClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrMetadata), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrMetadata", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_metadata_new: + * + * Creates a new #LassoWsAddrMetadata object. + * + * Return value: a newly created #LassoWsAddrMetadata object + **/ +LassoNode* +lasso_wsa_metadata_new() +{ + return g_object_new(LASSO_TYPE_WSA_METADATA, NULL); +} diff --git a/lasso/xml/ws/wsa_metadata.h b/lasso/xml/ws/wsa_metadata.h new file mode 100644 index 00000000..44abb2b8 --- /dev/null +++ b/lasso/xml/ws/wsa_metadata.h @@ -0,0 +1,75 @@ +/* $Id: wsa_metadata.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_WSA_METADATA_H__ +#define __LASSO_WSA_METADATA_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_METADATA (lasso_wsa_metadata_get_type()) +#define LASSO_WSA_METADATA(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_METADATA, \ + LassoWsAddrMetadata)) +#define LASSO_WSA_METADATA_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_METADATA, \ + LassoWsAddrMetadataClass)) +#define LASSO_IS_WSA_METADATA(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_METADATA)) +#define LASSO_IS_WSA_METADATA_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_METADATA)) +#define LASSO_WSA_METADATA_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_METADATA, \ + LassoWsAddrMetadataClass)) + +typedef struct _LassoWsAddrMetadata LassoWsAddrMetadata; +typedef struct _LassoWsAddrMetadataClass LassoWsAddrMetadataClass; + + +struct _LassoWsAddrMetadata { + LassoNode parent; + + /*< public >*/ + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrMetadataClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_metadata_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_metadata_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_METADATA_H__ */ diff --git a/lasso/xml/ws/wsa_problem_action.c b/lasso/xml/ws/wsa_problem_action.c new file mode 100644 index 00000000..2356f53b --- /dev/null +++ b/lasso/xml/ws/wsa_problem_action.c @@ -0,0 +1,116 @@ +/* $Id: wsa_problem_action.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 "wsa_problem_action.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="ProblemActionType" mixed="false"> + * <xs:sequence> + * <xs:element ref="tns:Action" minOccurs="0"/> + * <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/> + * </xs:sequence> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "Action", SNIPPET_NODE, + G_STRUCT_OFFSET(LassoWsAddrProblemAction, Action), + "LassoWsAddrAttributedURI" }, + { "SoapAction", SNIPPET_CONTENT, + G_STRUCT_OFFSET(LassoWsAddrProblemAction, SoapAction) }, + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrProblemAction, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrProblemAction *node) +{ + node->Action = NULL; + node->SoapAction = NULL; +} + +static void +class_init(LassoWsAddrProblemActionClass *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, "ProblemAction"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_problem_action_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrProblemActionClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrProblemAction), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrProblemAction", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_problem_action_new: + * + * Creates a new #LassoWsAddrProblemAction object. + * + * Return value: a newly created #LassoWsAddrProblemAction object + **/ +LassoNode* +lasso_wsa_problem_action_new() +{ + return g_object_new(LASSO_TYPE_WSA_PROBLEM_ACTION, NULL); +} diff --git a/lasso/xml/ws/wsa_problem_action.h b/lasso/xml/ws/wsa_problem_action.h new file mode 100644 index 00000000..7f223ec1 --- /dev/null +++ b/lasso/xml/ws/wsa_problem_action.h @@ -0,0 +1,79 @@ +/* $Id: wsa_problem_action.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_WSA_PROBLEM_ACTION_H__ +#define __LASSO_WSA_PROBLEM_ACTION_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> +#include "wsa_attributed_uri.h" + +#define LASSO_TYPE_WSA_PROBLEM_ACTION (lasso_wsa_problem_action_get_type()) +#define LASSO_WSA_PROBLEM_ACTION(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_PROBLEM_ACTION, \ + LassoWsAddrProblemAction)) +#define LASSO_WSA_PROBLEM_ACTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_PROBLEM_ACTION, \ + LassoWsAddrProblemActionClass)) +#define LASSO_IS_WSA_PROBLEM_ACTION(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_PROBLEM_ACTION)) +#define LASSO_IS_WSA_PROBLEM_ACTION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_PROBLEM_ACTION)) +#define LASSO_WSA_PROBLEM_ACTION_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_PROBLEM_ACTION, \ + LassoWsAddrProblemActionClass)) + +typedef struct _LassoWsAddrProblemAction LassoWsAddrProblemAction; +typedef struct _LassoWsAddrProblemActionClass LassoWsAddrProblemActionClass; + + +struct _LassoWsAddrProblemAction { + LassoNode parent; + + /*< public >*/ + /* elements */ + LassoWsAddrAttributedURI *Action; + char *SoapAction; + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrProblemActionClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_problem_action_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_problem_action_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_PROBLEM_ACTION_H__ */ diff --git a/lasso/xml/ws/wsa_reference_parameters.c b/lasso/xml/ws/wsa_reference_parameters.c new file mode 100644 index 00000000..1de95624 --- /dev/null +++ b/lasso/xml/ws/wsa_reference_parameters.c @@ -0,0 +1,108 @@ +/* $Id: wsa_reference_parameters.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 "wsa_reference_parameters.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="ReferenceParametersType" mixed="false"> + * <xs:sequence> + * <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + * </xs:sequence> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrReferenceParameters, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrReferenceParameters *node) +{ +} + +static void +class_init(LassoWsAddrReferenceParametersClass *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, "ReferenceParameters"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_reference_parameters_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrReferenceParametersClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrReferenceParameters), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrReferenceParameters", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_reference_parameters_new: + * + * Creates a new #LassoWsAddrReferenceParameters object. + * + * Return value: a newly created #LassoWsAddrReferenceParameters object + **/ +LassoNode* +lasso_wsa_reference_parameters_new() +{ + return g_object_new(LASSO_TYPE_WSA_REFERENCE_PARAMETERS, NULL); +} diff --git a/lasso/xml/ws/wsa_reference_parameters.h b/lasso/xml/ws/wsa_reference_parameters.h new file mode 100644 index 00000000..8ccfe269 --- /dev/null +++ b/lasso/xml/ws/wsa_reference_parameters.h @@ -0,0 +1,75 @@ +/* $Id: wsa_reference_parameters.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_WSA_REFERENCE_PARAMETERS_H__ +#define __LASSO_WSA_REFERENCE_PARAMETERS_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_REFERENCE_PARAMETERS (lasso_wsa_reference_parameters_get_type()) +#define LASSO_WSA_REFERENCE_PARAMETERS(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_REFERENCE_PARAMETERS, \ + LassoWsAddrReferenceParameters)) +#define LASSO_WSA_REFERENCE_PARAMETERS_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_REFERENCE_PARAMETERS, \ + LassoWsAddrReferenceParametersClass)) +#define LASSO_IS_WSA_REFERENCE_PARAMETERS(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_REFERENCE_PARAMETERS)) +#define LASSO_IS_WSA_REFERENCE_PARAMETERS_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_REFERENCE_PARAMETERS)) +#define LASSO_WSA_REFERENCE_PARAMETERS_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_REFERENCE_PARAMETERS, \ + LassoWsAddrReferenceParametersClass)) + +typedef struct _LassoWsAddrReferenceParameters LassoWsAddrReferenceParameters; +typedef struct _LassoWsAddrReferenceParametersClass LassoWsAddrReferenceParametersClass; + + +struct _LassoWsAddrReferenceParameters { + LassoNode parent; + + /*< public >*/ + /* attributes */ + GHashTable *attributes; +}; + + +struct _LassoWsAddrReferenceParametersClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_reference_parameters_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_reference_parameters_new(void); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_REFERENCE_PARAMETERS_H__ */ diff --git a/lasso/xml/ws/wsa_relates_to.c b/lasso/xml/ws/wsa_relates_to.c new file mode 100644 index 00000000..f0e7db7f --- /dev/null +++ b/lasso/xml/ws/wsa_relates_to.c @@ -0,0 +1,135 @@ +/* $Id: wsa_relates_to.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 "wsa_relates_to.h" + +/* + * Schema fragment (ws-addr.xsd): + * + * <xs:complexType name="RelatesToType" mixed="false"> + * <xs:simpleContent> + * <xs:extension base="xs:anyURI"> + * <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/> + * <xs:anyAttribute namespace="##other" processContents="lax"/> + * </xs:extension> + * </xs:simpleContent> + * </xs:complexType> + */ + +/*****************************************************************************/ +/* private methods */ +/*****************************************************************************/ + + +static struct XmlSnippet schema_snippets[] = { + { "content", SNIPPET_CONTENT, + G_STRUCT_OFFSET(LassoWsAddrRelatesTo, content) }, + { "RelationshipType", SNIPPET_ATTRIBUTE, + G_STRUCT_OFFSET(LassoWsAddrRelatesTo, RelationshipType) }, + { "any", SNIPPET_ATTRIBUTE | SNIPPET_ANY, + G_STRUCT_OFFSET(LassoWsAddrRelatesTo, attributes) }, + {NULL, 0, 0} +}; + +static LassoNodeClass *parent_class = NULL; + + +/*****************************************************************************/ +/* instance and class init functions */ +/*****************************************************************************/ + +static void +instance_init(LassoWsAddrRelatesTo *node) +{ + node->content = NULL; + node->RelationshipType = NULL; +} + +static void +class_init(LassoWsAddrRelatesToClass *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, "RelatesTo"); + lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX); + lasso_node_class_add_snippets(nclass, schema_snippets); +} + +GType +lasso_wsa_relates_to_get_type() +{ + static GType this_type = 0; + + if (!this_type) { + static const GTypeInfo this_info = { + sizeof (LassoWsAddrRelatesToClass), + NULL, + NULL, + (GClassInitFunc) class_init, + NULL, + NULL, + sizeof(LassoWsAddrRelatesTo), + 0, + (GInstanceInitFunc) instance_init, + }; + + this_type = g_type_register_static(LASSO_TYPE_NODE, + "LassoWsAddrRelatesTo", &this_info, 0); + } + return this_type; +} + +/** + * lasso_wsa_relates_to_new: + * + * Creates a new #LassoWsAddrRelatesTo object. + * + * Return value: a newly created #LassoWsAddrRelatesTo object + **/ +LassoNode* +lasso_wsa_relates_to_new() +{ + return g_object_new(LASSO_TYPE_WSA_RELATES_TO, NULL); +} + + +/** + * lasso_wsa_relates_to_new_with_string: + * @content: + * + * Creates a new #LassoWsAddrRelatesTo object and initializes it + * with @content. + * + * Return value: a newly created #LassoWsAddrRelatesTo object + **/ +LassoNode* +lasso_wsa_relates_to_new_with_string(char *content) +{ + LassoWsAddrRelatesTo *object; + object = g_object_new(LASSO_TYPE_WSA_RELATES_TO, NULL); + object->content = g_strdup(content); + return LASSO_NODE(object); +} diff --git a/lasso/xml/ws/wsa_relates_to.h b/lasso/xml/ws/wsa_relates_to.h new file mode 100644 index 00000000..50307bd7 --- /dev/null +++ b/lasso/xml/ws/wsa_relates_to.h @@ -0,0 +1,79 @@ +/* $Id: wsa_relates_to.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_WSA_RELATES_TO_H__ +#define __LASSO_WSA_RELATES_TO_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include <lasso/xml/xml.h> + +#define LASSO_TYPE_WSA_RELATES_TO (lasso_wsa_relates_to_get_type()) +#define LASSO_WSA_RELATES_TO(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_WSA_RELATES_TO, \ + LassoWsAddrRelatesTo)) +#define LASSO_WSA_RELATES_TO_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSA_RELATES_TO, \ + LassoWsAddrRelatesToClass)) +#define LASSO_IS_WSA_RELATES_TO(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSA_RELATES_TO)) +#define LASSO_IS_WSA_RELATES_TO_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_WSA_RELATES_TO)) +#define LASSO_WSA_RELATES_TO_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSA_RELATES_TO, \ + LassoWsAddrRelatesToClass)) + +typedef struct _LassoWsAddrRelatesTo LassoWsAddrRelatesTo; +typedef struct _LassoWsAddrRelatesToClass LassoWsAddrRelatesToClass; + + +struct _LassoWsAddrRelatesTo { + LassoNode parent; + + /*< public >*/ + /* elements */ + char *content; + /* attributes */ + char *RelationshipType; + GHashTable *attributes; +}; + + +struct _LassoWsAddrRelatesToClass { + LassoNodeClass parent; +}; + +LASSO_EXPORT GType lasso_wsa_relates_to_get_type(void); +LASSO_EXPORT LassoNode* lasso_wsa_relates_to_new(void); + +LASSO_EXPORT LassoNode* lasso_wsa_relates_to_new_with_string(char *content); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __LASSO_WSA_RELATES_TO_H__ */ |
