~ubuntu-branches/ubuntu/gutsy/lasso/gutsy-security

« back to all changes in this revision

Viewing changes to lasso/xml/saml-2.0/saml2_statement_abstract.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-11 10:01:32 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060711100132-e50ymjc54bsizza6
Tags: 0.6.5-2ubuntu1
* Synchronize with Debian unstable.
* Convert to updated Python policy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: saml2_statement_abstract.c,v 1.2 2005/11/21 18:51:52 fpeters Exp $ 
 
2
 *
 
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
 
4
 *
 
5
 * Copyright (C) 2004, 2005 Entr'ouvert
 
6
 * http://lasso.entrouvert.org
 
7
 * 
 
8
 * Authors: See AUTHORS file in top-level directory.
 
9
 *
 
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.
 
14
 * 
 
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.
 
19
 * 
 
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
 
23
 */
 
24
 
 
25
#include "saml2_statement_abstract.h"
 
26
 
 
27
/*
 
28
 * Schema fragment (saml-schema-assertion-2.0.xsd):
 
29
 *
 
30
 * <complexType name="StatementAbstractType" abstract="true"/>
 
31
 * <element name="AuthnStatement" type="saml:AuthnStatementType"/>
 
32
 * <complexType name="AuthnStatementType">
 
33
 *   <complexContent>
 
34
 *     <extension base="saml:StatementAbstractType">
 
35
 *       <sequence>
 
36
 *         <element ref="saml:SubjectLocality" minOccurs="0"/>
 
37
 *         <element ref="saml:AuthnContext"/>
 
38
 *       </sequence>
 
39
 *       <attribute name="AuthnInstant" type="dateTime" use="required"/>
 
40
 *       <attribute name="SessionIndex" type="string" use="optional"/>
 
41
 *       <attribute name="SessionNotOnOrAfter" type="dateTime" use="optional"/>
 
42
 *     </extension>
 
43
 *   </complexContent>
 
44
 * </complexType>
 
45
 */
 
46
 
 
47
/*****************************************************************************/
 
48
/* private methods                                                           */
 
49
/*****************************************************************************/
 
50
 
 
51
 
 
52
static struct XmlSnippet schema_snippets[] = {
 
53
        {NULL, 0, 0}
 
54
};
 
55
 
 
56
static LassoNodeClass *parent_class = NULL;
 
57
 
 
58
 
 
59
/*****************************************************************************/
 
60
/* instance and class init functions                                         */
 
61
/*****************************************************************************/
 
62
 
 
63
static void
 
64
instance_init(LassoSaml2StatementAbstract *node)
 
65
{
 
66
}
 
67
 
 
68
static void
 
69
class_init(LassoSaml2StatementAbstractClass *klass)
 
70
{
 
71
        LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
 
72
 
 
73
        parent_class = g_type_class_peek_parent(klass);
 
74
        nclass->node_data = g_new0(LassoNodeClassData, 1);
 
75
        lasso_node_class_set_nodename(nclass, "StatementAbstract"); 
 
76
        lasso_node_class_set_ns(nclass, LASSO_SAML2_ASSERTION_HREF, LASSO_SAML2_ASSERTION_PREFIX);
 
77
        lasso_node_class_add_snippets(nclass, schema_snippets);
 
78
}
 
79
 
 
80
GType
 
81
lasso_saml2_statement_abstract_get_type()
 
82
{
 
83
        static GType this_type = 0;
 
84
 
 
85
        if (!this_type) {
 
86
                static const GTypeInfo this_info = {
 
87
                        sizeof (LassoSaml2StatementAbstractClass),
 
88
                        NULL,
 
89
                        NULL,
 
90
                        (GClassInitFunc) class_init,
 
91
                        NULL,
 
92
                        NULL,
 
93
                        sizeof(LassoSaml2StatementAbstract),
 
94
                        0,
 
95
                        (GInstanceInitFunc) instance_init,
 
96
                };
 
97
 
 
98
                this_type = g_type_register_static(LASSO_TYPE_NODE,
 
99
                                "LassoSaml2StatementAbstract", &this_info, 0);
 
100
        }
 
101
        return this_type;
 
102
}
 
103
 
 
104
/**
 
105
 * lasso_saml2_statement_abstract_new:
 
106
 *
 
107
 * Creates a new #LassoSaml2StatementAbstract object.
 
108
 *
 
109
 * Return value: a newly created #LassoSaml2StatementAbstract object
 
110
 **/
 
111
LassoNode*
 
112
lasso_saml2_statement_abstract_new()
 
113
{
 
114
        return g_object_new(LASSO_TYPE_SAML2_STATEMENT_ABSTRACT, NULL);
 
115
}