~ubuntu-branches/ubuntu/precise/indicator-sound/precise-201111281906

28.51.24 by Ken VanDine
Import upstream version 0.6.0
1
/* freedesktop-interfaces.c generated by valac 0.11.6, the Vala compiler
28.51.19 by Ken VanDine
Import upstream version 0.5.5
2
 * generated from freedesktop-interfaces.vala, do not modify */
3
4
/*
5
Copyright 2010 Canonical Ltd.
6
7
Authors:
8
    Conor Curran <conor.curran@canonical.com>
9
10
This program is free software: you can redistribute it and/or modify it 
11
under the terms of the GNU General Public License version 3, as published 
12
by the Free Software Foundation.
13
14
This program is distributed in the hope that it will be useful, but 
15
WITHOUT ANY WARRANTY; without even the implied warranties of 
16
MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
17
PURPOSE.  See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License along 
20
with this program.  If not, see <http://www.gnu.org/licenses/>.
21
*/
22
23
#include <glib.h>
24
#include <glib-object.h>
25
#include <gio/gio.h>
26
#include <stdlib.h>
27
#include <string.h>
28
29
30
#define TYPE_FREE_DESKTOP_OBJECT (free_desktop_object_get_type ())
31
#define FREE_DESKTOP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREE_DESKTOP_OBJECT, FreeDesktopObject))
32
#define IS_FREE_DESKTOP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREE_DESKTOP_OBJECT))
33
#define FREE_DESKTOP_OBJECT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FREE_DESKTOP_OBJECT, FreeDesktopObjectIface))
34
35
typedef struct _FreeDesktopObject FreeDesktopObject;
36
typedef struct _FreeDesktopObjectIface FreeDesktopObjectIface;
37
38
#define TYPE_FREE_DESKTOP_OBJECT_PROXY (free_desktop_object_proxy_get_type ())
39
typedef GDBusProxy FreeDesktopObjectProxy;
40
typedef GDBusProxyClass FreeDesktopObjectProxyClass;
41
#define _g_free0(var) (var = (g_free (var), NULL))
42
43
#define TYPE_FREE_DESKTOP_INTROSPECTABLE (free_desktop_introspectable_get_type ())
44
#define FREE_DESKTOP_INTROSPECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREE_DESKTOP_INTROSPECTABLE, FreeDesktopIntrospectable))
45
#define IS_FREE_DESKTOP_INTROSPECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREE_DESKTOP_INTROSPECTABLE))
46
#define FREE_DESKTOP_INTROSPECTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FREE_DESKTOP_INTROSPECTABLE, FreeDesktopIntrospectableIface))
47
48
typedef struct _FreeDesktopIntrospectable FreeDesktopIntrospectable;
49
typedef struct _FreeDesktopIntrospectableIface FreeDesktopIntrospectableIface;
50
51
#define TYPE_FREE_DESKTOP_INTROSPECTABLE_PROXY (free_desktop_introspectable_proxy_get_type ())
52
typedef GDBusProxy FreeDesktopIntrospectableProxy;
53
typedef GDBusProxyClass FreeDesktopIntrospectableProxyClass;
54
55
#define TYPE_FREE_DESKTOP_PROPERTIES (free_desktop_properties_get_type ())
56
#define FREE_DESKTOP_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREE_DESKTOP_PROPERTIES, FreeDesktopProperties))
57
#define IS_FREE_DESKTOP_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREE_DESKTOP_PROPERTIES))
58
#define FREE_DESKTOP_PROPERTIES_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FREE_DESKTOP_PROPERTIES, FreeDesktopPropertiesIface))
59
60
typedef struct _FreeDesktopProperties FreeDesktopProperties;
61
typedef struct _FreeDesktopPropertiesIface FreeDesktopPropertiesIface;
62
63
#define TYPE_FREE_DESKTOP_PROPERTIES_PROXY (free_desktop_properties_proxy_get_type ())
64
typedef GDBusProxy FreeDesktopPropertiesProxy;
65
typedef GDBusProxyClass FreeDesktopPropertiesProxyClass;
66
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
67
68
struct _FreeDesktopObjectIface {
69
	GTypeInterface parent_iface;
70
	void (*list_names) (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
71
	gchar** (*list_names_finish) (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error);
72
};
73
74
struct _FreeDesktopIntrospectableIface {
75
	GTypeInterface parent_iface;
76
	gchar* (*Introspect) (FreeDesktopIntrospectable* self, GError** error);
77
};
78
79
struct _FreeDesktopPropertiesIface {
80
	GTypeInterface parent_iface;
81
};
82
83
typedef enum  {
84
	XML_ERROR_FILE_NOT_FOUND,
85
	XML_ERROR_XML_DOCUMENT_EMPTY
86
} XmlError;
87
#define XML_ERROR xml_error_quark ()
88
89
90
GType free_desktop_object_proxy_get_type (void) G_GNUC_CONST;
91
guint free_desktop_object_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
92
GType free_desktop_object_get_type (void) G_GNUC_CONST;
93
void free_desktop_object_list_names (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
94
gchar** free_desktop_object_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error);
95
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
96
static void free_desktop_object_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
97
static void _dbus_handle_free_desktop_object_name_owner_changed (FreeDesktopObject* self, GVariant* parameters);
98
static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data);
99
static void free_desktop_object_proxy_list_names_async (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
100
static gchar** free_desktop_object_proxy_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error);
101
static void free_desktop_object_proxy_free_desktop_object_interface_init (FreeDesktopObjectIface* iface);
102
static void _dbus_free_desktop_object_list_names (FreeDesktopObject* self, GVariant* parameters, GDBusMethodInvocation* invocation);
103
static void _dbus_free_desktop_object_list_names_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
104
static void free_desktop_object_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
105
static GVariant* free_desktop_object_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
106
static gboolean free_desktop_object_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
107
static void _dbus_free_desktop_object_name_owner_changed (GObject* _sender, const gchar* name, const gchar* old_owner, const gchar* new_owner, gpointer* _data);
108
static void _free_desktop_object_unregister_object (gpointer user_data);
109
GType free_desktop_introspectable_proxy_get_type (void) G_GNUC_CONST;
110
guint free_desktop_introspectable_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
111
GType free_desktop_introspectable_get_type (void) G_GNUC_CONST;
112
gchar* free_desktop_introspectable_Introspect (FreeDesktopIntrospectable* self, GError** error);
113
static void free_desktop_introspectable_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
114
static gchar* free_desktop_introspectable_proxy_Introspect (FreeDesktopIntrospectable* self, GError** error);
115
static void free_desktop_introspectable_proxy_free_desktop_introspectable_interface_init (FreeDesktopIntrospectableIface* iface);
116
static void _dbus_free_desktop_introspectable_Introspect (FreeDesktopIntrospectable* self, GVariant* parameters, GDBusMethodInvocation* invocation);
117
static void free_desktop_introspectable_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
118
static GVariant* free_desktop_introspectable_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
119
static gboolean free_desktop_introspectable_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
120
static void _free_desktop_introspectable_unregister_object (gpointer user_data);
121
GType free_desktop_properties_get_type (void) G_GNUC_CONST;
122
GType free_desktop_properties_proxy_get_type (void) G_GNUC_CONST;
123
guint free_desktop_properties_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
124
static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
125
static void free_desktop_properties_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
126
static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktopProperties* self, GVariant* parameters);
127
static void free_desktop_properties_proxy_free_desktop_properties_interface_init (FreeDesktopPropertiesIface* iface);
128
static void free_desktop_properties_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
129
static GVariant* free_desktop_properties_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
130
static gboolean free_desktop_properties_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
131
static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer* _data);
132
static void _free_desktop_properties_unregister_object (gpointer user_data);
133
GQuark xml_error_quark (void);
134
#define FREEDESKTOP_SERVICE "org.freedesktop.DBus"
135
#define FREEDESKTOP_OBJECT "/org/freedesktop/DBus"
136
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
137
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
138
139
static const GDBusArgInfo _free_desktop_object_dbus_arg_info_list_names_result = {-1, "result", "as"};
140
static const GDBusArgInfo * const _free_desktop_object_dbus_arg_info_list_names_in[] = {NULL};
141
static const GDBusArgInfo * const _free_desktop_object_dbus_arg_info_list_names_out[] = {&_free_desktop_object_dbus_arg_info_list_names_result, NULL};
142
static const GDBusMethodInfo _free_desktop_object_dbus_method_info_list_names = {-1, "ListNames", (GDBusArgInfo **) (&_free_desktop_object_dbus_arg_info_list_names_in), (GDBusArgInfo **) (&_free_desktop_object_dbus_arg_info_list_names_out)};
143
static const GDBusMethodInfo * const _free_desktop_object_dbus_method_info[] = {&_free_desktop_object_dbus_method_info_list_names, NULL};
144
static const GDBusArgInfo _free_desktop_object_dbus_arg_info_name_owner_changed_name = {-1, "name", "s"};
145
static const GDBusArgInfo _free_desktop_object_dbus_arg_info_name_owner_changed_old_owner = {-1, "old_owner", "s"};
146
static const GDBusArgInfo _free_desktop_object_dbus_arg_info_name_owner_changed_new_owner = {-1, "new_owner", "s"};
147
static const GDBusArgInfo * const _free_desktop_object_dbus_arg_info_name_owner_changed[] = {&_free_desktop_object_dbus_arg_info_name_owner_changed_name, &_free_desktop_object_dbus_arg_info_name_owner_changed_old_owner, &_free_desktop_object_dbus_arg_info_name_owner_changed_new_owner, NULL};
148
static const GDBusSignalInfo _free_desktop_object_dbus_signal_info_name_owner_changed = {-1, "NameOwnerChanged", (GDBusArgInfo **) (&_free_desktop_object_dbus_arg_info_name_owner_changed)};
149
static const GDBusSignalInfo * const _free_desktop_object_dbus_signal_info[] = {&_free_desktop_object_dbus_signal_info_name_owner_changed, NULL};
150
static const GDBusPropertyInfo * const _free_desktop_object_dbus_property_info[] = {NULL};
151
static const GDBusInterfaceInfo _free_desktop_object_dbus_interface_info = {-1, "org.freedesktop.DBus", (GDBusMethodInfo **) (&_free_desktop_object_dbus_method_info), (GDBusSignalInfo **) (&_free_desktop_object_dbus_signal_info), (GDBusPropertyInfo **) (&_free_desktop_object_dbus_property_info)};
152
static const GDBusInterfaceVTable _free_desktop_object_dbus_interface_vtable = {free_desktop_object_dbus_interface_method_call, free_desktop_object_dbus_interface_get_property, free_desktop_object_dbus_interface_set_property};
153
static const GDBusArgInfo _free_desktop_introspectable_dbus_arg_info_Introspect_result = {-1, "result", "s"};
154
static const GDBusArgInfo * const _free_desktop_introspectable_dbus_arg_info_Introspect_in[] = {NULL};
155
static const GDBusArgInfo * const _free_desktop_introspectable_dbus_arg_info_Introspect_out[] = {&_free_desktop_introspectable_dbus_arg_info_Introspect_result, NULL};
156
static const GDBusMethodInfo _free_desktop_introspectable_dbus_method_info_Introspect = {-1, "Introspect", (GDBusArgInfo **) (&_free_desktop_introspectable_dbus_arg_info_Introspect_in), (GDBusArgInfo **) (&_free_desktop_introspectable_dbus_arg_info_Introspect_out)};
157
static const GDBusMethodInfo * const _free_desktop_introspectable_dbus_method_info[] = {&_free_desktop_introspectable_dbus_method_info_Introspect, NULL};
158
static const GDBusSignalInfo * const _free_desktop_introspectable_dbus_signal_info[] = {NULL};
159
static const GDBusPropertyInfo * const _free_desktop_introspectable_dbus_property_info[] = {NULL};
160
static const GDBusInterfaceInfo _free_desktop_introspectable_dbus_interface_info = {-1, "org.freedesktop.DBus.Introspectable", (GDBusMethodInfo **) (&_free_desktop_introspectable_dbus_method_info), (GDBusSignalInfo **) (&_free_desktop_introspectable_dbus_signal_info), (GDBusPropertyInfo **) (&_free_desktop_introspectable_dbus_property_info)};
161
static const GDBusInterfaceVTable _free_desktop_introspectable_dbus_interface_vtable = {free_desktop_introspectable_dbus_interface_method_call, free_desktop_introspectable_dbus_interface_get_property, free_desktop_introspectable_dbus_interface_set_property};
162
static const GDBusMethodInfo * const _free_desktop_properties_dbus_method_info[] = {NULL};
163
static const GDBusArgInfo _free_desktop_properties_dbus_arg_info_properties_changed_source = {-1, "source", "s"};
164
static const GDBusArgInfo _free_desktop_properties_dbus_arg_info_properties_changed_changed_properties = {-1, "changed_properties", "a{sv}"};
165
static const GDBusArgInfo _free_desktop_properties_dbus_arg_info_properties_changed_invalid = {-1, "invalid", "as"};
166
static const GDBusArgInfo * const _free_desktop_properties_dbus_arg_info_properties_changed[] = {&_free_desktop_properties_dbus_arg_info_properties_changed_source, &_free_desktop_properties_dbus_arg_info_properties_changed_changed_properties, &_free_desktop_properties_dbus_arg_info_properties_changed_invalid, NULL};
167
static const GDBusSignalInfo _free_desktop_properties_dbus_signal_info_properties_changed = {-1, "PropertiesChanged", (GDBusArgInfo **) (&_free_desktop_properties_dbus_arg_info_properties_changed)};
168
static const GDBusSignalInfo * const _free_desktop_properties_dbus_signal_info[] = {&_free_desktop_properties_dbus_signal_info_properties_changed, NULL};
169
static const GDBusPropertyInfo * const _free_desktop_properties_dbus_property_info[] = {NULL};
170
static const GDBusInterfaceInfo _free_desktop_properties_dbus_interface_info = {-1, "org.freedesktop.DBus.Properties", (GDBusMethodInfo **) (&_free_desktop_properties_dbus_method_info), (GDBusSignalInfo **) (&_free_desktop_properties_dbus_signal_info), (GDBusPropertyInfo **) (&_free_desktop_properties_dbus_property_info)};
171
static const GDBusInterfaceVTable _free_desktop_properties_dbus_interface_vtable = {free_desktop_properties_dbus_interface_method_call, free_desktop_properties_dbus_interface_get_property, free_desktop_properties_dbus_interface_set_property};
172
173
void free_desktop_object_list_names (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
174
	FREE_DESKTOP_OBJECT_GET_INTERFACE (self)->list_names (self, _callback_, _user_data_);
175
}
176
177
178
gchar** free_desktop_object_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error) {
179
	return FREE_DESKTOP_OBJECT_GET_INTERFACE (self)->list_names_finish (self, _res_, result_length1, error);
180
}
181
182
183
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
184
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gpointer data2);
185
	register GMarshalFunc_VOID__STRING_STRING_STRING callback;
