148
148
static gpointer _g_object_ref0 (gpointer self) {
149
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
149
150
return self ? g_object_ref (self) : NULL;
151
#line 152 "rygel-root-device.c"
153
155
RygelRootDevice* rygel_root_device_construct (GType object_type, GUPnPContext* context, RygelPlugin* plugin, GUPnPXMLDoc* description_doc, const gchar* description_path, const gchar* description_dir) {
154
156
RygelRootDevice * self = NULL;
157
GUPnPContext* _tmp0_;
162
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
155
163
g_return_val_if_fail (context != NULL, NULL);
164
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
156
165
g_return_val_if_fail (plugin != NULL, NULL);
166
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
157
167
g_return_val_if_fail (description_doc != NULL, NULL);
168
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
158
169
g_return_val_if_fail (description_path != NULL, NULL);
170
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
159
171
g_return_val_if_fail (description_dir != NULL, NULL);
160
self = (RygelRootDevice*) g_object_new (object_type, "context", context, "resource-factory", plugin, "description-doc", description_doc, "description-path", description_path, "description-dir", description_dir, NULL);
172
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
174
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
176
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
177
_tmp2_ = description_doc;
178
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
179
_tmp3_ = description_path;
180
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
181
_tmp4_ = description_dir;
182
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
183
self = (RygelRootDevice*) g_object_new (object_type, "context", _tmp0_, "resource-factory", _tmp1_, "description-doc", _tmp2_, "description-path", _tmp3_, "description-dir", _tmp4_, NULL);
184
#line 45 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
161
185
if (self != NULL) {
162
GeeArrayList* _tmp0_ = NULL;
163
_tmp0_ = gee_array_list_new (GUPNP_TYPE_SERVICE_INFO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
186
#line 187 "rygel-root-device.c"
187
GeeArrayList* _tmp5_;
188
#line 46 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
189
_tmp5_ = gee_array_list_new (GUPNP_TYPE_SERVICE_INFO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
190
#line 46 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
164
191
_g_object_unref0 (self->services);
165
self->services = _tmp0_;
192
#line 46 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
193
self->services = _tmp5_;
194
#line 195 "rygel-root-device.c"
167
GeeArrayList* _tmp1_;
197
GeeArrayList* _tmp7_;
198
GeeArrayList* _tmp8_;
168
199
GeeArrayList* _info_list;
200
GeeArrayList* _tmp9_;
171
204
gint _info_index;
172
_tmp1_ = _g_object_ref0 (plugin->resource_infos);
174
_tmp2_ = gee_collection_get_size ((GeeCollection*) _info_list);
205
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
207
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
208
_tmp7_ = _tmp6_->resource_infos;
209
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
210
_tmp8_ = _g_object_ref0 (_tmp7_);
211
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
213
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
215
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
216
_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
217
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
219
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
220
_info_size = _tmp11_;
221
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
176
222
_info_index = -1;
223
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
178
gpointer _tmp3_ = NULL;
225
#line 226 "rygel-root-device.c"
229
GeeArrayList* _tmp15_;
231
gpointer _tmp17_ = NULL;
179
232
RygelResourceInfo* info;
181
_info_index = _info_index + 1;
182
if (!(_info_index < _info_size)) {
233
RygelResourceInfo* _tmp18_;
235
gboolean _tmp20_ = FALSE;
236
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
237
_tmp12_ = _info_index;
238
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
239
_info_index = _tmp12_ + 1;
240
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
241
_tmp13_ = _info_index;
242
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
243
_tmp14_ = _info_size;
244
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
245
if (!(_tmp13_ < _tmp14_)) {
246
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
248
#line 249 "rygel-root-device.c"
185
_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) _info_list, _info_index);
186
info = (RygelResourceInfo*) _tmp3_;
187
_tmp4_ = g_type_is_a (info->type, GUPNP_TYPE_SERVICE);
189
GUPnPServiceInfo* _tmp5_ = NULL;
250
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
251
_tmp15_ = _info_list;
252
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
253
_tmp16_ = _info_index;
254
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
255
_tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _tmp15_, _tmp16_);
256
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
257
info = (RygelResourceInfo*) _tmp17_;
258
#line 51 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
260
#line 51 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
261
_tmp19_ = _tmp18_->type;
262
#line 51 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
263
_tmp20_ = g_type_is_a (_tmp19_, GUPNP_TYPE_SERVICE);
264
#line 51 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
266
#line 267 "rygel-root-device.c"
267
RygelResourceInfo* _tmp21_;
268
const gchar* _tmp22_;
269
GUPnPServiceInfo* _tmp23_ = NULL;
190
270
GUPnPServiceInfo* service;
191
_tmp5_ = gupnp_device_info_get_service ((GUPnPDeviceInfo*) self, info->upnp_type);
193
gee_abstract_collection_add ((GeeAbstractCollection*) self->services, service);
271
GeeArrayList* _tmp24_;
272
GUPnPServiceInfo* _tmp25_;
273
#line 52 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
275
#line 52 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
276
_tmp22_ = _tmp21_->upnp_type;
277
#line 52 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
278
_tmp23_ = gupnp_device_info_get_service ((GUPnPDeviceInfo*) self, _tmp22_);
279
#line 52 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
281
#line 54 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
282
_tmp24_ = self->services;
283
#line 54 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
285
#line 54 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
286
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp24_, _tmp25_);
287
#line 51 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
194
288
_g_object_unref0 (service);
289
#line 290 "rygel-root-device.c"
291
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
196
292
_rygel_resource_info_unref0 (info);
293
#line 294 "rygel-root-device.c"
295
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
198
296
_g_object_unref0 (_info_list);
297
#line 298 "rygel-root-device.c"
300
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
302
#line 303 "rygel-root-device.c"
205
306
RygelRootDevice* rygel_root_device_new (GUPnPContext* context, RygelPlugin* plugin, GUPnPXMLDoc* description_doc, const gchar* description_path, const gchar* description_dir) {
307
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
206
308
return rygel_root_device_construct (RYGEL_TYPE_ROOT_DEVICE, context, plugin, description_doc, description_path, description_dir);
309
#line 310 "rygel-root-device.c"
210
313
static void rygel_root_device_class_init (RygelRootDeviceClass * klass) {
314
#line 30 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
211
315
rygel_root_device_parent_class = g_type_class_peek_parent (klass);
316
#line 30 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
212
317
G_OBJECT_CLASS (klass)->finalize = rygel_root_device_finalize;
318
#line 319 "rygel-root-device.c"