1
/* $Id: saml_subject_locality.c,v 1.4 2004/08/13 15:16:13 fpeters Exp $
3
* Lasso - A free implementation of the Samlerty 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/saml_subject_locality.h>
29
The schema fragment (oasis-sstc-saml-schema-assertion-1.0.xsd):
31
<element name="SubjectLocality" type="saml:SubjectLocalityType"/>
32
<complexType name="SubjectLocalityType">
33
<attribute name="IPAddress" type="string" use="optional"/>
34
<attribute name="DNSAddress" type="string" use="optional"/>
38
/*****************************************************************************/
40
/*****************************************************************************/
43
lasso_saml_subject_locality_set_dnsAddress(LassoSamlSubjectLocality *node,
44
const xmlChar *dnsAddress)
46
LassoNodeClass *class;
47
g_assert(LASSO_IS_SAML_SUBJECT_LOCALITY(node));
48
g_assert(dnsAddress != NULL);
50
class = LASSO_NODE_GET_CLASS(node);
51
class->set_prop(LASSO_NODE (node), "DNSAddress", dnsAddress);
55
lasso_saml_subject_locality_set_ipAddress(LassoSamlSubjectLocality *node,
56
const xmlChar *ipAddress)
58
LassoNodeClass *class;
59
g_assert(LASSO_IS_SAML_SUBJECT_LOCALITY(node));
60
g_assert(ipAddress != NULL);
62
class = LASSO_NODE_GET_CLASS(node);
63
class->set_prop(LASSO_NODE (node), "IPAddress", ipAddress);
66
/*****************************************************************************/
67
/* instance and class init functions */
68
/*****************************************************************************/
71
lasso_saml_subject_locality_instance_init(LassoSamlSubjectLocality *node)
73
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
75
class->set_ns(LASSO_NODE(node), lassoSamlAssertionHRef,
76
lassoSamlAssertionPrefix);
77
class->set_name(LASSO_NODE(node), "SubjectLocality");
81
lasso_saml_subject_locality_class_init(LassoSamlSubjectLocalityClass *klass)
85
GType lasso_saml_subject_locality_get_type() {
86
static GType this_type = 0;
89
static const GTypeInfo this_info = {
90
sizeof (LassoSamlSubjectLocalityClass),
93
(GClassInitFunc) lasso_saml_subject_locality_class_init,
96
sizeof(LassoSamlSubjectLocality),
98
(GInstanceInitFunc) lasso_saml_subject_locality_instance_init,
101
this_type = g_type_register_static(LASSO_TYPE_NODE,
102
"LassoSamlSubjectLocality",
109
* lasso_saml_subject_locality_new:
111
* Creates a new <saml:SubjectLocality> node object.
113
* Return value: the new @LassoSamlSubjectLocality
115
LassoNode* lasso_saml_subject_locality_new()
117
return LASSO_NODE(g_object_new(LASSO_TYPE_SAML_SUBJECT_LOCALITY, NULL));