186
	register GCClosure * cc;
187
	register gpointer data1, data2;
188
	cc = (GCClosure *) closure;
189
	g_return_if_fail (n_param_values == 4);
190
	if (G_CCLOSURE_SWAP_DATA (closure)) {
191
		data1 = closure->data;
192
		data2 = param_values->data[0].v_pointer;
193
	} else {
194
		data1 = param_values->data[0].v_pointer;
195
		data2 = closure->data;
196
	}
197
	callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
198
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
199
}
200
201
202
static void free_desktop_object_base_init (FreeDesktopObjectIface * iface) {
203
	static gboolean initialized = FALSE;
204
	if (!initialized) {
205
		initialized = TRUE;
206
		g_signal_new ("name_owner_changed", TYPE_FREE_DESKTOP_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
207
	}
208
}
209
210
211
GType free_desktop_object_get_type (void) {
212
	static volatile gsize free_desktop_object_type_id__volatile = 0;
213
	if (g_once_init_enter (&free_desktop_object_type_id__volatile)) {
214
		static const GTypeInfo g_define_type_info = { sizeof (FreeDesktopObjectIface), (GBaseInitFunc) free_desktop_object_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
215
		GType free_desktop_object_type_id;
216
		free_desktop_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "FreeDesktopObject", &g_define_type_info, 0);
217
		g_type_interface_add_prerequisite (free_desktop_object_type_id, G_TYPE_OBJECT);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
218
		g_type_set_qdata (free_desktop_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) free_desktop_object_proxy_get_type);
219
		g_type_set_qdata (free_desktop_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus");
220
		g_type_set_qdata (free_desktop_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) free_desktop_object_register_object);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
221
		g_once_init_leave (&free_desktop_object_type_id__volatile, free_desktop_object_type_id);
222
	}
223
	return free_desktop_object_type_id__volatile;
224
}
225
226
227
G_DEFINE_TYPE_EXTENDED (FreeDesktopObjectProxy, free_desktop_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_FREE_DESKTOP_OBJECT, free_desktop_object_proxy_free_desktop_object_interface_init) );
228
static void free_desktop_object_proxy_class_init (FreeDesktopObjectProxyClass* klass) {
229
	G_DBUS_PROXY_CLASS (klass)->g_signal = free_desktop_object_proxy_g_signal;
230
}
231
232
233
static void _dbus_handle_free_desktop_object_name_owner_changed (FreeDesktopObject* self, GVariant* parameters) {
234
	GVariantIter _arguments_iter;
235
	gchar* name = NULL;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
236
	GVariant* _tmp77_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
237
	gchar* old_owner = NULL;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
238
	GVariant* _tmp78_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
239
	gchar* new_owner = NULL;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
240
	GVariant* _tmp79_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
241
	g_variant_iter_init (&_arguments_iter, parameters);
28.51.23 by Ken VanDine
Import upstream version 0.5.9
242
	_tmp77_ = g_variant_iter_next_value (&_arguments_iter);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
243
	name = g_variant_dup_string (_tmp77_, NULL);
28.51.23 by Ken VanDine
Import upstream version 0.5.9
244
	g_variant_unref (_tmp77_);
245
	_tmp78_ = g_variant_iter_next_value (&_arguments_iter);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
246
	old_owner = g_variant_dup_string (_tmp78_, NULL);
28.51.23 by Ken VanDine
Import upstream version 0.5.9
247
	g_variant_unref (_tmp78_);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
248
	_tmp79_ = g_variant_iter_next_value (&_arguments_iter);
249
	new_owner = g_variant_dup_string (_tmp79_, NULL);
250
	g_variant_unref (_tmp79_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
251
	g_signal_emit_by_name (self, "name-owner-changed", name, old_owner, new_owner);
252
	_g_free0 (name);
253
	_g_free0 (old_owner);
254
	_g_free0 (new_owner);
255
}
256
257
258
static void free_desktop_object_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
259
	if (strcmp (signal_name, "NameOwnerChanged") == 0) {
260
		_dbus_handle_free_desktop_object_name_owner_changed (proxy, parameters);
261
	}
262
}
263
264
265
static void free_desktop_object_proxy_init (FreeDesktopObjectProxy* self) {
266
}
267
268
269
static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data) {
270
	g_simple_async_result_set_op_res_gpointer (user_data, g_object_ref (res), g_object_unref);
271
	g_simple_async_result_complete (user_data);
272
	g_object_unref (user_data);
273
}
274
275
276
static void free_desktop_object_proxy_list_names_async (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
277
	GDBusMessage *_message;
278
	GVariant *_arguments;
279
	GVariantBuilder _arguments_builder;
280
	G_IO_ERROR;
281
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.DBus", "ListNames");
282
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
283
	_arguments = g_variant_builder_end (&_arguments_builder);
284
	g_dbus_message_set_body (_message, _arguments);
285
	g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
286
	g_object_unref (_message);
287
}
288
289
290
static gchar** free_desktop_object_proxy_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error) {
291
	GDBusMessage *_reply_message;
292
	GVariant *_reply;
293
	GVariantIter _reply_iter;
294
	gchar** _result;
295
	int _result_length1;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
296
	GVariant* _tmp80_;
297
	gchar** _tmp81_;
298
	int _tmp81__length;
299
	int _tmp81__size;
300
	int _tmp81__length1;
301
	GVariantIter _tmp82_;
302
	GVariant* _tmp83_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
303
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
304
	if (!_reply_message) {
305
		return NULL;
306
	}
307
	if (g_dbus_message_to_gerror (_reply_message, error)) {
308
		g_object_unref (_reply_message);
309
		return NULL;
310
	}
311
	_reply = g_dbus_message_get_body (_reply_message);
312
	g_variant_iter_init (&_reply_iter, _reply);
313
	_result_length1 = 0;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
314
	_tmp80_ = g_variant_iter_next_value (&_reply_iter);
315
	_tmp81_ = g_new (gchar*, 5);
316
	_tmp81__length = 0;
317
	_tmp81__size = 4;
318
	_tmp81__length1 = 0;
319
	g_variant_iter_init (&_tmp82_, _tmp80_);
320
	for (; (_tmp83_ = g_variant_iter_next_value (&_tmp82_)) != NULL; _tmp81__length1++) {
321
		if (_tmp81__size == _tmp81__length) {
322
			_tmp81__size = 2 * _tmp81__size;
323
			_tmp81_ = g_renew (gchar*, _tmp81_, _tmp81__size + 1);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
324
		}
28.51.27 by Ken VanDine
Import upstream version 0.6.3
325
		_tmp81_[_tmp81__length++] = g_variant_dup_string (_tmp83_, NULL);
326
		g_variant_unref (_tmp83_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
327
	}
28.51.27 by Ken VanDine
Import upstream version 0.6.3
328
	_result_length1 = _tmp81__length1;
329
	_tmp81_[_tmp81__length] = NULL;
330
	_result = _tmp81_;
331
	g_variant_unref (_tmp80_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
332
	*result_length1 = _result_length1;
333
	g_object_unref (_reply_message);
334
	return _result;
335
}
336
337
338
static void free_desktop_object_proxy_free_desktop_object_interface_init (FreeDesktopObjectIface* iface) {
339
	iface->list_names = free_desktop_object_proxy_list_names_async;
340
	iface->list_names_finish = free_desktop_object_proxy_list_names_finish;
341
}
342
343
344
static void _dbus_free_desktop_object_list_names (FreeDesktopObject* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
345
	GVariantIter _arguments_iter;
346
	g_variant_iter_init (&_arguments_iter, parameters);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
347
	free_desktop_object_list_names (self, (GAsyncReadyCallback) _dbus_free_desktop_object_list_names_ready, invocation);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
348
}
349
350
351
static void _dbus_free_desktop_object_list_names_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
352
	GDBusMethodInvocation * invocation;
28.51.21 by Ken VanDine
Import upstream version 0.5.7
353
	GError* error = NULL;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
354
	GDBusMessage* _reply_message;
355
	GVariant* _reply;
356
	GVariantBuilder _reply_builder;
357
	gchar** result;
358
	int result_length1 = 0;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
359
	gchar** _tmp84_;
360
	GVariantBuilder _tmp85_;
361
	int _tmp86_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
362
	invocation = _user_data_;
363
	result = free_desktop_object_list_names_finish ((FreeDesktopObject*) source_object, _res_, &result_length1, &error);
364
	if (error) {
28.51.21 by Ken VanDine
Import upstream version 0.5.7
365
		g_dbus_method_invocation_return_gerror (invocation, error);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
366
		return;
367
	}
368
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
369
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
370
	_tmp84_ = result;
371
	g_variant_builder_init (&_tmp85_, G_VARIANT_TYPE ("as"));
372
	for (_tmp86_ = 0; _tmp86_ < result_length1; _tmp86_++) {
373
		g_variant_builder_add_value (&_tmp85_, g_variant_new_string (*_tmp84_));
374
		_tmp84_++;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
375
	}
28.51.27 by Ken VanDine
Import upstream version 0.6.3
376
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp85_));
28.51.21 by Ken VanDine
Import upstream version 0.5.7
377
	 result = (_vala_array_free ( result,  result_length1, (GDestroyNotify) g_free), NULL);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
