1
/* $Id: disco_security_context.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 "disco_security_context.h"
28
* Schema fragment (liberty-idwsf-disco-svc-v2.0.xsd):
30
* <xs:element name="SecurityContext">
33
* <xs:element ref="SecurityMechID"
35
* maxOccurs="unbounded"/>
37
* <xs:element ref="sec:Token"
39
* maxOccurs="unbounded"/>
45
/*****************************************************************************/
47
/*****************************************************************************/
50
static struct XmlSnippet schema_snippets[] = {
51
{ "SecurityMechID", SNIPPET_LIST_CONTENT,
52
G_STRUCT_OFFSET(LassoIdWsf2DiscoSecurityContext, SecurityMechID) },
53
{ "Token", SNIPPET_LIST_NODES,
54
G_STRUCT_OFFSET(LassoIdWsf2DiscoSecurityContext, Token) },
58
static LassoNodeClass *parent_class = NULL;
61
/*****************************************************************************/
62
/* instance and class init functions */
63
/*****************************************************************************/
66
instance_init(LassoIdWsf2DiscoSecurityContext *node)
68
node->SecurityMechID = NULL;
73
class_init(LassoIdWsf2DiscoSecurityContextClass *klass)
75
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
77
parent_class = g_type_class_peek_parent(klass);
78
nclass->node_data = g_new0(LassoNodeClassData, 1);
79
lasso_node_class_set_nodename(nclass, "SecurityContext");
80
lasso_node_class_set_ns(nclass, LASSO_IDWSF2_DISCO_HREF, LASSO_IDWSF2_DISCO_PREFIX);
81
lasso_node_class_add_snippets(nclass, schema_snippets);
85
lasso_idwsf2_disco_security_context_get_type()
87
static GType this_type = 0;
90
static const GTypeInfo this_info = {
91
sizeof (LassoIdWsf2DiscoSecurityContextClass),
94
(GClassInitFunc) class_init,
97
sizeof(LassoIdWsf2DiscoSecurityContext),
99
(GInstanceInitFunc) instance_init,
102
this_type = g_type_register_static(LASSO_TYPE_NODE,
103
"LassoIdWsf2DiscoSecurityContext", &this_info, 0);
109
* lasso_idwsf2_disco_security_context_new:
111
* Creates a new #LassoIdWsf2DiscoSecurityContext object.
113
* Return value: a newly created #LassoIdWsf2DiscoSecurityContext object
115
LassoIdWsf2DiscoSecurityContext*
116
lasso_idwsf2_disco_security_context_new()
118
return g_object_new(LASSO_TYPE_IDWSF2_DISCO_SECURITY_CONTEXT, NULL);