1
/* $Id: samlp_status.c,v 1.4 2004/08/13 15:16:13 fpeters Exp $
3
* Lasso - A free implementation of the Liberty Alliance specifications.
5
* Copyright (C) 2004 Entr'ouvert
6
* http://lasso.entrouvert.org
8
* Authors: Nicolas Clapies <nclapies@entrouvert.com>
9
* Valery Febvre <vfebvre@easter-eggs.com>
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
#include <lasso/xml/samlp_status.h>
29
Schema fragment (oasis-sstc-saml-schema-protocol-1.0.xsd):
31
<element name="Status" type="samlp:StatusType"/>
32
<complexType name="StatusType">
34
<element ref="samlp:StatusCode"/>
35
<element ref="samlp:StatusMessage" minOccurs="0" maxOccurs="1"/>
36
<element ref="samlp:StatusDetail" minOccurs="0"/>
40
<element name="StatusMessage" type="string"/>
43
/*****************************************************************************/
45
/*****************************************************************************/
48
lasso_samlp_status_set_statusCode(LassoSamlpStatus *node,
49
LassoSamlpStatusCode *statusCode)
51
LassoNodeClass *class;
52
g_assert(LASSO_IS_SAMLP_STATUS(node));
53
g_assert(LASSO_IS_SAMLP_STATUS_CODE(statusCode));
55
class = LASSO_NODE_GET_CLASS(node);
56
class->add_child(LASSO_NODE (node), LASSO_NODE (statusCode), FALSE);
61
lasso_samlp_status_set_statusDetail(LassoSamlpStatus *node,
62
LassoSamlpStatusDetail *statusDetail)
68
lasso_samlp_status_set_statusMessage(LassoSamlpStatus *node,
69
const xmlChar *statusMessage)
71
LassoNodeClass *class;
72
g_assert(LASSO_IS_SAMLP_STATUS(node));
73
g_assert(statusMessage != NULL);
75
class = LASSO_NODE_GET_CLASS(node);
76
class->new_child(LASSO_NODE (node), "StatusMessage", statusMessage, FALSE);
79
/*****************************************************************************/
80
/* instance and class init functions */
81
/*****************************************************************************/
84
lasso_samlp_status_instance_init(LassoSamlpStatus *node)
86
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
88
class->set_ns(LASSO_NODE(node), lassoSamlProtocolHRef,
89
lassoSamlProtocolPrefix);
90
class->set_name(LASSO_NODE(node), "Status");
94
lasso_samlp_status_class_init(LassoSamlpStatusClass *klass)
98
GType lasso_samlp_status_get_type() {
99
static GType this_type = 0;
102
static const GTypeInfo this_info = {
103
sizeof (LassoSamlpStatusClass),
106
(GClassInitFunc) lasso_samlp_status_class_init,
109
sizeof(LassoSamlpStatus),
111
(GInstanceInitFunc) lasso_samlp_status_instance_init,
114
this_type = g_type_register_static(LASSO_TYPE_NODE,
121
LassoNode* lasso_samlp_status_new() {
122
return LASSO_NODE(g_object_new(LASSO_TYPE_SAMLP_STATUS,