1
/* $Id: lib_idp_list.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/lib_idp_list.h>
29
Schema fragment (liberty-idff-protocols-schema-v1.2.xsd):
31
<xs:element name="IDPList" type="IDPListType"/>
32
<xs:complexType name="IDPListType">
34
<xs:element ref="IDPEntries"/>
35
<xs:element ref="GetComplete" minOccurs="0"/>
39
<xs:element name="GetComplete" type="xs:anyURI"/>
42
/*****************************************************************************/
44
/*****************************************************************************/
47
* lasso_lib_idp_list_set_getComplete:
48
* @node: the pointer to <lib:IDPList/> node object
49
* @getComplete: the value of "GetComplete" element.
51
* Sets the "GetComplete" element [optional].
53
* If the identity provider list is not complete, this element may be included
54
* with a URI that points to where the complete list can be retrieved.
57
lasso_lib_idp_list_set_getComplete(LassoLibIDPList *node,
58
const xmlChar *getComplete)
60
LassoNodeClass *class;
61
g_assert(LASSO_IS_LIB_IDP_LIST(node));
62
g_assert(getComplete != NULL);
64
class = LASSO_NODE_GET_CLASS(node);
65
class->new_child(LASSO_NODE (node), "GetComplete", getComplete, FALSE);
69
* lasso_lib_idp_list_set_idpEntries:
70
* @node: the pointer to <lib:IDPList/> node object
71
* @idpEntries: the pointer to <lib:IDPEntries/> node object
73
* Set the "IDPEntries" element [required].
75
* It contains a list of identity provider entries.
78
lasso_lib_idp_list_set_idpEntries(LassoLibIDPList *node,
79
LassoLibIDPEntries *idpEntries)
81
LassoNodeClass *class;
82
g_assert(LASSO_IS_LIB_IDP_LIST(node));
83
g_assert(LASSO_IS_LIB_IDP_ENTRIES(idpEntries));
85
class = LASSO_NODE_GET_CLASS(node);
86
class->add_child(LASSO_NODE (node), LASSO_NODE(idpEntries), FALSE);
89
/*****************************************************************************/
90
/* instance and class init functions */
91
/*****************************************************************************/
94
lasso_lib_idp_list_instance_init(LassoLibIDPList *node)
96
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
98
class->set_ns(LASSO_NODE(node), lassoLibHRef, lassoLibPrefix);
99
class->set_name(LASSO_NODE(node), "IDPList");
103
lasso_lib_idp_list_class_init(LassoLibIDPListClass *klass)
107
GType lasso_lib_idp_list_get_type() {
108
static GType this_type = 0;
111
static const GTypeInfo this_info = {
112
sizeof (LassoLibIDPListClass),
115
(GClassInitFunc) lasso_lib_idp_list_class_init,
118
sizeof(LassoLibIDPList),
120
(GInstanceInitFunc) lasso_lib_idp_list_instance_init,
123
this_type = g_type_register_static(LASSO_TYPE_NODE,
131
* lasso_lib_idp_list_new:
133
* Creates a new <lib:IDPList/> node object.
135
* In the request envelope, some profiles may wish to allow the service
136
* provider to transport a list of identity providers to the user agent. This
137
* specification provides a schema that profiles SHOULD use for this purpose.
139
* Return value: the new @LassoLibIDPList
141
LassoNode* lasso_lib_idp_list_new()
143
return LASSO_NODE(g_object_new(LASSO_TYPE_LIB_IDP_LIST, NULL));