378
	_reply = g_variant_builder_end (&_reply_builder);
379
	g_dbus_message_set_body (_reply_message, _reply);
380
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
381
	g_object_unref (invocation);
382
	g_object_unref (_reply_message);
383
}
384
385
386
static void free_desktop_object_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
387
	gpointer* data;
388
	gpointer object;
389
	data = user_data;
390
	object = data[0];
391
	if (strcmp (method_name, "ListNames") == 0) {
392
		_dbus_free_desktop_object_list_names (object, parameters, invocation);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
393
	} else {
394
		g_object_unref (invocation);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
395
	}
396
}
397
398
399
static GVariant* free_desktop_object_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
400
	gpointer* data;
401
	gpointer object;
402
	data = user_data;
403
	object = data[0];
404
	return NULL;
405
}
406
407
408
static gboolean free_desktop_object_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
409
	gpointer* data;
410
	gpointer object;
411
	data = user_data;
412
	object = data[0];
413
	return FALSE;
414
}
415
416
417
static void _dbus_free_desktop_object_name_owner_changed (GObject* _sender, const gchar* name, const gchar* old_owner, const gchar* new_owner, gpointer* _data) {
418
	GDBusConnection * _connection;
419
	const gchar * _path;
420
	GVariant *_arguments;
421
	GVariantBuilder _arguments_builder;
422
	_connection = _data[1];
423
	_path = _data[2];
424
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
425
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
426
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (old_owner));
427
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (new_owner));
428
	_arguments = g_variant_builder_end (&_arguments_builder);
