~ubuntu-branches/ubuntu/utopic/lasso/utopic-proposed

« back to all changes in this revision

Viewing changes to lasso/xml/lib_idp_provided_name_identifier.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2004-09-13 09:26:34 UTC
  • Revision ID: james.westby@ubuntu.com-20040913092634-01vdfl8j9cp94exa
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: lib_idp_provided_name_identifier.c,v 1.7 2004/09/01 09:59:53 fpeters Exp $
 
2
 *
 
3
 * Lasso - A free implementation of the Samlerty Alliance specifications.
 
4
 *
 
5
 * Copyright (C) 2004 Entr'ouvert
 
6
 * http://lasso.entrouvert.org
 
7
 * 
 
8
 * Authors: Nicolas Clapies <nclapies@entrouvert.com>
 
9
 *          Valery Febvre <vfebvre@easter-eggs.com>
 
10
 *
 
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.
 
15
 * 
 
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.
 
20
 * 
 
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
 
24
 */
 
25
 
 
26
#include <lasso/xml/lib_idp_provided_name_identifier.h>
 
27
 
 
28
/*
 
29
 
 
30
<xs:element name="IDPProvidedNameIdentifier" type="saml:NameIdentifierType"/>
 
31
 
 
32
*/
 
33
 
 
34
/*****************************************************************************/
 
35
/* instance and class init functions                                         */
 
36
/*****************************************************************************/
 
37
 
 
38
static void
 
39
lasso_lib_idp_provided_name_identifier_instance_init(LassoLibIDPProvidedNameIdentifier *node)
 
40
{
 
41
  LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
 
42
 
 
43
  class->set_ns(LASSO_NODE(node), lassoLibHRef, lassoLibPrefix);
 
44
  class->set_name(LASSO_NODE(node), "IDPProvidedNameIdentifier");
 
45
}
 
46
 
 
47
static void
 
48
lasso_lib_idp_provided_name_identifier_class_init(LassoLibIDPProvidedNameIdentifierClass *klass)
 
49
{
 
50
}
 
51
 
 
52
GType lasso_lib_idp_provided_name_identifier_get_type() {
 
53
  static GType this_type = 0;
 
54
 
 
55
  if (!this_type) {
 
56
    static const GTypeInfo this_info = {
 
57
      sizeof (LassoLibIDPProvidedNameIdentifierClass),
 
58
      NULL,
 
59
      NULL,
 
60
      (GClassInitFunc) lasso_lib_idp_provided_name_identifier_class_init,
 
61
      NULL,
 
62
      NULL,
 
63
      sizeof(LassoLibIDPProvidedNameIdentifierClass),
 
64
      0,
 
65
      (GInstanceInitFunc) lasso_lib_idp_provided_name_identifier_instance_init,
 
66
    };
 
67
    
 
68
    this_type = g_type_register_static(LASSO_TYPE_SAML_NAME_IDENTIFIER,
 
69
                                       "LassoLibIDPProvidedNameIdentifier",
 
70
                                       &this_info, 0);
 
71
  }
 
72
  return this_type;
 
73
}
 
74
 
 
75
LassoNode*
 
76
lasso_lib_idp_provided_name_identifier_new(const xmlChar *content)
 
77
{
 
78
  LassoNode *node;
 
79
 
 
80
  g_assert(content != NULL);
 
81
 
 
82
  node = LASSO_NODE(g_object_new(LASSO_TYPE_LIB_IDP_PROVIDED_NAME_IDENTIFIER,
 
83
                                 NULL));
 
84
  xmlNodeSetContent(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node),
 
85
                    content);
 
86
  return node;
 
87
}