1
/* $Id: lib_federation_termination_notification.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: Valery Febvre <vfebvre@easter-eggs.com>
9
* Nicolas Clapies <nclapies@entrouvert.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/lib_federation_termination_notification.h>
29
Schema fragment (liberty-idff-protocols-schema-v1.2.xsd):
31
<xs:element name="FederationTerminationNotification" type="FederationTerminationNotificationType"/>
32
<xs:complexType name="FederationTerminationNotificationType">
34
<xs:extension base="samlp:RequestAbstractType">
36
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
37
<xs:element ref="ProviderID"/>
38
<xs:element ref="saml:NameIdentifier"/>
40
<xs:attribute ref="consent" use="optional"/>
45
<xs:element name="ProviderID" type="md:entityIDType"/>
47
From liberty-metadata-v1.0.xsd:
48
<xs:simpleType name="entityIDType">
49
<xs:restriction base="xs:anyURI">
50
<xs:maxLength value="1024" id="maxlengthid"/>
56
/*****************************************************************************/
58
/*****************************************************************************/
61
lasso_lib_federation_termination_notification_set_consent(LassoLibFederationTerminationNotification *node,
62
const xmlChar *consent)
64
LassoNodeClass *class;
65
g_assert(LASSO_IS_LIB_FEDERATION_TERMINATION_NOTIFICATION(node));
66
g_assert(consent != NULL);
68
class = LASSO_NODE_GET_CLASS(node);
69
class->set_prop(LASSO_NODE (node), "consent", consent);
73
lasso_lib_federation_termination_notification_set_providerID(LassoLibFederationTerminationNotification *node,
74
const xmlChar *providerID)
76
LassoNodeClass *class;
77
g_assert(LASSO_IS_LIB_FEDERATION_TERMINATION_NOTIFICATION(node));
78
g_assert(providerID != NULL);
79
/* FIXME : providerId length SHOULD be <= 1024 */
81
class = LASSO_NODE_GET_CLASS(node);
82
class->new_child(LASSO_NODE (node), "ProviderID", providerID, FALSE);
86
lasso_lib_federation_termination_notification_set_nameIdentifier(LassoLibFederationTerminationNotification *node,
87
LassoSamlNameIdentifier *nameIdentifier)
89
LassoNodeClass *class;
90
g_assert(LASSO_IS_LIB_FEDERATION_TERMINATION_NOTIFICATION(node));
91
g_assert(LASSO_IS_SAML_NAME_IDENTIFIER(nameIdentifier));
93
class = LASSO_NODE_GET_CLASS(node);
94
class->add_child(LASSO_NODE (node), LASSO_NODE (nameIdentifier), FALSE);
97
/*****************************************************************************/
98
/* instance and class init functions */
99
/*****************************************************************************/
102
lasso_lib_federation_termination_notification_instance_init(LassoLibFederationTerminationNotification *node)
104
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
106
class->set_ns(LASSO_NODE(node), lassoLibHRef, lassoLibPrefix);
107
class->set_name(LASSO_NODE(node), "FederationTerminationNotification");
111
lasso_lib_federation_termination_notification_class_init(LassoLibFederationTerminationNotificationClass *klass)
115
GType lasso_lib_federation_termination_notification_get_type() {
116
static GType this_type = 0;
119
static const GTypeInfo this_info = {
120
sizeof (LassoLibFederationTerminationNotificationClass),
123
(GClassInitFunc) lasso_lib_federation_termination_notification_class_init,
126
sizeof(LassoLibFederationTerminationNotification),
128
(GInstanceInitFunc) lasso_lib_federation_termination_notification_instance_init,
131
this_type = g_type_register_static(LASSO_TYPE_SAMLP_REQUEST_ABSTRACT,
132
"LassoLibFederationTerminationNotification",
138
LassoNode* lasso_lib_federation_termination_notification_new() {
139
return LASSO_NODE(g_object_new(LASSO_TYPE_LIB_FEDERATION_TERMINATION_NOTIFICATION,