1
/* valadbusinterfaceregisterfunction.c generated by valac, the Vala compiler
2
* generated from valadbusinterfaceregisterfunction.vala, do not modify */
4
/* valadbusinterfaceregisterfunction.vala
6
* Copyright (C) 2009 Didier Villevalois
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
* Didier Villevalois <ptitjes@free.fr>
27
#include <glib-object.h>
31
#include <valaccode.h>
34
#define VALA_TYPE_TYPEREGISTER_FUNCTION (vala_typeregister_function_get_type ())
35
#define VALA_TYPEREGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunction))
36
#define VALA_TYPEREGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunctionClass))
37
#define VALA_IS_TYPEREGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TYPEREGISTER_FUNCTION))
38
#define VALA_IS_TYPEREGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TYPEREGISTER_FUNCTION))
39
#define VALA_TYPEREGISTER_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TYPEREGISTER_FUNCTION, ValaTypeRegisterFunctionClass))
41
typedef struct _ValaTypeRegisterFunction ValaTypeRegisterFunction;
42
typedef struct _ValaTypeRegisterFunctionClass ValaTypeRegisterFunctionClass;
43
typedef struct _ValaTypeRegisterFunctionPrivate ValaTypeRegisterFunctionPrivate;
45
#define VALA_TYPE_INTERFACE_REGISTER_FUNCTION (vala_interface_register_function_get_type ())
46
#define VALA_INTERFACE_REGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_INTERFACE_REGISTER_FUNCTION, ValaInterfaceRegisterFunction))
47
#define VALA_INTERFACE_REGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_INTERFACE_REGISTER_FUNCTION, ValaInterfaceRegisterFunctionClass))
48
#define VALA_IS_INTERFACE_REGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_INTERFACE_REGISTER_FUNCTION))
49
#define VALA_IS_INTERFACE_REGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_INTERFACE_REGISTER_FUNCTION))
50
#define VALA_INTERFACE_REGISTER_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_INTERFACE_REGISTER_FUNCTION, ValaInterfaceRegisterFunctionClass))
52
typedef struct _ValaInterfaceRegisterFunction ValaInterfaceRegisterFunction;
53
typedef struct _ValaInterfaceRegisterFunctionClass ValaInterfaceRegisterFunctionClass;
54
typedef struct _ValaInterfaceRegisterFunctionPrivate ValaInterfaceRegisterFunctionPrivate;
56
#define VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION (vala_dbus_interface_register_function_get_type ())
57
#define VALA_DBUS_INTERFACE_REGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION, ValaDBusInterfaceRegisterFunction))
58
#define VALA_DBUS_INTERFACE_REGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION, ValaDBusInterfaceRegisterFunctionClass))
59
#define VALA_IS_DBUS_INTERFACE_REGISTER_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION))
60
#define VALA_IS_DBUS_INTERFACE_REGISTER_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION))
61
#define VALA_DBUS_INTERFACE_REGISTER_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION, ValaDBusInterfaceRegisterFunctionClass))
63
typedef struct _ValaDBusInterfaceRegisterFunction ValaDBusInterfaceRegisterFunction;
64
typedef struct _ValaDBusInterfaceRegisterFunctionClass ValaDBusInterfaceRegisterFunctionClass;
65
typedef struct _ValaDBusInterfaceRegisterFunctionPrivate ValaDBusInterfaceRegisterFunctionPrivate;
66
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
67
#define _g_free0(var) (var = (g_free (var), NULL))
69
struct _ValaTypeRegisterFunction {
70
GTypeInstance parent_instance;
71
volatile int ref_count;
72
ValaTypeRegisterFunctionPrivate * priv;
75
struct _ValaTypeRegisterFunctionClass {
76
GTypeClass parent_class;
77
void (*finalize) (ValaTypeRegisterFunction *self);
78
ValaTypeSymbol* (*get_type_declaration) (ValaTypeRegisterFunction* self);
79
gchar* (*get_type_struct_name) (ValaTypeRegisterFunction* self);
80
gchar* (*get_base_init_func_name) (ValaTypeRegisterFunction* self);
81
gchar* (*get_class_finalize_func_name) (ValaTypeRegisterFunction* self);
82
gchar* (*get_base_finalize_func_name) (ValaTypeRegisterFunction* self);
83
gchar* (*get_class_init_func_name) (ValaTypeRegisterFunction* self);
84
gchar* (*get_instance_struct_size) (ValaTypeRegisterFunction* self);
85
gchar* (*get_instance_init_func_name) (ValaTypeRegisterFunction* self);
86
gchar* (*get_parent_type_name) (ValaTypeRegisterFunction* self);
87
gchar* (*get_gtype_value_table_init_function_name) (ValaTypeRegisterFunction* self);
88
gchar* (*get_gtype_value_table_peek_pointer_function_name) (ValaTypeRegisterFunction* self);
89
gchar* (*get_gtype_value_table_free_function_name) (ValaTypeRegisterFunction* self);
90
gchar* (*get_gtype_value_table_copy_function_name) (ValaTypeRegisterFunction* self);
91
gchar* (*get_gtype_value_table_lcopy_value_function_name) (ValaTypeRegisterFunction* self);
92
gchar* (*get_gtype_value_table_collect_value_function_name) (ValaTypeRegisterFunction* self);
93
gchar* (*get_type_flags) (ValaTypeRegisterFunction* self);
94
ValaCCodeFragment* (*get_type_interface_init_declaration) (ValaTypeRegisterFunction* self);
95
ValaCCodeFragment* (*get_type_interface_init_statements) (ValaTypeRegisterFunction* self, gboolean plugin);
96
ValaSymbolAccessibility (*get_accessibility) (ValaTypeRegisterFunction* self);
99
struct _ValaInterfaceRegisterFunction {
100
ValaTypeRegisterFunction parent_instance;
101
ValaInterfaceRegisterFunctionPrivate * priv;
104
struct _ValaInterfaceRegisterFunctionClass {
105
ValaTypeRegisterFunctionClass parent_class;
108
struct _ValaDBusInterfaceRegisterFunction {
109
ValaInterfaceRegisterFunction parent_instance;
110
ValaDBusInterfaceRegisterFunctionPrivate * priv;
113
struct _ValaDBusInterfaceRegisterFunctionClass {
114
ValaInterfaceRegisterFunctionClass parent_class;
118
static gpointer vala_dbus_interface_register_function_parent_class = NULL;
120
gpointer vala_typeregister_function_ref (gpointer instance);
121
void vala_typeregister_function_unref (gpointer instance);
122
GParamSpec* vala_param_spec_typeregister_function (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
123
void vala_value_set_typeregister_function (GValue* value, gpointer v_object);
124
void vala_value_take_typeregister_function (GValue* value, gpointer v_object);
125
gpointer vala_value_get_typeregister_function (const GValue* value);
126
GType vala_typeregister_function_get_type (void) G_GNUC_CONST;
127
GType vala_interface_register_function_get_type (void) G_GNUC_CONST;
128
GType vala_dbus_interface_register_function_get_type (void) G_GNUC_CONST;
130
VALA_DBUS_INTERFACE_REGISTER_FUNCTION_DUMMY_PROPERTY
132
ValaDBusInterfaceRegisterFunction* vala_dbus_interface_register_function_new (ValaInterface* iface, ValaCodeContext* context);
133
ValaDBusInterfaceRegisterFunction* vala_dbus_interface_register_function_construct (GType object_type, ValaInterface* iface, ValaCodeContext* context);
134
ValaInterfaceRegisterFunction* vala_interface_register_function_new (ValaInterface* iface, ValaCodeContext* context);
135
ValaInterfaceRegisterFunction* vala_interface_register_function_construct (GType object_type, ValaInterface* iface, ValaCodeContext* context);
136
static ValaCCodeFragment* vala_dbus_interface_register_function_real_get_type_interface_init_statements (ValaTypeRegisterFunction* base, gboolean plugin);
137
ValaCCodeFragment* vala_typeregister_function_get_type_interface_init_statements (ValaTypeRegisterFunction* self, gboolean plugin);
138
ValaInterface* vala_interface_register_function_get_interface_reference (ValaInterfaceRegisterFunction* self);
141
ValaDBusInterfaceRegisterFunction* vala_dbus_interface_register_function_construct (GType object_type, ValaInterface* iface, ValaCodeContext* context) {
142
ValaDBusInterfaceRegisterFunction* self = NULL;
143
g_return_val_if_fail (iface != NULL, NULL);
144
g_return_val_if_fail (context != NULL, NULL);
145
self = (ValaDBusInterfaceRegisterFunction*) vala_interface_register_function_construct (object_type, iface, context);
150
ValaDBusInterfaceRegisterFunction* vala_dbus_interface_register_function_new (ValaInterface* iface, ValaCodeContext* context) {
151
return vala_dbus_interface_register_function_construct (VALA_TYPE_DBUS_INTERFACE_REGISTER_FUNCTION, iface, context);
155
static ValaCCodeFragment* vala_dbus_interface_register_function_real_get_type_interface_init_statements (ValaTypeRegisterFunction* base, gboolean plugin) {
156
ValaDBusInterfaceRegisterFunction * self;
157
ValaCCodeFragment* result = NULL;
158
ValaCCodeFragment* _tmp0_ = NULL;
159
ValaCCodeFragment* frag;
160
ValaCCodeIdentifier* _tmp1_ = NULL;
161
ValaCCodeIdentifier* _tmp2_;
162
ValaCCodeFunctionCall* _tmp3_ = NULL;
163
ValaCCodeFunctionCall* _tmp4_;
164
ValaCCodeFunctionCall* quark_dbus_proxy;
165
ValaCCodeConstant* _tmp5_ = NULL;
166
ValaCCodeConstant* _tmp6_;
167
ValaCCodeIdentifier* _tmp7_ = NULL;
168
ValaCCodeIdentifier* _tmp8_;
169
ValaCCodeFunctionCall* _tmp9_ = NULL;
170
ValaCCodeFunctionCall* _tmp10_;
171
ValaCCodeFunctionCall* func;
172
ValaInterface* _tmp11_ = NULL;
173
gchar* _tmp12_ = NULL;
175
gchar* _tmp14_ = NULL;
177
ValaCCodeIdentifier* _tmp16_ = NULL;
178
ValaCCodeIdentifier* _tmp17_;
179
ValaInterface* _tmp18_ = NULL;
180
gchar* _tmp19_ = NULL;
182
gchar* _tmp21_ = NULL;
184
ValaCCodeIdentifier* _tmp23_ = NULL;
185
ValaCCodeIdentifier* _tmp24_;
186
ValaCCodeUnaryExpression* _tmp25_ = NULL;
187
ValaCCodeUnaryExpression* _tmp26_;
188
ValaCCodeExpressionStatement* _tmp27_ = NULL;
189
ValaCCodeExpressionStatement* _tmp28_;
190
self = (ValaDBusInterfaceRegisterFunction*) base;
191
_tmp0_ = VALA_TYPEREGISTER_FUNCTION_CLASS (vala_dbus_interface_register_function_parent_class)->get_type_interface_init_statements ((ValaTypeRegisterFunction*) VALA_INTERFACE_REGISTER_FUNCTION (self), plugin);
193
_tmp1_ = vala_ccode_identifier_new ("g_quark_from_string");
195
_tmp3_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp2_);
196
quark_dbus_proxy = (_tmp4_ = _tmp3_, _vala_ccode_node_unref0 (_tmp2_), _tmp4_);
197
_tmp5_ = vala_ccode_constant_new ("\"ValaDBusInterfaceProxyType\"");
199
vala_ccode_function_call_add_argument (quark_dbus_proxy, (ValaCCodeExpression*) _tmp6_);
200
_vala_ccode_node_unref0 (_tmp6_);
201
_tmp7_ = vala_ccode_identifier_new ("g_type_set_qdata");
203
_tmp9_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp8_);
204
func = (_tmp10_ = _tmp9_, _vala_ccode_node_unref0 (_tmp8_), _tmp10_);
205
_tmp11_ = vala_interface_register_function_get_interface_reference ((ValaInterfaceRegisterFunction*) self);
206
_tmp12_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) _tmp11_, NULL);
208
_tmp14_ = g_strdup_printf ("%s_type_id", _tmp13_);
210
_tmp16_ = vala_ccode_identifier_new (_tmp15_);
212
vala_ccode_function_call_add_argument (func, (ValaCCodeExpression*) _tmp17_);
213
_vala_ccode_node_unref0 (_tmp17_);
216
vala_ccode_function_call_add_argument (func, (ValaCCodeExpression*) quark_dbus_proxy);
217
_tmp18_ = vala_interface_register_function_get_interface_reference ((ValaInterfaceRegisterFunction*) self);
218
_tmp19_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) _tmp18_, NULL);
220
_tmp21_ = g_strdup_printf ("%s_dbus_proxy_get_type", _tmp20_);
222
_tmp23_ = vala_ccode_identifier_new (_tmp22_);
224
_tmp25_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp24_);
226
vala_ccode_function_call_add_argument (func, (ValaCCodeExpression*) _tmp26_);
227
_vala_ccode_node_unref0 (_tmp26_);
228
_vala_ccode_node_unref0 (_tmp24_);
231
_tmp27_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) func);
233
vala_ccode_fragment_append (frag, (ValaCCodeNode*) _tmp28_);
234
_vala_ccode_node_unref0 (_tmp28_);
236
_vala_ccode_node_unref0 (func);
237
_vala_ccode_node_unref0 (quark_dbus_proxy);
242
static void vala_dbus_interface_register_function_class_init (ValaDBusInterfaceRegisterFunctionClass * klass) {
243
vala_dbus_interface_register_function_parent_class = g_type_class_peek_parent (klass);
244
VALA_TYPEREGISTER_FUNCTION_CLASS (klass)->get_type_interface_init_statements = vala_dbus_interface_register_function_real_get_type_interface_init_statements;
248
static void vala_dbus_interface_register_function_instance_init (ValaDBusInterfaceRegisterFunction * self) {
253
* C function to register an interface at runtime.
255
GType vala_dbus_interface_register_function_get_type (void) {
256
static volatile gsize vala_dbus_interface_register_function_type_id__volatile = 0;
257
if (g_once_init_enter (&vala_dbus_interface_register_function_type_id__volatile)) {
258
static const GTypeInfo g_define_type_info = { sizeof (ValaDBusInterfaceRegisterFunctionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dbus_interface_register_function_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDBusInterfaceRegisterFunction), 0, (GInstanceInitFunc) vala_dbus_interface_register_function_instance_init, NULL };
259
GType vala_dbus_interface_register_function_type_id;
260
vala_dbus_interface_register_function_type_id = g_type_register_static (VALA_TYPE_INTERFACE_REGISTER_FUNCTION, "ValaDBusInterfaceRegisterFunction", &g_define_type_info, 0);
261
g_once_init_leave (&vala_dbus_interface_register_function_type_id__volatile, vala_dbus_interface_register_function_type_id);
263
return vala_dbus_interface_register_function_type_id__volatile;