429
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus", "NameOwnerChanged", _arguments, NULL);
430
}
431
432
433
guint free_desktop_object_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
434
	guint result;
435
	gpointer *data;
436
	data = g_new (gpointer, 3);
437
	data[0] = g_object_ref (object);
438
	data[1] = g_object_ref (connection);
439
	data[2] = g_strdup (path);
440
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_free_desktop_object_dbus_interface_info), &_free_desktop_object_dbus_interface_vtable, data, _free_desktop_object_unregister_object, error);
441
	if (!result) {
442
		return 0;
443
	}
444
	g_signal_connect (object, "name-owner-changed", (GCallback) _dbus_free_desktop_object_name_owner_changed, data);
445
	return result;
446
}
447
448
449
static void _free_desktop_object_unregister_object (gpointer user_data) {
450
	gpointer* data;
451
	data = user_data;
452
	g_object_unref (data[0]);
453
	g_object_unref (data[1]);
454
	g_free (data[2]);
455
	g_free (data);
456
}
457
458
459
gchar* free_desktop_introspectable_Introspect (FreeDesktopIntrospectable* self, GError** error) {
460
	return FREE_DESKTOP_INTROSPECTABLE_GET_INTERFACE (self)->Introspect (self, error);
461
}
462
463
464
static void free_desktop_introspectable_base_init (FreeDesktopIntrospectableIface * iface) {
465
	static gboolean initialized = FALSE;
466
	if (!initialized) {
467
		initialized = TRUE;
468
	}
469
}
470
471
472
GType free_desktop_introspectable_get_type (void) {
473
	static volatile gsize free_desktop_introspectable_type_id__volatile = 0;
474
	if (g_once_init_enter (&free_desktop_introspectable_type_id__volatile)) {
475
		static const GTypeInfo g_define_type_info = { sizeof (FreeDesktopIntrospectableIface), (GBaseInitFunc) free_desktop_introspectable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
476
		GType free_desktop_introspectable_type_id;
477
		free_desktop_introspectable_type_id = g_type_register_static (G_TYPE_INTERFACE, "FreeDesktopIntrospectable", &g_define_type_info, 0);
478
		g_type_interface_add_prerequisite (free_desktop_introspectable_type_id, G_TYPE_OBJECT);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
479
		g_type_set_qdata (free_desktop_introspectable_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) free_desktop_introspectable_proxy_get_type);
480
		g_type_set_qdata (free_desktop_introspectable_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus.Introspectable");
481
		g_type_set_qdata (free_desktop_introspectable_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) free_desktop_introspectable_register_object);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
482
		g_once_init_leave (&free_desktop_introspectable_type_id__volatile, free_desktop_introspectable_type_id);
483
	}
484
	return free_desktop_introspectable_type_id__volatile;
485
}
486
487
488
G_DEFINE_TYPE_EXTENDED (FreeDesktopIntrospectableProxy, free_desktop_introspectable_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_FREE_DESKTOP_INTROSPECTABLE, free_desktop_introspectable_proxy_free_desktop_introspectable_interface_init) );
489
static void free_desktop_introspectable_proxy_class_init (FreeDesktopIntrospectableProxyClass* klass) {
490
	G_DBUS_PROXY_CLASS (klass)->g_signal = free_desktop_introspectable_proxy_g_signal;
491
}
492
493
494
static void free_desktop_introspectable_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
495
}
496
497
498
static void free_desktop_introspectable_proxy_init (FreeDesktopIntrospectableProxy* self) {
499
}
500
501
502
static gchar* free_desktop_introspectable_proxy_Introspect (FreeDesktopIntrospectable* self, GError** error) {
503
	GDBusMessage *_message;
504
	GVariant *_arguments;
505
	GVariantBuilder _arguments_builder;
506
	GDBusMessage *_reply_message;
507
	GVariant *_reply;
508
	GVariantIter _reply_iter;
509
	gchar* _result;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
510
	GVariant* _tmp87_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
511
	G_IO_ERROR;
512
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.DBus.Introspectable", "Introspect");
513
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
514
	_arguments = g_variant_builder_end (&_arguments_builder);
515
	g_dbus_message_set_body (_message, _arguments);
516
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
517
	g_object_unref (_message);
518
	if (!_reply_message) {
519
		return NULL;
520
	}
521
	if (g_dbus_message_to_gerror (_reply_message, error)) {
522
		g_object_unref (_reply_message);
523
		return NULL;
524
	}
525
	_reply = g_dbus_message_get_body (_reply_message);
526
	g_variant_iter_init (&_reply_iter, _reply);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
527
	_tmp87_ = g_variant_iter_next_value (&_reply_iter);
528
	_result = g_variant_dup_string (_tmp87_, NULL);
529
	g_variant_unref (_tmp87_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
530
	g_object_unref (_reply_message);
531
	return _result;
532
}
533
534
535
static void free_desktop_introspectable_proxy_free_desktop_introspectable_interface_init (FreeDesktopIntrospectableIface* iface) {
536
	iface->Introspect = free_desktop_introspectable_proxy_Introspect;
537
}
538
539
540
static void _dbus_free_desktop_introspectable_Introspect (FreeDesktopIntrospectable* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
28.51.21 by Ken VanDine
Import upstream version 0.5.7
541
	GError* error = NULL;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
542
	GVariantIter _arguments_iter;
543
	GDBusMessage* _reply_message;
544
	GVariant* _reply;
545
	GVariantBuilder _reply_builder;
546
	gchar* result;
547
	g_variant_iter_init (&_arguments_iter, parameters);
548
	result = free_desktop_introspectable_Introspect (self, &error);
549
	if (error) {
28.51.21 by Ken VanDine
Import upstream version 0.5.7
550
		g_dbus_method_invocation_return_gerror (invocation, error);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
551
		return;
552
	}
553
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
554
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
555
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
28.51.21 by Ken VanDine
Import upstream version 0.5.7
556
	_g_free0 ( result);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
557
	_reply = g_variant_builder_end (&_reply_builder);
558
	g_dbus_message_set_body (_reply_message, _reply);
559
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
560
	g_object_unref (invocation);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
561
	g_object_unref (_reply_message);
562
}
563
564
565
static void free_desktop_introspectable_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
566
	gpointer* data;
567
	gpointer object;
568
	data = user_data;
569
	object = data[0];
570
	if (strcmp (method_name, "Introspect") == 0) {
571
		_dbus_free_desktop_introspectable_Introspect (object, parameters, invocation);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
572
	} else {
573
		g_object_unref (invocation);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
574
	}
575
}
576
577
578
static GVariant* free_desktop_introspectable_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
579
	gpointer* data;
