1
/* $Id: wsa_attributed_any.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 "wsa_attributed_any.h"
28
* Schema fragment (ws-addr.xsd):
30
* <xs:complexType name="AttributedAnyType" mixed="false">
32
* <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
34
* <xs:anyAttribute namespace="##other" processContents="lax"/>
38
/*****************************************************************************/
40
/*****************************************************************************/
43
static struct XmlSnippet schema_snippets[] = {
44
{ "", SNIPPET_LIST_NODES | SNIPPET_ANY,
45
G_STRUCT_OFFSET(LassoWsAddrAttributedAny, any) },
46
{ "attributes", SNIPPET_ATTRIBUTE | SNIPPET_ANY,
47
G_STRUCT_OFFSET(LassoWsAddrAttributedAny, attributes) },
51
static LassoNodeClass *parent_class = NULL;
54
/*****************************************************************************/
55
/* instance and class init functions */
56
/*****************************************************************************/
59
instance_init(LassoWsAddrAttributedAny *node)
62
node->attributes = g_hash_table_new_full(
63
g_str_hash, g_str_equal, g_free, g_free);
67
class_init(LassoWsAddrAttributedAnyClass *klass)
69
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
71
parent_class = g_type_class_peek_parent(klass);
72
nclass->node_data = g_new0(LassoNodeClassData, 1);
73
lasso_node_class_set_nodename(nclass, "ProblemHeader");
74
lasso_node_class_set_ns(nclass, LASSO_WSA_HREF, LASSO_WSA_PREFIX);
75
lasso_node_class_add_snippets(nclass, schema_snippets);
79
lasso_wsa_attributed_any_get_type()
81
static GType this_type = 0;
84
static const GTypeInfo this_info = {
85
sizeof (LassoWsAddrAttributedAnyClass),
88
(GClassInitFunc) class_init,
91
sizeof(LassoWsAddrAttributedAny),
93
(GInstanceInitFunc) instance_init,
96
this_type = g_type_register_static(LASSO_TYPE_NODE,
97
"LassoWsAddrAttributedAny", &this_info, 0);
103
* lasso_wsa_attributed_any_new:
105
* Creates a new #LassoWsAddrAttributedAny object.
107
* Return value: a newly created #LassoWsAddrAttributedAny object
109
LassoWsAddrAttributedAny*
110
lasso_wsa_attributed_any_new()
112
return g_object_new(LASSO_TYPE_WSA_ATTRIBUTED_ANY, NULL);