~ubuntu-branches/ubuntu/jaunty/lasso/jaunty

« back to all changes in this revision

Viewing changes to lasso/xml/id-wsf-2.0/is_inquiry_element.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-11-01 20:01:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071101200120-9ruoui67n24xyz9c
Tags: 2.1.1-2ubuntu1
* Merge from debian unstable (LP: #134095), remaining changes:
  + debian/control:
    - Modify Maintainer value to match DebianMaintainerField spec.
  + configure{,.ac}:
    - Add missing quotes around the value for PHP[45]_LIBS.
* Fix two lintian warnings:
  + debian/control:
    - liblasso3-dev: Replace ${Source-Version} with ${binary:Version}
  + debian/rules:
    - Don't ignore a make clean error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: is_inquiry_element.c,v 1.0 2005/10/14 15:17:55 fpeters Exp $ 
 
2
 *
 
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
 
4
 *
 
5
 * Copyright (C) 2004-2007 Entr'ouvert
 
6
 * http://lasso.entrouvert.org
 
7
 * 
 
8
 * Authors: See AUTHORS file in top-level directory.
 
9
 *
 
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.
 
14
 * 
 
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.
 
19
 * 
 
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
 
23
 */
 
24
 
 
25
#include "is_inquiry_element.h"
 
26
 
 
27
/*
 
28
 * Schema fragment (liberty-idwsf-interaction-svc-v2.0.xsd):
 
29
 *
 
30
 * <xs:complexType name="InquiryElementType" abstract="true">
 
31
 *   <xs:sequence>
 
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"/>
 
36
 *   </xs:sequence>
 
37
 *   <xs:attribute name="name" type="xs:ID" use="required"/>
 
38
 * </xs:complexType>
 
39
 */
 
40
 
 
41
/*****************************************************************************/
 
42
/* private methods                                                           */
 
43
/*****************************************************************************/
 
44
 
 
45
 
 
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) },
 
57
        {NULL, 0, 0}
 
58
};
 
59
 
 
60
static LassoNodeClass *parent_class = NULL;
 
61
 
 
62
 
 
63
/*****************************************************************************/
 
64
/* instance and class init functions                                         */
 
65
/*****************************************************************************/
 
66
 
 
67
static void
 
68
instance_init(LassoIdWsf2IsInquiryElement *node)
 
69
{
 
70
        node->Help = NULL;
 
71
        node->Hint = NULL;
 
72
        node->Label = NULL;
 
73
        node->Value = NULL;
 
74
        node->name = NULL;
 
75
}
 
76
 
 
77
static void
 
78
class_init(LassoIdWsf2IsInquiryElementClass *klass)
 
79
{
 
80
        LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
 
81
 
 
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);
 
87
}
 
88
 
 
89
GType
 
90
lasso_idwsf2_is_inquiry_element_get_type()
 
91
{
 
92
        static GType this_type = 0;
 
93
 
 
94
        if (!this_type) {
 
95
                static const GTypeInfo this_info = {
 
96
                        sizeof (LassoIdWsf2IsInquiryElementClass),
 
97
                        NULL,
 
98
                        NULL,
 
99
                        (GClassInitFunc) class_init,
 
100
                        NULL,
 
101
                        NULL,
 
102
                        sizeof(LassoIdWsf2IsInquiryElement),
 
103
                        0,
 
104
                        (GInstanceInitFunc) instance_init,
 
105
                };
 
106
 
 
107
                this_type = g_type_register_static(LASSO_TYPE_NODE,
 
108
                                "LassoIdWsf2IsInquiryElement", &this_info, 0);
 
109
        }
 
110
        return this_type;
 
111
}
 
112
 
 
113
/**
 
114
 * lasso_idwsf2_is_inquiry_element_new:
 
115
 *
 
116
 * Creates a new #LassoIdWsf2IsInquiryElement object.
 
117
 *
 
118
 * Return value: a newly created #LassoIdWsf2IsInquiryElement object
 
119
 **/
 
120
LassoIdWsf2IsInquiryElement*
 
121
lasso_idwsf2_is_inquiry_element_new()
 
122
{
 
123
        return g_object_new(LASSO_TYPE_IDWSF2_IS_INQUIRY_ELEMENT, NULL);
 
124
}