580
	gpointer object;
581
	data = user_data;
582
	object = data[0];
583
	return NULL;
584
}
585
586
587
static gboolean free_desktop_introspectable_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
588
	gpointer* data;
589
	gpointer object;
590
	data = user_data;
591
	object = data[0];
592
	return FALSE;
593
}
594
595
596
guint free_desktop_introspectable_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
597
	guint result;
598
	gpointer *data;
599
	data = g_new (gpointer, 3);
600
	data[0] = g_object_ref (object);
601
	data[1] = g_object_ref (connection);
602
	data[2] = g_strdup (path);
603
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_free_desktop_introspectable_dbus_interface_info), &_free_desktop_introspectable_dbus_interface_vtable, data, _free_desktop_introspectable_unregister_object, error);
604
	if (!result) {
605
		return 0;
606
	}
607
	return result;
608
}
609
610
611
static void _free_desktop_introspectable_unregister_object (gpointer user_data) {
612
	gpointer* data;
613
	data = user_data;
614
	g_object_unref (data[0]);
615
	g_object_unref (data[1]);
616
	g_free (data[2]);
617
	g_free (data);
618
}
619
620
621
static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
622
	typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gint arg_4, gpointer data2);
623
	register GMarshalFunc_VOID__STRING_BOXED_BOXED_INT callback;
