1
/* $Id: is_select.c,v 1.2 2005/01/22 15:57:55 eraviart Exp $
3
* Lasso - A free implementation of the Liberty Alliance specifications.
5
* Copyright (C) 2004, 2005 Entr'ouvert
6
* http://lasso.entrouvert.org
8
* Authors: See AUTHORS file in top-level directory.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
#include <lasso/xml/is_select.h>
28
* Schema fragments (liberty-idwsf-interaction-svc-v1.0.xsd):
30
* <xs:element name="Select" type="SelectType"/>
31
* <xs:complexType name="SelectType">
33
* <xs:extension base="InquiryElementType">
35
* <xs:element name="Item" minOccurs="2" maxOccurs="unbounded"/>
37
* <xs:attribute name="multiple" type="xs:boolean" use="optional" default="false"/>
39
* </xs:complexContent>
43
/*****************************************************************************/
45
/*****************************************************************************/
47
static struct XmlSnippet schema_snippets[] = {
48
{ "Item", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoIsSelect, Item) },
49
{ "multiple", SNIPPET_ATTRIBUTE | SNIPPET_BOOLEAN,
50
G_STRUCT_OFFSET(LassoIsSelect, multiple) },
54
/*****************************************************************************/
55
/* instance and class init functions */
56
/*****************************************************************************/
59
instance_init(LassoIsSelect *node)
62
node->multiple = FALSE;
66
class_init(LassoIsSelectClass *klass)
68
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
70
nclass->node_data = g_new0(LassoNodeClassData, 1);
71
lasso_node_class_set_nodename(nclass, "Select");
72
lasso_node_class_set_ns(nclass, LASSO_IS_HREF, LASSO_IS_PREFIX);
73
lasso_node_class_add_snippets(nclass, schema_snippets);
77
lasso_is_select_get_type()
79
static GType this_type = 0;
82
static const GTypeInfo this_info = {
83
sizeof (LassoIsSelectClass),
86
(GClassInitFunc) class_init,
89
sizeof(LassoIsSelect),
91
(GInstanceInitFunc) instance_init,
94
this_type = g_type_register_static(LASSO_TYPE_NODE,
95
"LassoIsSelect", &this_info, 0);
101
lasso_is_select_new(LassoIsItem *item1, LassoIsItem *item2)
105
node = g_object_new(LASSO_TYPE_IS_SELECT, NULL);