1
/* $Id: is_inquiry_element.c,v 1.0 2005/10/14 15:17:55 fpeters Exp $
3
* Lasso - A free implementation of the Liberty Alliance specifications.
5
* Copyright (C) 2004-2007 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 "is_inquiry_element.h"
28
* Schema fragment (liberty-idwsf-interaction-svc-v2.0.xsd):
30
* <xs:complexType name="InquiryElementType" abstract="true">
32
* <xs:element ref="Help" minOccurs="0"/>
33
* <xs:element ref="Hint" minOccurs="0"/>
34
* <xs:element name="Label" type="xs:normalizedString" minOccurs="0"/>
35
* <xs:element name="Value" type="xs:normalizedString" minOccurs="0"/>
37
* <xs:attribute name="name" type="xs:ID" use="required"/>
41
/*****************************************************************************/
43
/*****************************************************************************/
46
static struct XmlSnippet schema_snippets[] = {
47
{ "Help", SNIPPET_NODE,
48
G_STRUCT_OFFSET(LassoIdWsf2IsInquiryElement, Help) },
49
{ "Hint", SNIPPET_CONTENT,
50
G_STRUCT_OFFSET(LassoIdWsf2IsInquiryElement, Hint) },
51
{ "Label", SNIPPET_CONTENT,
52
G_STRUCT_OFFSET(LassoIdWsf2IsInquiryElement, Label) },
53
{ "Value", SNIPPET_CONTENT,
54
G_STRUCT_OFFSET(LassoIdWsf2IsInquiryElement, Value) },
55
{ "name", SNIPPET_ATTRIBUTE,
56
G_STRUCT_OFFSET(LassoIdWsf2IsInquiryElement, name) },
60
static LassoNodeClass *parent_class = NULL;
63
/*****************************************************************************/
64
/* instance and class init functions */
65
/*****************************************************************************/
68
instance_init(LassoIdWsf2IsInquiryElement *node)
78
class_init(LassoIdWsf2IsInquiryElementClass *klass)
80
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
82
parent_class = g_type_class_peek_parent(klass);
83
nclass->node_data = g_new0(LassoNodeClassData, 1);
84
lasso_node_class_set_nodename(nclass, "Confirm");
85
lasso_node_class_set_ns(nclass, LASSO_IDWSF2_IS_HREF, LASSO_IDWSF2_IS_PREFIX);
86
lasso_node_class_add_snippets(nclass, schema_snippets);
90
lasso_idwsf2_is_inquiry_element_get_type()
92
static GType this_type = 0;
95
static const GTypeInfo this_info = {
96
sizeof (LassoIdWsf2IsInquiryElementClass),
99
(GClassInitFunc) class_init,
102
sizeof(LassoIdWsf2IsInquiryElement),
104
(GInstanceInitFunc) instance_init,
107
this_type = g_type_register_static(LASSO_TYPE_NODE,
108
"LassoIdWsf2IsInquiryElement", &this_info, 0);
114
* lasso_idwsf2_is_inquiry_element_new:
116
* Creates a new #LassoIdWsf2IsInquiryElement object.
118
* Return value: a newly created #LassoIdWsf2IsInquiryElement object
120
LassoIdWsf2IsInquiryElement*
121
lasso_idwsf2_is_inquiry_element_new()
123
return g_object_new(LASSO_TYPE_IDWSF2_IS_INQUIRY_ELEMENT, NULL);