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

« back to all changes in this revision

Viewing changes to lasso/xml/soap_binding_processing_context.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2005-09-16 02:16:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050916021649-lr5tuka6pfmmks44
Tags: 0.6.2-3ubuntu1
* debian/control: removed hardcoded php dependency, added php:Depends
  substvar
* debian/rules: added phpapiver, added substitution of php:Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: soap_binding_processing_context.c,v 1.1 2005/03/11 17:15:15 nclapies 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 <lasso/xml/soap_binding_processing_context.h>
 
26
 
 
27
/*
 
28
 * Schema fragments (liberty-idwsf-soap-binding-v1.1.xsd):
 
29
 *
 
30
 * <xs:complexType name="ProcessingContextType">
 
31
 *   <xs:simpleContent>
 
32
 *       <xs:extension base="xs:anyURI">
 
33
 *          <xs:attribute name="id" type="xs:ID" use="optional"/>
 
34
 *          <xs:attribute ref="S:mustUnderstand" use="optional"/>
 
35
 *          <xs:attribute ref="S:actor" use="optional"/>
 
36
 *       </xs:extension>
 
37
 *   </xs:simpleContent>
 
38
 * </xs:complexType>
 
39
 * <xs:element name="ProcessingContext" type="ProcessingContextType"/>
 
40
 *
 
41
 */ 
 
42
 
 
43
/*****************************************************************************/
 
44
/* private methods                                                           */
 
45
/*****************************************************************************/
 
46
 
 
47
static struct XmlSnippet schema_snippets[] = {
 
48
        { "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, id) },
 
49
        { "mustUnderstand", SNIPPET_ATTRIBUTE,
 
50
          G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, mustUnderstand) },
 
51
        { "actor", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, actor) },
 
52
        { NULL, 0, 0}
 
53
};
 
54
 
 
55
/*****************************************************************************/
 
56
/* instance and class init functions                                         */
 
57
/*****************************************************************************/
 
58
 
 
59
static void
 
60
instance_init(LassoSoapBindingProcessingContext *node)
 
61
{
 
62
        node->id = NULL;
 
63
        node->mustUnderstand = NULL;
 
64
        node->actor = NULL;
 
65
}
 
66
 
 
67
static void
 
68
class_init(LassoSoapBindingProcessingContextClass *klass)
 
69
{
 
70
        LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
 
71
 
 
72
        nclass->node_data = g_new0(LassoNodeClassData, 1);
 
73
        lasso_node_class_set_nodename(nclass, "ProcessingContext");
 
74
        lasso_node_class_set_ns(nclass, LASSO_SOAP_BINDING_HREF, LASSO_SOAP_BINDING_PREFIX);
 
75
        lasso_node_class_add_snippets(nclass, schema_snippets);
 
76
}
 
77
 
 
78
GType
 
79
lasso_soap_binding_processing_context_get_type()
 
80
{
 
81
        static GType this_type = 0;
 
82
 
 
83
        if (!this_type) {
 
84
                static const GTypeInfo this_info = {
 
85
                        sizeof (LassoSoapBindingProcessingContextClass),
 
86
                        NULL,
 
87
                        NULL,
 
88
                        (GClassInitFunc) class_init,
 
89
                        NULL,
 
90
                        NULL,
 
91
                        sizeof(LassoSoapBindingProcessingContext),
 
92
                        0,
 
93
                        (GInstanceInitFunc) instance_init,
 
94
                };
 
95
 
 
96
                this_type = g_type_register_static(LASSO_TYPE_NODE,
 
97
                                "LassoSoapBindingProcessingContext", &this_info, 0);
 
98
        }
 
99
        return this_type;
 
100
}
 
101
 
 
102
LassoSoapBindingProcessingContext*
 
103
lasso_soap_binding_processing_context_new()
 
104
{
 
105
        LassoSoapBindingProcessingContext *node;
 
106
 
 
107
        node = g_object_new(LASSO_TYPE_SOAP_BINDING_PROCESSING_CONTEXT, NULL);
 
108
 
 
109
        return node;
 
110
}
 
111
 
 
112
LassoSoapBindingProcessingContext*
 
113
lasso_soap_binding_processing_context_new_from_message(const gchar *message)
 
114
{
 
115
        LassoSoapBindingProcessingContext *node;
 
116
 
 
117
        g_return_val_if_fail(message != NULL, NULL);
 
118
 
 
119
        node = g_object_new(LASSO_TYPE_SOAP_BINDING_PROCESSING_CONTEXT, NULL);
 
120
        lasso_node_init_from_message(LASSO_NODE(node), message);
 
121
 
 
122
        return node;
 
123
}