1
/* $Id: sa_password_transforms.c,v 1.1 2005/02/10 16:44:36 nclapies Exp $
3
* Lasso - A free implementation of the Liberty Alliance specifications.
5
* Copyright (C) 2004, 2005 Entr'ouvert
6
* http://lasso.entrouvert.org
8
* Authors: See AUTHORS file in top-level directory.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
#include <lasso/xml/sa_password_transforms.h>
28
* Schema fragments (liberty-idwsf-authn-svc-v1.0.xsd):
29
* <xs:element name="PasswordTransforms">
32
* Contains ordered list of sequential password transformations
37
* <xs:element name="Transform" maxOccurs="unbounded">
40
* <xs:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
43
* <xs:extension base="xs:string">
44
* <xs:attribute name="name" type="xs:string" use="required"/>
50
* <xs:attribute name="name" type="xs:anyURI" use="required"/>
51
* <xs:attribute name="id" type="xs:ID"use="optional"/>
59
/*****************************************************************************/
61
/*****************************************************************************/
63
static struct XmlSnippet schema_snippets[] = {
64
{ "Transform", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoSaPasswordTransforms, Transform) },
68
/*****************************************************************************/
69
/* instance and class init functions */
70
/*****************************************************************************/
73
instance_init(LassoSaPasswordTransforms *node)
75
node->Transform = NULL;
79
class_init(LassoSaPasswordTransformsClass *klass)
81
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
83
nclass->node_data = g_new0(LassoNodeClassData, 1);
84
lasso_node_class_set_nodename(nclass, "PasswordTransforms");
85
lasso_node_class_set_ns(nclass, LASSO_SA_HREF, LASSO_SA_PREFIX);
86
lasso_node_class_add_snippets(nclass, schema_snippets);
90
lasso_sa_password_transforms_get_type()
92
static GType this_type = 0;
95
static const GTypeInfo this_info = {
96
sizeof (LassoSaPasswordTransformsClass),
99
(GClassInitFunc) class_init,
102
sizeof(LassoSaPasswordTransforms),
104
(GInstanceInitFunc) instance_init,
107
this_type = g_type_register_static(LASSO_TYPE_NODE,
108
"LassoSaPasswordTransforms", &this_info, 0);
113
LassoSaPasswordTransforms*
114
lasso_sa_password_transforms_new()
116
LassoSaPasswordTransforms *node;
118
node = g_object_new(LASSO_TYPE_SA_PASSWORD_TRANSFORMS, NULL);
123
LassoSaPasswordTransforms*
124
lasso_sa_password_transforms_new_from_message(const gchar *message)
126
LassoSaPasswordTransforms *node;
128
g_return_val_if_fail(message != NULL, NULL);
130
node = g_object_new(LASSO_TYPE_SA_PASSWORD_TRANSFORMS, NULL);
131
lasso_node_init_from_message(LASSO_NODE(node), message);