~ubuntu-branches/ubuntu/trusty/rygel/trusty

« back to all changes in this revision

Viewing changes to src/rygel/rygel-root-device.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2011-12-16 15:21:25 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20111216152125-qgn31dkfmhouhrf0
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* rygel-root-device.c generated by valac 0.12.0, the Vala compiler
 
1
/* rygel-root-device.c generated by valac 0.14.1, the Vala compiler
2
2
 * generated from rygel-root-device.vala, do not modify */
3
3
 
4
4
/*
146
146
 
147
147
 
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"
150
152
}
151
153
 
152
154
 
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_;
 
158
        RygelPlugin* _tmp1_;
 
159
        GUPnPXMLDoc* _tmp2_;
 
160
        const gchar* _tmp3_;
 
161
        const gchar* _tmp4_;
 
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"
 
173
        _tmp0_ = context;
 
174
#line 38 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
 
175
        _tmp1_ = plugin;
 
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"
166
195
                {
167
 
                        GeeArrayList* _tmp1_;
 
196
                        RygelPlugin* _tmp6_;
 
197
                        GeeArrayList* _tmp7_;
 
198
                        GeeArrayList* _tmp8_;
168
199
                        GeeArrayList* _info_list;
169
 
                        gint _tmp2_;
 
200
                        GeeArrayList* _tmp9_;
 
201
                        gint _tmp10_;
 
202
                        gint _tmp11_;
170
203
                        gint _info_size;
171
204
                        gint _info_index;
172
 
                        _tmp1_ = _g_object_ref0 (plugin->resource_infos);
173
 
                        _info_list = _tmp1_;
174
 
                        _tmp2_ = gee_collection_get_size ((GeeCollection*) _info_list);
175
 
                        _info_size = _tmp2_;
 
205
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
 
206
                        _tmp6_ = plugin;
 
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"
 
212
                        _info_list = _tmp8_;
 
213
#line 49 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
 
214
                        _tmp9_ = _info_list;
 
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"
 
218
                        _tmp11_ = _tmp10_;
 
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"
177
224
                        while (TRUE) {
178
 
                                gpointer _tmp3_ = NULL;
 
225
#line 226 "rygel-root-device.c"
 
226
                                gint _tmp12_;
 
227
                                gint _tmp13_;
 
228
                                gint _tmp14_;
 
229
                                GeeArrayList* _tmp15_;
 
230
                                gint _tmp16_;
 
231
                                gpointer _tmp17_ = NULL;
179
232
                                RygelResourceInfo* info;
180
 
                                gboolean _tmp4_;
181
 
                                _info_index = _info_index + 1;
182
 
                                if (!(_info_index < _info_size)) {
 
233
                                RygelResourceInfo* _tmp18_;
 
234
                                GType _tmp19_;
 
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"
183
247
                                        break;
 
248
#line 249 "rygel-root-device.c"
184
249
                                }
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);
188
 
                                if (_tmp4_) {
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"
 
259
                                _tmp18_ = info;
 
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"
 
265
                                if (_tmp20_) {
 
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);
192
 
                                        service = _tmp5_;
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"
 
274
                                        _tmp21_ = info;
 
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"
 
280
                                        service = _tmp23_;
 
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"
 
284
                                        _tmp25_ = service;
 
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"
195
290
                                }
 
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"
197
294
                        }
 
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"
199
298
                }
200
299
        }
 
300
#line 33 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
201
301
        return self;
 
302
#line 303 "rygel-root-device.c"
202
303
}
203
304
 
204
305
 
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"
207
310
}
208
311
 
209
312
 
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"
213
319
}
214
320
 
215
321
 
219
325
 
220
326
static void rygel_root_device_finalize (GObject* obj) {
221
327
        RygelRootDevice * self;
 
328
#line 30 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
222
329
        self = RYGEL_ROOT_DEVICE (obj);
 
330
#line 31 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
223
331
        _g_object_unref0 (self->services);
 
332
#line 30 "/home/jens/Source/rygel/src/rygel/rygel-root-device.vala"
224
333
        G_OBJECT_CLASS (rygel_root_device_parent_class)->finalize (obj);
 
334
#line 335 "rygel-root-device.c"
225
335
}
226
336
 
227
337