127
127
static const GDBusInterfaceVTable _rygel_media_export_dbus_service_dbus_interface_vtable = {rygel_media_export_dbus_service_dbus_interface_method_call, rygel_media_export_dbus_service_dbus_interface_get_property, rygel_media_export_dbus_service_dbus_interface_set_property};
129
129
static gpointer _g_object_ref0 (gpointer self) {
130
#line 29 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
130
131
return self ? g_object_ref (self) : NULL;
132
#line 133 "rygel-media-export-dbus-service.c"
134
136
RygelMediaExportDBusService* rygel_media_export_dbus_service_construct (GType object_type, RygelMediaExportRootContainer* root_container, GError** error) {
135
137
RygelMediaExportDBusService * self = NULL;
136
138
RygelMediaExportRootContainer* _tmp0_;
137
GDBusConnection* _tmp1_ = NULL;
138
GDBusConnection* connection;
139
RygelMediaExportRootContainer* _tmp1_;
140
140
GError * _inner_error_ = NULL;
141
#line 28 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
141
142
g_return_val_if_fail (root_container != NULL, NULL);
143
#line 28 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
142
144
self = (RygelMediaExportDBusService*) g_object_new (object_type, NULL);
143
_tmp0_ = _g_object_ref0 (root_container);
145
#line 29 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
146
_tmp0_ = root_container;
147
#line 29 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
148
_tmp1_ = _g_object_ref0 (_tmp0_);
149
#line 29 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
144
150
_g_object_unref0 (self->priv->root_container);
145
self->priv->root_container = _tmp0_;
146
_tmp1_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
148
if (_inner_error_ != NULL) {
149
if (_inner_error_->domain == G_IO_ERROR) {
150
goto __catch39_g_io_error;
152
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
153
g_clear_error (&_inner_error_);
156
_tmp2_ = G_LIKELY (connection != NULL);
158
rygel_media_export_dbus_service_register_object (self, connection, RYGEL_MEDIA_EXPORT_DBUS_SERVICE_RYGEL_MEDIA_EXPORT_PATH, &_inner_error_);
151
#line 29 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
152
self->priv->root_container = _tmp1_;
153
#line 154 "rygel-media-export-dbus-service.c"
155
GDBusConnection* _tmp2_ = NULL;
156
GDBusConnection* connection;
157
GDBusConnection* _tmp3_;
158
gboolean _tmp4_ = FALSE;
159
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
160
_tmp2_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
161
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
163
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
159
164
if (_inner_error_ != NULL) {
160
_g_object_unref0 (connection);
165
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
161
166
if (_inner_error_->domain == G_IO_ERROR) {
167
#line 168 "rygel-media-export-dbus-service.c"
162
168
goto __catch39_g_io_error;
164
_g_object_unref0 (connection);
170
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
165
171
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
172
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
166
173
g_clear_error (&_inner_error_);
174
#line 32 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
176
#line 177 "rygel-media-export-dbus-service.c"
178
#line 34 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
180
#line 34 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
181
_tmp4_ = G_LIKELY (_tmp3_ != NULL);
182
#line 34 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
184
#line 185 "rygel-media-export-dbus-service.c"
185
GDBusConnection* _tmp5_;
186
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
188
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
189
rygel_media_export_dbus_service_register_object (self, _tmp5_, RYGEL_MEDIA_EXPORT_DBUS_SERVICE_RYGEL_MEDIA_EXPORT_PATH, &_inner_error_);
190
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
191
if (_inner_error_ != NULL) {
192
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
193
_g_object_unref0 (connection);
194
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
195
if (_inner_error_->domain == G_IO_ERROR) {
196
#line 197 "rygel-media-export-dbus-service.c"
197
goto __catch39_g_io_error;
199
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
200
_g_object_unref0 (connection);
201
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
202
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
203
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
204
g_clear_error (&_inner_error_);
205
#line 35 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
207
#line 208 "rygel-media-export-dbus-service.c"
210
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
211
_g_object_unref0 (connection);
212
#line 213 "rygel-media-export-dbus-service.c"
170
_g_object_unref0 (connection);
171
214
goto __finally39;
172
215
__catch39_g_io_error:
175
const gchar* _tmp3_ = NULL;
218
const gchar* _tmp6_ = NULL;
221
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
176
222
err = _inner_error_;
223
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
177
224
_inner_error_ = NULL;
178
_tmp3_ = _ ("Failed to attach to D-Bus session bus: %s");
179
g_warning (_tmp3_, err->message);
225
#line 38 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
226
_tmp6_ = _ ("Failed to attach to D-Bus session bus: %s");
227
#line 38 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
229
#line 38 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
230
_tmp8_ = _tmp7_->message;
231
#line 38 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
232
g_warning (_tmp6_, _tmp8_);
233
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
180
234
_g_error_free0 (err);
235
#line 236 "rygel-media-export-dbus-service.c"
238
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
183
239
if (_inner_error_ != NULL) {
240
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
184
241
g_propagate_error (error, _inner_error_);
242
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
185
243
_g_object_unref0 (self);
244
#line 31 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
246
#line 247 "rygel-media-export-dbus-service.c"
248
#line 28 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
250
#line 251 "rygel-media-export-dbus-service.c"
192
254
RygelMediaExportDBusService* rygel_media_export_dbus_service_new (RygelMediaExportRootContainer* root_container, GError** error) {
255
#line 28 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
193
256
return rygel_media_export_dbus_service_construct (RYGEL_MEDIA_EXPORT_TYPE_DBUS_SERVICE, root_container, error);
257
#line 258 "rygel-media-export-dbus-service.c"
197
261
void rygel_media_export_dbus_service_AddUri (RygelMediaExportDBusService* self, const gchar* uri) {
262
RygelMediaExportRootContainer* _tmp0_;
264
#line 43 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
198
265
g_return_if_fail (self != NULL);
266
#line 43 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
199
267
g_return_if_fail (uri != NULL);
200
rygel_media_export_root_container_add_uri (self->priv->root_container, uri);
268
#line 44 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
269
_tmp0_ = self->priv->root_container;
270
#line 44 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
272
#line 44 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
273
rygel_media_export_root_container_add_uri (_tmp0_, _tmp1_);
274
#line 275 "rygel-media-export-dbus-service.c"
204
278
void rygel_media_export_dbus_service_RemoveUri (RygelMediaExportDBusService* self, const gchar* uri) {
279
RygelMediaExportRootContainer* _tmp0_;
281
#line 47 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
205
282
g_return_if_fail (self != NULL);
283
#line 47 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
206
284
g_return_if_fail (uri != NULL);
207
rygel_media_export_root_container_remove_uri (self->priv->root_container, uri);
285
#line 48 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
286
_tmp0_ = self->priv->root_container;
287
#line 48 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
289
#line 48 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
290
rygel_media_export_root_container_remove_uri (_tmp0_, _tmp1_);
291
#line 292 "rygel-media-export-dbus-service.c"
211
295
gchar** rygel_media_export_dbus_service_GetUris (RygelMediaExportDBusService* self, int* result_length1) {
212
296
gchar** result = NULL;
214
gchar** _tmp1_ = NULL;
297
RygelMediaExportRootContainer* _tmp0_;
299
gchar** _tmp2_ = NULL;
302
#line 51 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
216
303
g_return_val_if_fail (self != NULL, NULL);
217
_tmp1_ = rygel_media_export_root_container_get_dynamic_uris (self->priv->root_container, &_tmp0_);
219
*result_length1 = _tmp0_;
304
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
305
_tmp0_ = self->priv->root_container;
306
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
307
_tmp2_ = rygel_media_export_root_container_get_dynamic_uris (_tmp0_, &_tmp1_);
308
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
310
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
311
_tmp3__length1 = _tmp1_;
312
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
313
if (result_length1) {
314
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
315
*result_length1 = _tmp3__length1;
316
#line 317 "rygel-media-export-dbus-service.c"
318
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
320
#line 52 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
322
#line 323 "rygel-media-export-dbus-service.c"
225
326
static void rygel_media_export_dbus_service_class_init (RygelMediaExportDBusServiceClass * klass) {
327
#line 22 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
226
328
rygel_media_export_dbus_service_parent_class = g_type_class_peek_parent (klass);
329
#line 22 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
227
330
g_type_class_add_private (klass, sizeof (RygelMediaExportDBusServicePrivate));
331
#line 22 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
228
332
G_OBJECT_CLASS (klass)->finalize = rygel_media_export_dbus_service_finalize;
333
#line 334 "rygel-media-export-dbus-service.c"
232
337
static void rygel_media_export_dbus_service_instance_init (RygelMediaExportDBusService * self) {
338
#line 22 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
233
339
self->priv = RYGEL_MEDIA_EXPORT_DBUS_SERVICE_GET_PRIVATE (self);
340
#line 341 "rygel-media-export-dbus-service.c"
237
344
static void rygel_media_export_dbus_service_finalize (GObject* obj) {
238
345
RygelMediaExportDBusService * self;
346
#line 22 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
239
347
self = RYGEL_MEDIA_EXPORT_DBUS_SERVICE (obj);
348
#line 26 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
240
349
_g_object_unref0 (self->priv->root_container);
350
#line 22 "/home/jens/Source/rygel/src/plugins/media-export/rygel-media-export-dbus-service.vala"
241
351
G_OBJECT_CLASS (rygel_media_export_dbus_service_parent_class)->finalize (obj);
352
#line 353 "rygel-media-export-dbus-service.c"