1 /* $Id$
2 *
3 * Lasso - A free implementation of the Liberty Alliance specifications.
4 *
5 * Copyright (C) 2004-2007 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, see <http://www.gnu.org/licenses/>.
22 */
23
24 #include "private.h"
25 #include "soap_binding_processing_context.h"
26 #include "idwsf_strings.h"
27
28 /**
29 * SECTION:soap_binding_processing_context
30 * @short_description: <soapbinding:ProcessingContextType>
31 *
32 * <figure><title>Schema fragment for soapbinding:ProcessingContextType</title>
33 * <programlisting><![CDATA[
34 *
35 * <xs:complexType name="ProcessingContextType">
36 * <xs:simpleContent>
37 * <xs:extension base="xs:anyURI">
38 * <xs:attribute name="id" type="xs:ID" use="optional"/>
39 * <xs:attribute ref="S:mustUnderstand" use="optional"/>
40 * <xs:attribute ref="S:actor" use="optional"/>
41 * </xs:extension>
42 * </xs:simpleContent>
43 * </xs:complexType>
44 * <xs:element name="ProcessingContext" type="ProcessingContextType"/>
45 *
46 * ]]></programlisting>
47 * </figure>
48 */
49
50 /*****************************************************************************/
51 /* private methods */
52 /*****************************************************************************/
53
54 static struct XmlSnippet schema_snippets[] = {
55 { "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, id), NULL, NULL, NULL},
56 { "mustUnderstand", SNIPPET_ATTRIBUTE,
57 G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, mustUnderstand), NULL, NULL, NULL},
58 { "actor", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, actor), NULL, NULL, NULL},
59 { "", SNIPPET_TEXT_CHILD, G_STRUCT_OFFSET(LassoSoapBindingProcessingContext, content), NULL, NULL, NULL},
60 {NULL, 0, 0, NULL, NULL, NULL}
61 };
62
63 /*****************************************************************************/
64 /* instance and class init functions */
65 /*****************************************************************************/
66
67
68 static void
class_init(LassoSoapBindingProcessingContextClass * klass,void * unused G_GNUC_UNUSED)69 class_init(LassoSoapBindingProcessingContextClass *klass, void *unused G_GNUC_UNUSED)
70 {
71 LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
72
73 nclass->node_data = g_new0(LassoNodeClassData, 1);
74 lasso_node_class_set_nodename(nclass, "ProcessingContext");
75 lasso_node_class_set_ns(nclass, LASSO_SOAP_BINDING_HREF, LASSO_SOAP_BINDING_PREFIX);
76 lasso_node_class_add_snippets(nclass, schema_snippets);
77 }
78
79 GType
lasso_soap_binding_processing_context_get_type()80 lasso_soap_binding_processing_context_get_type()
81 {
82 static GType this_type = 0;
83
84 if (!this_type) {
85 static const GTypeInfo this_info = {
86 sizeof (LassoSoapBindingProcessingContextClass),
87 NULL,
88 NULL,
89 (GClassInitFunc) class_init,
90 NULL,
91 NULL,
92 sizeof(LassoSoapBindingProcessingContext),
93 0,
94 NULL,
95 NULL
96 };
97
98 this_type = g_type_register_static(LASSO_TYPE_NODE,
99 "LassoSoapBindingProcessingContext", &this_info, 0);
100 }
101 return this_type;
102 }
103
104 LassoSoapBindingProcessingContext*
lasso_soap_binding_processing_context_new()105 lasso_soap_binding_processing_context_new()
106 {
107 LassoSoapBindingProcessingContext *node;
108
109 node = g_object_new(LASSO_TYPE_SOAP_BINDING_PROCESSING_CONTEXT, NULL);
110
111 return node;
112 }
113