624
	register GCClosure * cc;
625
	register gpointer data1, data2;
626
	cc = (GCClosure *) closure;
627
	g_return_if_fail (n_param_values == 5);
628
	if (G_CCLOSURE_SWAP_DATA (closure)) {
629
		data1 = closure->data;
630
		data2 = param_values->data[0].v_pointer;
631
	} else {
632
		data1 = param_values->data[0].v_pointer;
633
		data2 = closure->data;
634
	}
635
	callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (marshal_data ? marshal_data : cc->callback);
636
	callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), g_value_get_boxed (param_values + 3), g_value_get_int (param_values + 4), data2);
637
}
638
639
640
static void free_desktop_properties_base_init (FreeDesktopPropertiesIface * iface) {
641
	static gboolean initialized = FALSE;
642
	if (!initialized) {
643
		initialized = TRUE;
644
		g_signal_new ("properties_changed", TYPE_FREE_DESKTOP_PROPERTIES, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_HASH_TABLE, G_TYPE_STRV, G_TYPE_INT);
645
	}
646
}
647
648
649
GType free_desktop_properties_get_type (void) {
650
	static volatile gsize free_desktop_properties_type_id__volatile = 0;
651
	if (g_once_init_enter (&free_desktop_properties_type_id__volatile)) {
652
		static const GTypeInfo g_define_type_info = { sizeof (FreeDesktopPropertiesIface), (GBaseInitFunc) free_desktop_properties_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
653
		GType free_desktop_properties_type_id;
654
		free_desktop_properties_type_id = g_type_register_static (G_TYPE_INTERFACE, "FreeDesktopProperties", &g_define_type_info, 0);
655
		g_type_interface_add_prerequisite (free_desktop_properties_type_id, G_TYPE_OBJECT);
28.51.21 by Ken VanDine
Import upstream version 0.5.7
656
		g_type_set_qdata (free_desktop_properties_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) free_desktop_properties_proxy_get_type);
657
		g_type_set_qdata (free_desktop_properties_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus.Properties");
658
		g_type_set_qdata (free_desktop_properties_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) free_desktop_properties_register_object);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
659
		g_once_init_leave (&free_desktop_properties_type_id__volatile, free_desktop_properties_type_id);
660
	}
661
	return free_desktop_properties_type_id__volatile;
662
}
663
664
665
G_DEFINE_TYPE_EXTENDED (FreeDesktopPropertiesProxy, free_desktop_properties_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_FREE_DESKTOP_PROPERTIES, free_desktop_properties_proxy_free_desktop_properties_interface_init) );
666
static void free_desktop_properties_proxy_class_init (FreeDesktopPropertiesProxyClass* klass) {
667
	G_DBUS_PROXY_CLASS (klass)->g_signal = free_desktop_properties_proxy_g_signal;
668
}
669
670
671
static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktopProperties* self, GVariant* parameters) {
672
	GVariantIter _arguments_iter;
673
	gchar* source = NULL;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
674
	GVariant* _tmp88_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
675
	GHashTable* changed_properties = NULL;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
676
	GVariant* _tmp89_;
677
	GHashTable* _tmp90_;
678
	GVariantIter _tmp91_;
28.51.23 by Ken VanDine
Import upstream version 0.5.9
679
	GVariant* _tmp92_;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
680
	GVariant* _tmp93_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
681
	gchar** invalid = NULL;
682
	int invalid_length1;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
683
	GVariant* _tmp94_;
684
	gchar** _tmp95_;
685
	int _tmp95__length;
686
	int _tmp95__size;
687
	int _tmp95__length1;
688
	GVariantIter _tmp96_;
689
	GVariant* _tmp97_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
690
	g_variant_iter_init (&_arguments_iter, parameters);
28.51.23 by Ken VanDine
Import upstream version 0.5.9
691
	_tmp88_ = g_variant_iter_next_value (&_arguments_iter);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
692
	source = g_variant_dup_string (_tmp88_, NULL);
28.51.23 by Ken VanDine
Import upstream version 0.5.9
693
	g_variant_unref (_tmp88_);
28.51.27 by Ken VanDine
Import upstream version 0.6.3
694
	_tmp89_ = g_variant_iter_next_value (&_arguments_iter);
695
	_tmp90_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
696
	g_variant_iter_init (&_tmp91_, _tmp89_);
697
	while (g_variant_iter_loop (&_tmp91_, "{?*}", &_tmp92_, &_tmp93_)) {
698
		g_hash_table_insert (_tmp90_, g_variant_dup_string (_tmp92_, NULL), g_variant_get_variant (_tmp93_));
699
	}
700
	changed_properties = _tmp90_;
701
	g_variant_unref (_tmp89_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
702
	invalid_length1 = 0;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
703
	_tmp94_ = g_variant_iter_next_value (&_arguments_iter);
704
	_tmp95_ = g_new (gchar*, 5);
705
	_tmp95__length = 0;
706
	_tmp95__size = 4;
707
	_tmp95__length1 = 0;
708
	g_variant_iter_init (&_tmp96_, _tmp94_);
709
	for (; (_tmp97_ = g_variant_iter_next_value (&_tmp96_)) != NULL; _tmp95__length1++) {
710
		if (_tmp95__size == _tmp95__length) {
711
			_tmp95__size = 2 * _tmp95__size;
712
			_tmp95_ = g_renew (gchar*, _tmp95_, _tmp95__size + 1);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
713
		}
28.51.27 by Ken VanDine
Import upstream version 0.6.3
714
		_tmp95_[_tmp95__length++] = g_variant_dup_string (_tmp97_, NULL);
715
		g_variant_unref (_tmp97_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
716
	}
28.51.27 by Ken VanDine
Import upstream version 0.6.3
717
	invalid_length1 = _tmp95__length1;
718
	_tmp95_[_tmp95__length] = NULL;
719
	invalid = _tmp95_;
720
	g_variant_unref (_tmp94_);
28.51.19 by Ken VanDine
Import upstream version 0.5.5
721
	g_signal_emit_by_name (self, "properties-changed", source, changed_properties, invalid, invalid_length1);
722
	_g_free0 (source);
723
	_g_hash_table_unref0 (changed_properties);
724
	invalid = (_vala_array_free (invalid, invalid_length1, (GDestroyNotify) g_free), NULL);
725
}
726
727
728
static void free_desktop_properties_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
729
	if (strcmp (signal_name, "PropertiesChanged") == 0) {
730
		_dbus_handle_free_desktop_properties_properties_changed (proxy, parameters);
731
	}
732
}
733
734
735
static void free_desktop_properties_proxy_init (FreeDesktopPropertiesProxy* self) {
736
}
737
738
739
static void free_desktop_properties_proxy_free_desktop_properties_interface_init (FreeDesktopPropertiesIface* iface) {
740
}
741
742
743
static void free_desktop_properties_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
744
	gpointer* data;
745
	gpointer object;
746
	data = user_data;
747
	object = data[0];
748
	g_object_unref (invocation);
749
}
750
751
752
static GVariant* free_desktop_properties_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
753
	gpointer* data;
