1 /* $Id: ps_add_known_entity_response.c,v 1.0 2005/10/14 15:17:55 fpeters Exp $
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 "ps_add_known_entity_response.h"
26 #include "idwsf2_strings.h"
27 
28 /**
29  * SECTION:ps_add_known_entity_response
30  * @short_description: &lt;ps:AddKnownEntityResponse&gt;
31  *
32  * <figure><title>Schema fragment for ps:AddKnownEntityResponse</title>
33  * <programlisting><![CDATA[
34  *
35  * <xs:complexType name="AddKnownEntityResponseType">
36  *   <xs:complexContent>
37  *     <xs:extension base="ResponseAbstractType">
38  *       <xs:sequence>
39  *         <xs:element ref="Object" minOccurs="0"/>
40  *         <xs:element ref="SPtoPSRedirectURL" minOccurs="0" maxOccurs="1"/>
41  *         <xs:element ref="QueryString" minOccurs="0" maxOccurs="1"/>
42  *       </xs:sequence>
43  *     </xs:extension>
44  *   </xs:complexContent>
45  * </xs:complexType>
46  * ]]></programlisting>
47  * </figure>
48  */
49 
50 /*****************************************************************************/
51 /* private methods                                                           */
52 /*****************************************************************************/
53 
54 
55 static struct XmlSnippet schema_snippets[] = {
56 	{ "Object", SNIPPET_NODE,
57 		G_STRUCT_OFFSET(LassoIdWsf2PsAddKnownEntityResponse, Object), NULL, NULL, NULL},
58 	{ "SPtoPSRedirectURL", SNIPPET_NODE,
59 		G_STRUCT_OFFSET(LassoIdWsf2PsAddKnownEntityResponse, SPtoPSRedirectURL), NULL, NULL, NULL},
60 	{ "QueryString", SNIPPET_NODE,
61 		G_STRUCT_OFFSET(LassoIdWsf2PsAddKnownEntityResponse, QueryString), NULL, NULL, NULL},
62 	{NULL, 0, 0, NULL, NULL, NULL}
63 };
64 
65 static LassoNodeClass *parent_class = NULL;
66 
67 
68 /*****************************************************************************/
69 /* instance and class init functions                                         */
70 /*****************************************************************************/
71 
72 
73 static void
class_init(LassoIdWsf2PsAddKnownEntityResponseClass * klass,void * unused G_GNUC_UNUSED)74 class_init(LassoIdWsf2PsAddKnownEntityResponseClass *klass, void *unused G_GNUC_UNUSED)
75 {
76 	LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
77 
78 	parent_class = g_type_class_peek_parent(klass);
79 	nclass->node_data = g_new0(LassoNodeClassData, 1);
80 	lasso_node_class_set_nodename(nclass, "AddKnownEntityResponse");
81 	lasso_node_class_set_ns(nclass, LASSO_IDWSF2_PS_HREF, LASSO_IDWSF2_PS_PREFIX);
82 	lasso_node_class_add_snippets(nclass, schema_snippets);
83 }
84 
85 GType
lasso_idwsf2_ps_add_known_entity_response_get_type()86 lasso_idwsf2_ps_add_known_entity_response_get_type()
87 {
88 	static GType this_type = 0;
89 
90 	if (!this_type) {
91 		static const GTypeInfo this_info = {
92 			sizeof (LassoIdWsf2PsAddKnownEntityResponseClass),
93 			NULL,
94 			NULL,
95 			(GClassInitFunc) class_init,
96 			NULL,
97 			NULL,
98 			sizeof(LassoIdWsf2PsAddKnownEntityResponse),
99 			0,
100 			NULL,
101 			NULL
102 		};
103 
104 		this_type = g_type_register_static(LASSO_TYPE_IDWSF2_PS_RESPONSE_ABSTRACT,
105 				"LassoIdWsf2PsAddKnownEntityResponse", &this_info, 0);
106 	}
107 	return this_type;
108 }
109 
110 /**
111  * lasso_idwsf2_ps_add_known_entity_response_new:
112  *
113  * Creates a new #LassoIdWsf2PsAddKnownEntityResponse object.
114  *
115  * Return value: a newly created #LassoIdWsf2PsAddKnownEntityResponse object
116  **/
117 LassoIdWsf2PsAddKnownEntityResponse*
lasso_idwsf2_ps_add_known_entity_response_new()118 lasso_idwsf2_ps_add_known_entity_response_new()
119 {
120 	return g_object_new(LASSO_TYPE_IDWSF2_PS_ADD_KNOWN_ENTITY_RESPONSE, NULL);
121 }
122