summaryrefslogtreecommitdiffstats
path: root/lasso
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2005-01-12 17:21:11 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2005-01-12 17:21:11 +0000
commitd3c7069617f3b7746bb27f339bde0c3afeeaf96c (patch)
treed6cf05addef7a9fa8604b0b4951ec4015613e7a7 /lasso
parent4ee14f6c0b2798b1ee57eda1e18280defe8b61fa (diff)
downloadlasso-d3c7069617f3b7746bb27f339bde0c3afeeaf96c.tar.gz
lasso-d3c7069617f3b7746bb27f339bde0c3afeeaf96c.tar.xz
lasso-d3c7069617f3b7746bb27f339bde0c3afeeaf96c.zip
Added low level classes for interaction service specification.
Diffstat (limited to 'lasso')
-rw-r--r--lasso/xml/is_help.c105
-rw-r--r--lasso/xml/is_help.h67
-rw-r--r--lasso/xml/is_inquiry.c118
-rw-r--r--lasso/xml/is_inquiry.h72
-rw-r--r--lasso/xml/is_inquiry_element.c114
-rw-r--r--lasso/xml/is_inquiry_element.h75
-rw-r--r--lasso/xml/is_interaction_request.c122
-rw-r--r--lasso/xml/is_interaction_request.h83
-rw-r--r--lasso/xml/is_interaction_response.c115
-rw-r--r--lasso/xml/is_interaction_response.h73
-rw-r--r--lasso/xml/is_interaction_statement.c105
-rw-r--r--lasso/xml/is_interaction_statement.h72
-rw-r--r--lasso/xml/is_item.c109
-rw-r--r--lasso/xml/is_item.h67
-rw-r--r--lasso/xml/is_parameter.c105
-rw-r--r--lasso/xml/is_parameter.h68
-rw-r--r--lasso/xml/is_redirect_request.c102
-rw-r--r--lasso/xml/is_redirect_request.h70
-rw-r--r--lasso/xml/is_select.c109
-rw-r--r--lasso/xml/is_select.h70
-rw-r--r--lasso/xml/is_text.c110
-rw-r--r--lasso/xml/is_text.h67
-rw-r--r--lasso/xml/is_user_interaction.c121
-rw-r--r--lasso/xml/is_user_interaction.h78
24 files changed, 2197 insertions, 0 deletions
diff --git a/lasso/xml/is_help.c b/lasso/xml/is_help.c
new file mode 100644
index 00000000..3b97e277
--- /dev/null
+++ b/lasso/xml/is_help.c
@@ -0,0 +1,105 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_help.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="Help" type="HelpType"/>
+ * <xs:complexType name="HelpType">
+ * <xs:attribute name="label" type="xs:string" use="optional"/>
+ * <xs:attribute name="link" type="xs:anyURI" use="optional"/>
+ * <xs:attribute name="moreLink" type="xs:anyURI" use="optional"/>
+ * </xs:complexType>
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "label", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsHelp, label) },
+ { "link", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsHelp, link) },
+ { "moreLink", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsHelp, moreLink) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsHelp *node)
+{
+ node->label = NULL;
+ node->link = NULL;
+ node->moreLink = NULL;
+}
+
+static void
+class_init(LassoIsHelpClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "Help");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_help_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsHelpClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsHelp),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsHelp", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsHelp*
+lasso_is_help_new()
+{
+ LassoIsHelp *node;
+
+ node = g_object_new(LASSO_TYPE_IS_HELP, NULL);
+
+ return node;
+}
diff --git a/lasso/xml/is_help.h b/lasso/xml/is_help.h
new file mode 100644
index 00000000..23314260
--- /dev/null
+++ b/lasso/xml/is_help.h
@@ -0,0 +1,67 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_HELP_H__
+#define __LASSO_IS_HELP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_HELP (lasso_is_help_get_type())
+#define LASSO_IS_HELP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_HELP, LassoIsHelp))
+#define LASSO_IS_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
+ LASSO_TYPE_IS_HELP, LassoIsHelpClass))
+#define LASSO_IS_IS_HELP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_HELP))
+#define LASSO_IS_IS_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_HELP))
+#define LASSO_IS_HELP_GET_CLASS(o) \(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_HELP, \
+ LassoIsHelpClass))
+
+typedef struct _LassoIsHelp LassoIsHelp;
+typedef struct _LassoIsHelpClass LassoIsHelpClass;
+
+struct _LassoIsHelp {
+ LassoNode parent;
+
+ char *label;
+ char *link;
+ char *moreLink;
+};
+
+struct _LassoIsHelpClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_help_get_type(void);
+
+LASSO_EXPORT LassoIsHelp* lasso_is_help_new(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_HELP_H__ */
diff --git a/lasso/xml/is_inquiry.c b/lasso/xml/is_inquiry.c
new file mode 100644
index 00000000..c9b42187
--- /dev/null
+++ b/lasso/xml/is_inquiry.c
@@ -0,0 +1,118 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_inquiry.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="Inquiry" type="InquiryType"/>
+ * <xs:complexType name="InquiryType">
+ * <xs:sequence>
+ * <xs:element ref="Help" minOccurs="0"/>
+ * <xs:choice maxOccurs="unbounded">
+ * <xs:element ref="Select" minOccurs="0" maxOccurs="unbounded"/>
+ * <xs:element name="Confirm" type="InquiryElementType" minOccurs="0" maxOccurs="unbounded"/>
+ * <xs:element ref="Text" minOccurs="0" maxOccurs="unbounded"/>
+ * </xs:choice>
+ * </xs:sequence>
+ * <xs:attribute name="id" type="xs:ID" use="optional"/>
+ * <xs:attribute name="title" type="xs:string" use="optional"/>
+ * </xs:complexType>
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "Help", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInquiry, Help) },
+ { "Select", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsInquiry, Select) },
+ { "Confirm", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsInquiry, Confirm) },
+ { "Text", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsInquiry, Text) },
+ { "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsInquiry, id) },
+ { "title", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsInquiry, title) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsInquiry *node)
+{
+ node->Help = NULL;
+ node->Select = NULL;
+ node->Confirm = NULL;
+ node->Text = NULL;
+ node->id = NULL;
+ node->title = NULL;
+}
+
+static void
+class_init(LassoIsInquiryClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "Inquiry");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_inquiry_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsInquiryClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsInquiry),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsInquiry", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsInquiry*
+lasso_is_inquiry_new()
+{
+ LassoIsInquiry *node;
+
+ node = g_object_new(LASSO_TYPE_IS_INQUIRY, NULL);
+
+ return node;
+}
diff --git a/lasso/xml/is_inquiry.h b/lasso/xml/is_inquiry.h
new file mode 100644
index 00000000..19c661eb
--- /dev/null
+++ b/lasso/xml/is_inquiry.h
@@ -0,0 +1,72 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_INQUIRY_H__
+#define __LASSO_IS_INQUIRY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_INQUIRY (lasso_is_inquiry_get_type())
+#define LASSO_IS_INQUIRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_INQUIRY, LassoIsInquiry))
+#define LASSO_IS_INQUIRY_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_INQUIRY, LassoIsInquiryClass))
+#define LASSO_IS_IS_INQUIRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_INQUIRY))
+#define LASSO_IS_IS_INQUIRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_INQUIRY))
+#define LASSO_IS_INQUIRY_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_INQUIRY, LassoIsInquiryClass))
+
+typedef struct _LassoIsInquiry LassoIsInquiry;
+typedef struct _LassoIsInquiryClass LassoIsInquiryClass;
+
+struct _LassoIsInquiry {
+ LassoNode parent;
+
+ GList *Help;
+ GList *Select;
+ GList *Confirm;
+ GList *Text;
+
+ char *id;
+ char *title;
+};
+
+struct _LassoIsInquiryClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_inquiry_get_type(void);
+
+LASSO_EXPORT LassoIsInquiry* lasso_is_inquiry_new(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_INQUIRY_H__ */
diff --git a/lasso/xml/is_inquiry_element.c b/lasso/xml/is_inquiry_element.c
new file mode 100644
index 00000000..b443e955
--- /dev/null
+++ b/lasso/xml/is_inquiry_element.c
@@ -0,0 +1,114 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_inquiry_element.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:complexType name="InquiryElementType" abstract="true">
+ * <xs:sequence>
+ * <xs:element ref="Help" minOccurs="0"/>
+ * <xs:element ref="Hint" minOccurs="0"/>
+ * <xs:element name="Label" type="xs:normalizedString" minOccurs="0"/>
+ * <xs:element name="Value" type="xs:normalizedString" minOccurs="0"/>
+ * </xs:sequence>
+ * <xs:attribute name="name" type="xs:ID" use="required"/>
+ * </xs:complexType>
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "Help", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInquiryElement, Help) },
+ { "Hint", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInquiryElement, Hint) },
+ { "Label", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInquiryElement, Label) },
+ { "Value", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInquiryElement, Value) },
+ { "name", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsInquiryElement, name) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsInquiryElement *node)
+{
+ node->Help = NULL;
+ node->Hint = NULL;
+ node->Label = NULL;
+ node->Value = NULL;
+ node->name = NULL;
+}
+
+static void
+class_init(LassoIsInquiryElementClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "InquiryElement");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_inquiry_element_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsInquiryElementClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsInquiryElement),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsInquiryElement", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsInquiryElement*
+lasso_is_inquiry_element_new(const char *name)
+{
+ LassoIsInquiryElement *node;
+
+ node = g_object_new(LASSO_TYPE_IS_INQUIRY_ELEMENT, NULL);
+
+ node->name = g_strdup(name);
+
+ return node;
+}
diff --git a/lasso/xml/is_inquiry_element.h b/lasso/xml/is_inquiry_element.h
new file mode 100644
index 00000000..4d852491
--- /dev/null
+++ b/lasso/xml/is_inquiry_element.h
@@ -0,0 +1,75 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_INQUIRY_ELEMENT_H__
+#define __LASSO_IS_INQUIRY_ELEMENT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/is_help.h>
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_INQUIRY_ELEMENT (lasso_is_inquiry_element_get_type())
+#define LASSO_IS_INQUIRY_ELEMENT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_INQUIRY_ELEMENT, LassoIsInquiryElement))
+#define LASSO_IS_INQUIRY_ELEMENT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_INQUIRY_ELEMENT, \
+ LassoIsInquiryElementClass))
+#define LASSO_IS_IS_INQUIRY_ELEMENT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_INQUIRY_ELEMENT))
+#define LASSO_IS_IS_INQUIRY_ELEMENT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_INQUIRY_ELEMENT))
+#define LASSO_IS_INQUIRY_ELEMENT_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_INQUIRY_ELEMENT, LassoIsInquiryElementClass))
+
+typedef struct _LassoIsInquiryElement LassoIsInquiryElement;
+typedef struct _LassoIsInquiryElementClass LassoIsInquiryElementClass;
+
+struct _LassoIsInquiryElement {
+ LassoNode parent;
+
+ LassoIsHelp *Help;
+ char *Hint;
+ char *Label;
+ char *Value;
+
+ char *name;
+};
+
+struct _LassoIsInquiryElementClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_inquiry_element_get_type(void);
+
+LASSO_EXPORT LassoIsInquiryElement* lasso_is_inquiry_element_new();
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_INQUIRY_ELEMENT_H__ */
diff --git a/lasso/xml/is_interaction_request.c b/lasso/xml/is_interaction_request.c
new file mode 100644
index 00000000..3aea80cc
--- /dev/null
+++ b/lasso/xml/is_interaction_request.c
@@ -0,0 +1,122 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_interaction_request.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="InteractionRequest" type="InteractionRequestType"/>
+ * <xs:complexType name="InteractionRequestType">
+ * <xs:sequence>
+ * <xs:group ref="ResourceIDGroup" minOccurs="0"/>
+ * <xs:element ref="Inquiry" maxOccurs="unbounded"/>
+ * <xs:element ref="ds:KeyInfo" minOccurs="0"/>
+ * </xs:sequence>
+ * <xs:attribute name="id" type="xs:ID" use="optional"/>
+ * <xs:attribute name="language" type="xs:NMTOKENS" use="optional"/>
+ * <xs:attribute name="maxInteractTime" type="xs:integer" use="optional"/>
+ * <xs:attribute name="signed" type="xs:token" use="optional"/>
+ * </xs:complexType>
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "ResourceID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInteractionRequest, ResourceID) },
+ { "EncryptedResourceID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInteractionRequest,
+ EncryptedResourceID) },
+ { "Inquiry", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsInteractionRequest, Inquiry) },
+ /* TODO : KeyInfo */
+ { "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsInteractionRequest, id) },
+ { "language", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsInteractionRequest, language) },
+ { "maxInteractTime", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsInteractionRequest,
+ maxInteractTime) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsInteractionRequest *node)
+{
+ node->ResourceID = NULL;
+ node->EncryptedResourceID = NULL;
+ node->Inquiry = NULL;
+ /* TODO : KeyInfo */
+ node->id = NULL;
+ node->language = NULL;
+ node->maxInteractTime = 0; /* FIXME : optional integer attribute */
+ /* TODO : signed */
+}
+
+static void
+class_init(LassoIsInteractionRequestClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "InteractionRequest");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_interaction_request_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsInteractionRequestClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsInteractionRequest),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsInteractionRequest", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsInteractionRequest*
+lasso_is_interaction_request_new()
+{
+ LassoIsInteractionRequest *node;
+
+ node = g_object_new(LASSO_TYPE_IS_INTERACTION_REQUEST, NULL);
+
+ return node;
+}
diff --git a/lasso/xml/is_interaction_request.h b/lasso/xml/is_interaction_request.h
new file mode 100644
index 00000000..37b8bc87
--- /dev/null
+++ b/lasso/xml/is_interaction_request.h
@@ -0,0 +1,83 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_INTERACTION_REQUEST_H__
+#define __LASSO_IS_INTERACTION_REQUEST_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/disco_encrypted_resource_id.h>
+#include <lasso/xml/disco_resource_id.h>
+#include <lasso/xml/is_inquiry.h>
+#include <lasso/xml/xml.h>
+
+
+#define LASSO_TYPE_IS_INTERACTION_REQUEST (lasso_is_interaction_request_get_type())
+#define LASSO_IS_INTERACTION_REQUEST(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_INTERACTION_REQUEST, \
+ LassoIsInteractionRequest))
+#define LASSO_IS_INTERACTION_REQUEST_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_INTERACTION_REQUEST, \
+ LassoIsInteractionRequestClass))
+#define LASSO_IS_IS_INTERACTION_REQUEST(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_INTERACTION_REQUEST))
+#define LASSO_IS_IS_INTERACTION_REQUEST_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_INTERACTION_REQUEST))
+#define LASSO_IS_INTERACTION_REQUEST_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_INTERACTION_REQUEST, \
+ LassoIsInteractionRequestClass))
+
+typedef struct _LassoIsInteractionRequest LassoIsInteractionRequest;
+typedef struct _LassoIsInteractionRequestClass LassoIsInteractionRequestClass;
+
+struct _LassoIsInteractionRequest {
+ LassoNode parent;
+
+ LassoDiscoResourceID *ResourceID;
+ LassoDiscoEncryptedResourceID *EncryptedResourceID;
+ GList *Inquiry;
+ /* TODO : ds:KeyInfo */
+
+ char *id;
+ char *language;
+ int maxInteractTime;
+ /* TODO : signed */
+};
+
+struct _LassoIsInteractionRequestClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_interaction_request_get_type(void);
+
+LASSO_EXPORT LassoIsInteractionRequest* lasso_is_interaction_request_new(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_INTERACTION_REQUEST_H__ */
diff --git a/lasso/xml/is_interaction_response.c b/lasso/xml/is_interaction_response.c
new file mode 100644
index 00000000..6622cbeb
--- /dev/null
+++ b/lasso/xml/is_interaction_response.c
@@ -0,0 +1,115 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_interaction_response.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="InteractionResponse" type="InteractionResponseType"/>
+ * <xs:complexType name="InteractionResponseType">
+ * <xs:sequence>
+ * <xs:element ref="Status"/>
+ * <xs:choice>
+ * <xs:element name="InteractionStatement" type="InteractionStatementType" minOccurs="0"
+ * maxOccurs="unbounded"/>
+ * <xs:element name="Parameter" type="ParameterType" minOccurs="0" maxOccurs="unbounded"/>
+ * </xs:choice>
+ * </xs:sequence>
+ * </xs:complexType>
+ *
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "Status", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInteractionResponse, Status) },
+ { "InteractionStatement", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsInteractionResponse,
+ InteractionStatement) },
+ { "Parameter", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsInteractionResponse,
+ Parameter) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsInteractionResponse *node)
+{
+ node->Status = NULL;
+ node->InteractionStatement = NULL;
+ node->Parameter = NULL;
+}
+
+static void
+class_init(LassoIsInteractionResponseClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "InteractionResponse");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_interaction_response_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsInteractionResponseClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsInteractionResponse),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsInteractionResponse", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsInteractionResponse*
+lasso_is_interaction_response_new(LassoUtilityStatus *status)
+{
+ LassoIsInteractionResponse *node;
+
+ node = g_object_new(LASSO_TYPE_IS_INTERACTION_RESPONSE, NULL);
+
+ node->Status = status;
+
+ return node;
+}
diff --git a/lasso/xml/is_interaction_response.h b/lasso/xml/is_interaction_response.h
new file mode 100644
index 00000000..e0f011a3
--- /dev/null
+++ b/lasso/xml/is_interaction_response.h
@@ -0,0 +1,73 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_INTERACTION_RESPONSE_H__
+#define __LASSO_IS_INTERACTION_RESPONSE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/utility_status.h>
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_INTERACTION_RESPONSE (lasso_is_interaction_response_get_type())
+#define LASSO_IS_INTERACTION_RESPONSE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_INTERACTION_RESPONSE, LassoIsText))
+#define LASSO_IS_INTERACTION_RESPONSE_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_INTERACTION_RESPONSE, \
+ LassoIsInteractionResponseClass))
+#define LASSO_IS_IS_INTERACTION_RESPONSE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_INTERACTION_RESPONSE))
+#define LASSO_IS_IS_INTERACTION_RESPONSE_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_INTERACTION_RESPONSE))
+#define LASSO_IS_INTERACTION_RESPONSE_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_INTERACTION_RESPONSE, \
+ LassoIsInteractionResponseClass))
+
+typedef struct _LassoIsInteractionResponse LassoIsInteractionResponse;
+typedef struct _LassoIsInteractionResponseClass LassoIsInteractionResponseClass;
+
+struct _LassoIsInteractionResponse {
+ LassoNode parent; /* FIXME : inherit of LassoIsInquiryElement */
+
+ LassoUtilityStatus *Status;
+ GList *InteractionStatement;
+ GList *Parameter;
+};
+
+struct _LassoIsInteractionResponseClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_interaction_response_get_type(void);
+
+LASSO_EXPORT LassoIsInteractionResponse* lasso_is_interaction_response_new();
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_INTERACTION_RESPONSE_H__ */
diff --git a/lasso/xml/is_interaction_statement.c b/lasso/xml/is_interaction_statement.c
new file mode 100644
index 00000000..7b7998a9
--- /dev/null
+++ b/lasso/xml/is_interaction_statement.c
@@ -0,0 +1,105 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_interaction_statement.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:complexType name="InteractionStatementType">
+ * <xs:sequence>
+ * <xs:element ref="Inquiry"/>
+ * <xs:element ref="ds:Signature"/>
+ * </xs:sequence>
+ * </xs:complexType>
+ *
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "Inquiry", SNIPPET_NODE, G_STRUCT_OFFSET(LassoIsInteractionStatement, Inquiry) },
+ /* TODO : Signature */
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsInteractionStatement *node)
+{
+ node->Inquiry = NULL;
+}
+
+static void
+class_init(LassoIsInteractionStatementClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "InteractionStatement");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_interaction_statement_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsInteractionStatementClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsInteractionStatement),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsInteractionStatement", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsInteractionStatement*
+lasso_is_interaction_statement_new(LassoIsInquiry *inquiry)
+{
+ LassoIsInteractionStatement *node;
+
+ node = g_object_new(LASSO_TYPE_IS_INTERACTION_STATEMENT, NULL);
+
+ node->Inquiry = inquiry;
+
+ return node;
+}
diff --git a/lasso/xml/is_interaction_statement.h b/lasso/xml/is_interaction_statement.h
new file mode 100644
index 00000000..93c3d835
--- /dev/null
+++ b/lasso/xml/is_interaction_statement.h
@@ -0,0 +1,72 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_INTERACTION_STATEMENT_H__
+#define __LASSO_IS_INTERACTION_STATEMENT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/is_inquiry.h>
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_INTERACTION_STATEMENT (lasso_is_interaction_statement_get_type())
+#define LASSO_IS_INTERACTION_STATEMENT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_INTERACTION_STATEMENT, \
+ LassoIsInteractionStatement))
+#define LASSO_IS_INTERACTION_STATEMENT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_INTERACTION_STATEMENT, \
+ LassoIsInteractionStatementClass))
+#define LASSO_IS_IS_INTERACTION_STATEMENT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_INTERACTION_STATEMENT))
+#define LASSO_IS_IS_INTERACTION_STATEMENT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_INTERACTION_STATEMENT))
+#define LASSO_IS_INTERACTION_STATEMENT_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_INTERACTION_STATEMENT, \
+ LassoIsInteractionStatementClass))
+
+typedef struct _LassoIsInteractionStatement LassoIsInteractionStatement;
+typedef struct _LassoIsInteractionStatementClass LassoIsInteractionStatementClass;
+
+struct _LassoIsInteractionStatement {
+ LassoNode parent; /* FIXME : inherit of LassoIsInquiryElement */
+
+ LassoIsInquiry *Inquiry;
+};
+
+struct _LassoIsInteractionStatementClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_interaction_statement_get_type(void);
+
+LASSO_EXPORT LassoIsInteractionStatement* lasso_is_interaction_statement_new();
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_INTERACTION_STATEMENT_H__ */
diff --git a/lasso/xml/is_item.c b/lasso/xml/is_item.c
new file mode 100644
index 00000000..77ed2bc2
--- /dev/null
+++ b/lasso/xml/is_item.c
@@ -0,0 +1,109 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_item.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="Hint" type="xs:string"/>
+ * <xs:element name="Item" minOccurs="2" maxOccurs="unbounded">
+ * <xs:complexType>
+ * <xs:sequence>
+ * <xs:element ref="Hint" minOccurs="0"/>
+ * </xs:sequence>
+ * <xs:attribute name="label" type="xs:string" use="optional"/>
+ * <xs:attribute name="value" type="xs:NMTOKEN" use="required"/>
+ * </xs:complexType>
+ * </xs:element>
+ *
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsItem *node)
+{
+ node->Hint = NULL;
+ node->label = NULL;
+ node->value = NULL;
+}
+
+static void
+class_init(LassoIsItemClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "Item");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_item_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsItemClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsItem),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsItem", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsItem*
+lasso_is_item_new(const char *value)
+{
+ LassoIsItem *node;
+
+ node = g_object_new(LASSO_TYPE_IS_ITEM, NULL);
+
+ node->value = g_strdup(value);
+
+ return node;
+}
diff --git a/lasso/xml/is_item.h b/lasso/xml/is_item.h
new file mode 100644
index 00000000..305d5fc4
--- /dev/null
+++ b/lasso/xml/is_item.h
@@ -0,0 +1,67 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_ITEM_H__
+#define __LASSO_IS_ITEM_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_ITEM (lasso_is_item_get_type())
+#define LASSO_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_ITEM, LassoIsItem))
+#define LASSO_IS_ITEM_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_ITEM, LassoIsItemClass))
+#define LASSO_IS_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_ITEM))
+#define LASSO_IS_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_ITEM))
+#define LASSO_IS_ITEM_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_ITEM, LassoIsItemClass))
+
+typedef struct _LassoIsItem LassoIsItem;
+typedef struct _LassoIsItemClass LassoIsItemClass;
+
+struct _LassoIsItem {
+ LassoNode parent;
+
+ char *Hint;
+ char *label;
+ char *value;
+};
+
+struct _LassoIsItemClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_item_get_type(void);
+
+LASSO_EXPORT LassoIsItem* lasso_is_item_new(const char *value);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_ITEM_H__ */
diff --git a/lasso/xml/is_parameter.c b/lasso/xml/is_parameter.c
new file mode 100644
index 00000000..85aec54b
--- /dev/null
+++ b/lasso/xml/is_parameter.c
@@ -0,0 +1,105 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_parameter.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:complexType name="ParameterType">
+ * <xs:attribute name="name" type="xs:ID" use="required"/>
+ * <xs:attribute name="value" type="xs:string" use="required"/>
+ * </xs:complexType>
+ *
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "name", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsParameter, name) },
+ { "value", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsParameter, value) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsParameter *node)
+{
+ node->name = NULL;
+ node->value = NULL;
+}
+
+static void
+class_init(LassoIsParameterClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "Parameter");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_parameter_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsParameterClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsParameter),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsParameter", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsParameter*
+lasso_is_parameter_new(const char *name, const char *value)
+{
+ LassoIsParameter *node;
+
+ node = g_object_new(LASSO_TYPE_IS_PARAMETER, NULL);
+
+ node->name = g_strdup(name);
+ node->value = g_strdup(value);
+
+ return node;
+}
diff --git a/lasso/xml/is_parameter.h b/lasso/xml/is_parameter.h
new file mode 100644
index 00000000..9cf9beeb
--- /dev/null
+++ b/lasso/xml/is_parameter.h
@@ -0,0 +1,68 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_PARAMETER_H__
+#define __LASSO_IS_PARAMETER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_PARAMETER (lasso_is_parameter_get_type())
+#define LASSO_IS_PARAMETER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_PARAMETER, LassoIsParameter))
+#define LASSO_IS_PARAMETER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_PARAMETER, LassoIsParameterClass))
+#define LASSO_IS_IS_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_PARAMETER))
+#define LASSO_IS_IS_PARAMETER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_PARAMETER))
+#define LASSO_IS_PARAMETER_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_PARAMETER, LassoIsParameterClass))
+
+typedef struct _LassoIsParameter LassoIsParameter;
+typedef struct _LassoIsParameterClass LassoIsParameterClass;
+
+struct _LassoIsParameter {
+ LassoNode parent;
+
+ char *name;
+ char *value;
+};
+
+struct _LassoIsParameterClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_parameter_get_type(void);
+
+LASSO_EXPORT LassoIsParameter* lasso_is_parameter_new();
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_PARAMETER_H__ */
diff --git a/lasso/xml/is_redirect_request.c b/lasso/xml/is_redirect_request.c
new file mode 100644
index 00000000..4aa40cf3
--- /dev/null
+++ b/lasso/xml/is_redirect_request.c
@@ -0,0 +1,102 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_redirect_request.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="RedirectRequest" type="RedirectRequestType"/>
+ * <xs:complexType name="RedirectRequestType">
+ * <xs:attribute name="redirectURL" type="xs:anyURI" use="required"/>
+ * </xs:complexType>
+ *
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "redirectURL", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoIsRedirectRequest, redirectURL) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsRedirectRequest *node)
+{
+ node->redirectURL = NULL;
+}
+
+static void
+class_init(LassoIsRedirectRequestClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "RedirectRequest");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_redirect_request_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsRedirectRequestClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsRedirectRequest),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsRedirectRequest", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsRedirectRequest*
+lasso_is_redirect_request_new(const char *redirectURL)
+{
+ LassoIsRedirectRequest *node;
+
+ node = g_object_new(LASSO_TYPE_IS_REDIRECT_REQUEST, NULL);
+
+ node->redirectURL = g_strdup(redirectURL);
+
+ return node;
+}
diff --git a/lasso/xml/is_redirect_request.h b/lasso/xml/is_redirect_request.h
new file mode 100644
index 00000000..c8452e55
--- /dev/null
+++ b/lasso/xml/is_redirect_request.h
@@ -0,0 +1,70 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_REDIRECT_REQUEST_H__
+#define __LASSO_IS_REDIRECT_REQUEST_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_REDIRECT_REQUEST (lasso_is_redirect_request_get_type())
+#define LASSO_IS_REDIRECT_REQUEST(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_REDIRECT_REQUEST, LassoIsRedirectRequest))
+#define LASSO_IS_REDIRECT_REQUEST_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_REDIRECT_REQUEST, \
+ LassoIsRedirectRequestClass))
+#define LASSO_IS_IS_REDIRECT_REQUEST(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_REDIRECT_REQUEST))
+#define LASSO_IS_IS_REDIRECT_REQUEST_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_REDIRECT_REQUEST))
+#define LASSO_IS_REDIRECT_REQUEST_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_REDIRECT_REQUEST, \
+ LassoIsRedirectRequestClass))
+
+typedef struct _LassoIsRedirectRequest LassoIsRedirectRequest;
+typedef struct _LassoIsRedirectRequestClass LassoIsRedirectRequestClass;
+
+struct _LassoIsRedirectRequest {
+ LassoNode parent;
+
+ char *redirectURL;
+};
+
+struct _LassoIsRedirectRequestClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_redirect_request_get_type(void);
+
+LASSO_EXPORT LassoIsRedirectRequest* lasso_is_redirect_request_new(const char *redirectURL);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_REDIRECT_REQUEST_H__ */
diff --git a/lasso/xml/is_select.c b/lasso/xml/is_select.c
new file mode 100644
index 00000000..72fcba6c
--- /dev/null
+++ b/lasso/xml/is_select.c
@@ -0,0 +1,109 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_select.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="Select" type="SelectType"/>
+ * <xs:complexType name="SelectType">
+ * <xs:complexContent>
+ * <xs:extension base="InquiryElementType">
+ * <xs:sequence>
+ * <xs:element name="Item" minOccurs="2" maxOccurs="unbounded"/>
+ * </xs:sequence>
+ * <xs:attribute name="multiple" type="xs:boolean" use="optional" default="false"/>
+ * </xs:extension>
+ * </xs:complexContent>
+ * </xs:complexType>
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "Item", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsSelect, Item) },
+ { "multiple", SNIPPET_ATTRIBUTE | SNIPPET_BOOLEAN,
+ G_STRUCT_OFFSET(LassoIsSelect, multiple) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsSelect *node)
+{
+ node->Item = NULL;
+ node->multiple = FALSE;
+}
+
+static void
+class_init(LassoIsSelectClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "Select");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_select_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsSelectClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsSelect),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsSelect", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsSelect*
+lasso_is_select_new(LassoIsItem *item1, LassoIsItem *item2)
+{
+ LassoIsSelect *node;
+
+ node = g_object_new(LASSO_TYPE_IS_SELECT, NULL);
+
+ return node;
+}
diff --git a/lasso/xml/is_select.h b/lasso/xml/is_select.h
new file mode 100644
index 00000000..aa6948d4
--- /dev/null
+++ b/lasso/xml/is_select.h
@@ -0,0 +1,70 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_SELECT_H__
+#define __LASSO_IS_SELECT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/is_item.h>
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_SELECT (lasso_is_select_get_type())
+#define LASSO_IS_SELECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_SELECT, LassoIsSelect))
+#define LASSO_IS_SELECT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_SELECT, LassoIsSelectClass))
+#define LASSO_IS_IS_SELECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_SELECT))
+#define LASSO_IS_IS_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_IS_SELECT))
+#define LASSO_IS_SELECT_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_SELECT, LassoIsSelectClass))
+
+typedef struct _LassoIsSelect LassoIsSelect;
+typedef struct _LassoIsSelectClass LassoIsSelectClass;
+
+struct _LassoIsSelect {
+ LassoNode parent; /* FIXME : must inherit of InquiryElement class */
+
+ GList *Item;
+
+ gboolean multiple;
+};
+
+struct _LassoIsSelectClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_select_get_type(void);
+
+LASSO_EXPORT LassoIsSelect* lasso_is_select_new(LassoIsItem *item1, LassoIsItem *item2);
+ /* FIXME : choose proper names */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_SELECT_H__ */
diff --git a/lasso/xml/is_text.c b/lasso/xml/is_text.c
new file mode 100644
index 00000000..a370a295
--- /dev/null
+++ b/lasso/xml/is_text.c
@@ -0,0 +1,110 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_text.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="Text" type="TextType"/>
+ * <xs:complexType name="TextType">
+ * <xs:complexContent>
+ * <xs:extension base="InquiryElementType">
+ * <xs:attribute name="minChars" type="xs:integer" use="optional"/>
+ * <xs:attribute name="maxChars" type="xs:integer" use="optional"/>
+ * <xs:attribute name="format" type="xs:string" use="optional"/>
+ * </xs:extension>
+ * </xs:complexContent>
+ * </xs:complexType>
+ *
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "minChars", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsText, minChars) },
+ { "maxChars", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsText, maxChars) },
+ { "format", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsText, format) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsText *node)
+{
+ node->minChars = 0;
+ node->maxChars = 0;
+ node->format = NULL;
+}
+
+static void
+class_init(LassoIsTextClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "Text");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_text_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsTextClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsText),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsText", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsText*
+lasso_is_text_new()
+{
+ LassoIsText *node;
+
+ node = g_object_new(LASSO_TYPE_IS_TEXT, NULL);
+
+ return node;
+}
diff --git a/lasso/xml/is_text.h b/lasso/xml/is_text.h
new file mode 100644
index 00000000..9e51d427
--- /dev/null
+++ b/lasso/xml/is_text.h
@@ -0,0 +1,67 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_TEXT_H__
+#define __LASSO_IS_TEXT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_TEXT (lasso_is_text_get_type())
+#define LASSO_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_TEXT, LassoIsText))
+#define LASSO_IS_TEXT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_TEXT, LassoIsTextClass))
+#define LASSO_IS_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_TEXT))
+#define LASSO_IS_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_TEXT))
+#define LASSO_IS_TEXT_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_TEXT, LassoIsTextClass))
+
+typedef struct _LassoIsText LassoIsText;
+typedef struct _LassoIsTextClass LassoIsTextClass;
+
+struct _LassoIsText {
+ LassoNode parent; /* FIXME : inherit of LassoIsInquiryElement */
+
+ int minChars;
+ int maxChars;
+ char *format;
+};
+
+struct _LassoIsTextClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_text_get_type(void);
+
+LASSO_EXPORT LassoIsText* lasso_is_text_new();
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_TEXT_H__ */
diff --git a/lasso/xml/is_user_interaction.c b/lasso/xml/is_user_interaction.c
new file mode 100644
index 00000000..5e6244bf
--- /dev/null
+++ b/lasso/xml/is_user_interaction.c
@@ -0,0 +1,121 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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 <lasso/xml/is_user_interaction.h>
+
+/*
+ * Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
+ *
+ * <xs:element name="UserInteraction" type="UserInteractionHeaderType"/>
+ * <xs:complexType name="UserInteractionHeaderType">
+ * <xs:sequence>
+ * <xs:element name="InteractionService" type="disco:ResourceOfferingType" minOccurs="0"/>
+ * </xs:sequence>
+ * <xs:attribute name="id" type="xs:ID" use="optional"/>
+ * <xs:attribute name="interact" type="xs:QName" use="optional" default="is:interactIfNeeded"/>
+ * <xs:attribute name="language" type="xs:NMTOKENS" use="optional"/>
+ * <xs:attribute name="redirect" type="xs:boolean" use="optional" default="0"/>
+ * <xs:attribute name="maxInteractTime" type="xs:integer" use="optional"/>
+ * <xs:attribute ref="soap:actor" use="optional"/>
+ * <xs:attribute ref="soap:mustUnderstand" use="optional"/>
+ * </xs:complexType>
+ */
+
+/*****************************************************************************/
+/* private methods */
+/*****************************************************************************/
+
+static struct XmlSnippet schema_snippets[] = {
+ { "InteractionService", SNIPPET_LIST_NODES,
+ G_STRUCT_OFFSET(LassoIsUserInteraction, InteractionService) },
+ { "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsUserInteraction, id) },
+ { "interact", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsUserInteraction, interact) },
+ { "language", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoIsUserInteraction, language) },
+ { "redirect", SNIPPET_ATTRIBUTE | SNIPPET_BOOLEAN,
+ G_STRUCT_OFFSET(LassoIsUserInteraction, redirect) },
+ { "maxInteractTime", SNIPPET_ATTRIBUTE,
+ G_STRUCT_OFFSET(LassoIsUserInteraction, maxInteractTime) },
+ { NULL, 0, 0}
+};
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+instance_init(LassoIsUserInteraction *node)
+{
+ node->InteractionService = NULL;
+ node->id = NULL;
+ node->interact = g_strdup(LASSO_IS_INTERACT_ATTR_INTERACT_IF_NEEDED);
+ node->language = NULL;
+ node->redirect = FALSE;
+ node->maxInteractTime = 0;
+}
+
+static void
+class_init(LassoIsUserInteractionClass *klass)
+{
+ LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
+
+ nclass->node_data = g_new0(LassoNodeClassData, 1);
+ lasso_node_class_set_nodename(nclass, "UserInteraction");
+ lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
+ lasso_node_class_add_snippets(nclass, schema_snippets);
+}
+
+GType
+lasso_is_user_interaction_get_type()
+{
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoIsUserInteractionClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) class_init,
+ NULL,
+ NULL,
+ sizeof(LassoIsUserInteraction),
+ 0,
+ (GInstanceInitFunc) instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoIsUserInteraction", &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoIsUserInteraction*
+lasso_is_user_interaction_new()
+{
+ LassoIsUserInteraction *node;
+
+ node = g_object_new(LASSO_TYPE_IS_USER_INTERACTION, NULL);
+
+ return node;
+}
diff --git a/lasso/xml/is_user_interaction.h b/lasso/xml/is_user_interaction.h
new file mode 100644
index 00000000..b47d87b5
--- /dev/null
+++ b/lasso/xml/is_user_interaction.h
@@ -0,0 +1,78 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * 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_IS_USER_INTERACTION_H__
+#define __LASSO_IS_USER_INTERACTION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/xml.h>
+
+#define LASSO_TYPE_IS_USER_INTERACTION (lasso_is_user_interaction_get_type())
+#define LASSO_IS_USER_INTERACTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IS_USER_INTERACTION, LassoIsUserInteraction))
+#define LASSO_IS_USER_INTERACTION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IS_USER_INTERACTION, \
+ LassoIsUserInteractionClass))
+#define LASSO_IS_IS_USER_INTERACTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IS_USER_INTERACTION))
+#define LASSO_IS_IS_USER_INTERACTION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_IS_USER_INTERACTION))
+#define LASSO_IS_USER_INTERACTION_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IS_USER_INTERACTION, \
+ LassoIsUserInteractionClass))
+
+typedef struct _LassoIsUserInteraction LassoIsUserInteraction;
+typedef struct _LassoIsUserInteractionClass LassoIsUserInteractionClass;
+
+struct _LassoIsUserInteraction {
+ LassoNode parent;
+
+ GList *InteractionService;
+
+ gchar *id;
+ gchar *interact;
+ gchar *language;
+ gboolean redirect;
+ gint maxInteractTime;
+
+ /* FIXME : implement soap:actor and soap:mustUnderstand */
+};
+
+struct _LassoIsUserInteractionClass {
+ LassoNodeClass parent;
+};
+
+LASSO_EXPORT GType lasso_is_user_interaction_get_type(void);
+
+LASSO_EXPORT LassoIsUserInteraction* lasso_is_user_interaction_new(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_IS_USER_INTERACTION_H__ */