~ubuntu-branches/ubuntu/quantal/vala/quantal

« back to all changes in this revision

Viewing changes to codegen/valadbusinterfaceregisterfunction.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-01-18 09:51:15 UTC
  • mfrom: (1.5.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20110118095115-r2jr7c63lr0jzj0y
Tags: 0.11.4-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* valadbusinterfaceregisterfunction.c generated by valac, the Vala compiler
2
 
 * generated from valadbusinterfaceregisterfunction.vala, do not modify */
3
 
 
4
 
/* valadbusinterfaceregisterfunction.vala
5
 
 *
6
 
 * Copyright (C) 2009 Didier Villevalois
7
 
 *
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.
12
 
 
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.
17
 
 
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
21
 
 *
22
 
 * Author:
23
 
 *      Didier Villevalois <ptitjes@free.fr>
24
 
 */
25
 
 
26
 
#include <glib.h>
27
 
#include <glib-object.h>
28
 
#include <vala.h>
29
 
#include <stdlib.h>
30
 
#include <string.h>
31
 
#include <valaccode.h>
32
 
 
33
 
 
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))
40
 
 
41
 
typedef struct _ValaTypeRegisterFunction ValaTypeRegisterFunction;
42
 
typedef struct _ValaTypeRegisterFunctionClass ValaTypeRegisterFunctionClass;
43
 
typedef struct _ValaTypeRegisterFunctionPrivate ValaTypeRegisterFunctionPrivate;
44
 
 
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))
51
 
 
52
 
typedef struct _ValaInterfaceRegisterFunction ValaInterfaceRegisterFunction;
53
 
typedef struct _ValaInterfaceRegisterFunctionClass ValaInterfaceRegisterFunctionClass;
54
 
typedef struct _ValaInterfaceRegisterFunctionPrivate ValaInterfaceRegisterFunctionPrivate;
55
 
 
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))
62
 
 
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))
68
 
 
69
 
struct _ValaTypeRegisterFunction {
70
 
        GTypeInstance parent_instance;
71
 
        volatile int ref_count;
72
 
        ValaTypeRegisterFunctionPrivate * priv;
73
 
};
74
 
 
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);
97
 
};
98
 
 
99
 
struct _ValaInterfaceRegisterFunction {
100
 
        ValaTypeRegisterFunction parent_instance;
101
 
        ValaInterfaceRegisterFunctionPrivate * priv;
102
 
};
103
 
 
104
 
struct _ValaInterfaceRegisterFunctionClass {
105
 
        ValaTypeRegisterFunctionClass parent_class;
106
 
};
107
 
 
108
 
struct _ValaDBusInterfaceRegisterFunction {
109
 
        ValaInterfaceRegisterFunction parent_instance;
110
 
        ValaDBusInterfaceRegisterFunctionPrivate * priv;
111
 
};
112
 
 
113
 
struct _ValaDBusInterfaceRegisterFunctionClass {
114
 
        ValaInterfaceRegisterFunctionClass parent_class;
115
 
};
116
 
 
117
 
 
118
 
static gpointer vala_dbus_interface_register_function_parent_class = NULL;
119
 
 
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;
129
 
enum  {
130
 
        VALA_DBUS_INTERFACE_REGISTER_FUNCTION_DUMMY_PROPERTY
131
 
};
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);
139
 
 
140
 
 
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);
146
 
        return self;
147
 
}
148
 
 
149
 
 
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);
152
 
}
153
 
 
154
 
 
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;
174
 
        gchar* _tmp13_;
175
 
        gchar* _tmp14_ = NULL;
176
 
        gchar* _tmp15_;
177
 
        ValaCCodeIdentifier* _tmp16_ = NULL;
178
 
        ValaCCodeIdentifier* _tmp17_;
179
 
        ValaInterface* _tmp18_ = NULL;
180
 
        gchar* _tmp19_ = NULL;
181
 
        gchar* _tmp20_;
182
 
        gchar* _tmp21_ = NULL;
183
 
        gchar* _tmp22_;
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);
192
 
        frag = _tmp0_;
193
 
        _tmp1_ = vala_ccode_identifier_new ("g_quark_from_string");
194
 
        _tmp2_ = _tmp1_;
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\"");
198
 
        _tmp6_ = _tmp5_;
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");
202
 
        _tmp8_ = _tmp7_;
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);
207
 
        _tmp13_ = _tmp12_;
208
 
        _tmp14_ = g_strdup_printf ("%s_type_id", _tmp13_);
209
 
        _tmp15_ = _tmp14_;
210
 
        _tmp16_ = vala_ccode_identifier_new (_tmp15_);
211
 
        _tmp17_ = _tmp16_;
212
 
        vala_ccode_function_call_add_argument (func, (ValaCCodeExpression*) _tmp17_);
213
 
        _vala_ccode_node_unref0 (_tmp17_);
214
 
        _g_free0 (_tmp15_);
215
 
        _g_free0 (_tmp13_);
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);
219
 
        _tmp20_ = _tmp19_;
220
 
        _tmp21_ = g_strdup_printf ("%s_dbus_proxy_get_type", _tmp20_);
221
 
        _tmp22_ = _tmp21_;
222
 
        _tmp23_ = vala_ccode_identifier_new (_tmp22_);
223
 
        _tmp24_ = _tmp23_;
224
 
        _tmp25_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp24_);
225
 
        _tmp26_ = _tmp25_;
226
 
        vala_ccode_function_call_add_argument (func, (ValaCCodeExpression*) _tmp26_);
227
 
        _vala_ccode_node_unref0 (_tmp26_);
228
 
        _vala_ccode_node_unref0 (_tmp24_);
229
 
        _g_free0 (_tmp22_);
230
 
        _g_free0 (_tmp20_);
231
 
        _tmp27_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) func);
232
 
        _tmp28_ = _tmp27_;
233
 
        vala_ccode_fragment_append (frag, (ValaCCodeNode*) _tmp28_);
234
 
        _vala_ccode_node_unref0 (_tmp28_);
235
 
        result = frag;
236
 
        _vala_ccode_node_unref0 (func);
237
 
        _vala_ccode_node_unref0 (quark_dbus_proxy);
238
 
        return result;
239
 
}
240
 
 
241
 
 
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;
245
 
}
246
 
 
247
 
 
248
 
static void vala_dbus_interface_register_function_instance_init (ValaDBusInterfaceRegisterFunction * self) {
249
 
}
250
 
 
251
 
 
252
 
/**
253
 
 * C function to register an interface at runtime.
254
 
 */
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);
262
 
        }
263
 
        return vala_dbus_interface_register_function_type_id__volatile;
264
 
}
265
 
 
266
 
 
267