754
	gpointer object;
755
	data = user_data;
756
	object = data[0];
757
	return NULL;
758
}
759
760
761
static gboolean free_desktop_properties_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
762
	gpointer* data;
763
	gpointer object;
764
	data = user_data;
765
	object = data[0];
766
	return FALSE;
767
}
768
769
770
static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer* _data) {
771
	GDBusConnection * _connection;
772
	const gchar * _path;
773
	GVariant *_arguments;
774
	GVariantBuilder _arguments_builder;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
775
	GVariantBuilder _tmp98_;
776
	GHashTableIter _tmp99_;
28.51.23 by Ken VanDine
Import upstream version 0.5.9
777
	gpointer _tmp100_;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
778
	gpointer _tmp101_;
779
	gchar** _tmp102_;
780
	GVariantBuilder _tmp103_;
781
	int _tmp104_;
28.51.19 by Ken VanDine
Import upstream version 0.5.5
782
	_connection = _data[1];
783
	_path = _data[2];
784
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
785
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (source));
28.51.27 by Ken VanDine
Import upstream version 0.6.3
786
	g_hash_table_iter_init (&_tmp99_, changed_properties);
787
	g_variant_builder_init (&_tmp98_, G_VARIANT_TYPE ("a{sv}"));
788
	while (g_hash_table_iter_next (&_tmp99_, &_tmp100_, &_tmp101_)) {
28.51.19 by Ken VanDine
Import upstream version 0.5.5
789
		gchar* _key;
790
		GVariant* _value;
28.51.27 by Ken VanDine
Import upstream version 0.6.3
791
		_key = (gchar*) _tmp100_;
792
		_value = (GVariant*) _tmp101_;
793
		g_variant_builder_add (&_tmp98_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
794
	}
795
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp98_));
796
	_tmp102_ = invalid;
