1
/* $Id: lib_name_identifier_mapping_response.c,v 1.5 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/lib_name_identifier_mapping_response.h>
29
The Schema fragment (liberty-idff-protocols-schema-v1.2.xsd):
31
<xs:element name="NameIdentifierMappingResponse" type="NameIdentifierMappingResponseType"/>
32
<xs:complexType name="NameIdentifierMappingResponseType">
34
<xs:extension base="samlp:ResponseAbstractType">
36
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
37
<xs:element ref="ProviderID"/>
38
<xs:element ref="samlp:Status"/>
39
<xs:element ref="saml:NameIdentifier" minOccurs="0"/>
47
/*****************************************************************************/
49
/*****************************************************************************/
51
void lasso_lib_name_identifier_mapping_response_set_nameIdentifier(LassoLibNameIdentifierMappingResponse *node,
52
LassoSamlNameIdentifier *nameIdentifier)
54
LassoNodeClass *class;
55
g_assert(LASSO_IS_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE(node));
56
g_assert(LASSO_IS_SAML_NAME_IDENTIFIER(nameIdentifier));
58
class = LASSO_NODE_GET_CLASS(node);
59
class->add_child(LASSO_NODE (node),
60
LASSO_NODE (nameIdentifier),
65
lasso_lib_name_identifier_mapping_response_set_providerID(LassoLibNameIdentifierMappingResponse *node,
66
const xmlChar *providerID)
68
LassoNodeClass *class;
69
g_assert(LASSO_IS_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE(node));
70
g_assert(providerID != NULL);
71
/* FIXME : providerID length SHOULD be <= 1024 */
73
class = LASSO_NODE_GET_CLASS(node);
74
class->new_child(LASSO_NODE (node), "ProviderID", providerID, FALSE);
77
void lasso_lib_name_identifier_mapping_response_set_status(LassoLibNameIdentifierMappingResponse *node,
78
LassoSamlpStatus *status)
80
LassoNodeClass *class;
81
g_assert(LASSO_IS_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE(node));
82
g_assert(LASSO_IS_SAMLP_STATUS(status));
84
class = LASSO_NODE_GET_CLASS(node);
85
class->add_child(LASSO_NODE (node), LASSO_NODE(status), FALSE);
88
/*****************************************************************************/
89
/* instance and class init functions */
90
/*****************************************************************************/
93
lasso_lib_name_identifier_mapping_response_instance_init(LassoLibNameIdentifierMappingResponse *node)
95
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
97
class->set_ns(LASSO_NODE(node), lassoLibHRef, lassoLibPrefix);
98
class->set_name(LASSO_NODE(node), "NameIdentifierMappingResponse");
102
lasso_lib_name_identifier_mapping_response_class_init(LassoLibNameIdentifierMappingResponseClass *klass)
106
GType lasso_lib_name_identifier_mapping_response_get_type() {
107
static GType name_identifier_mapping_response_type = 0;
109
if (!name_identifier_mapping_response_type) {
110
static const GTypeInfo name_identifier_mapping_response_info = {
111
sizeof (LassoLibNameIdentifierMappingResponseClass),
114
(GClassInitFunc) lasso_lib_name_identifier_mapping_response_class_init,
117
sizeof(LassoLibNameIdentifierMappingResponse),
119
(GInstanceInitFunc) lasso_lib_name_identifier_mapping_response_instance_init,
122
name_identifier_mapping_response_type = g_type_register_static(LASSO_TYPE_SAMLP_RESPONSE_ABSTRACT,
123
"LassoLibNameIdentifierMappingResponse",
124
&name_identifier_mapping_response_info, 0);
126
return name_identifier_mapping_response_type;
129
LassoNode* lasso_lib_name_identifier_mapping_response_new()
131
return LASSO_NODE(g_object_new(LASSO_TYPE_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE, NULL));