797
	g_variant_builder_init (&_tmp103_, G_VARIANT_TYPE ("as"));
798
	for (_tmp104_ = 0; _tmp104_ < invalid_length1; _tmp104_++) {
799
		g_variant_builder_add_value (&_tmp103_, g_variant_new_string (*_tmp102_));
800
		_tmp102_++;
801
	}
802
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp103_));
28.51.19 by Ken VanDine
Import upstream version 0.5.5
803
	_arguments = g_variant_builder_end (&_arguments_builder);
804
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus.Properties", "PropertiesChanged", _arguments, NULL);
805
}
806
807
808
guint free_desktop_properties_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
809
	guint result;
810
	gpointer *data;
811
	data = g_new (gpointer, 3);
812
	data[0] = g_object_ref (object);
813
	data[1] = g_object_ref (connection);
814
	data[2] = g_strdup (path);
815
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_free_desktop_properties_dbus_interface_info), &_free_desktop_properties_dbus_interface_vtable, data, _free_desktop_properties_unregister_object, error);
816
	if (!result) {
817
		return 0;
818
	}
819
	g_signal_connect (object, "properties-changed", (GCallback) _dbus_free_desktop_properties_properties_changed, data);
820
	return result;
821
}
822
823
824
static void _free_desktop_properties_unregister_object (gpointer user_data) {
825
	gpointer* data;
826
	data = user_data;
827
	g_object_unref (data[0]);
828
	g_object_unref (data[1]);
829
	g_free (data[2]);
830
	g_free (data);
831
}
832
833
834
GQuark xml_error_quark (void) {
835
	return g_quark_from_static_string ("xml_error-quark");
836
}
837
838
839
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
840
	if ((array != NULL) && (destroy_func != NULL)) {
841
		int i;
842
		for (i = 0; i < array_length; i = i + 1) {
843
			if (((gpointer*) array)[i] != NULL) {
844
				destroy_func (((gpointer*) array)[i]);
845
			}
846
		}
847
	}
848
}
849
850
851
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
852
	_vala_array_destroy (array, array_length, destroy_func);
853
	g_free (array);
854
}
855
856
857