static GUPnPServiceInfo * gupnp_device_proxy_get_service (GUPnPDeviceInfo *info, xmlNode *element) { GUPnPResourceFactory *factory; GUPnPServiceProxy *service; GUPnPContext *context; GUPnPXMLDoc *doc; const char *location, *udn; const SoupURI *url_base; factory = gupnp_device_info_get_resource_factory (info); context = gupnp_device_info_get_context (info); doc = _gupnp_device_info_get_document (info); udn = gupnp_device_info_get_udn (info); location = gupnp_device_info_get_location (info); url_base = gupnp_device_info_get_url_base (info); service = gupnp_resource_factory_create_service_proxy (factory, context, doc, element, udn, NULL, location, url_base); return GUPNP_SERVICE_INFO (service); }
/* Pubic methods*/ static RygelMediaContainer* rygel_external_content_dir_real_create_root_container (RygelContentDirectory* base) { RygelExternalContentDir * self; ExternalPlugin* _tmp2_; GUPnPRootDevice* _tmp1_; GUPnPRootDevice* _tmp0_; ExternalPlugin* _tmp3_; ExternalPlugin* plugin; RygelMediaContainer* _tmp4_; self = (RygelExternalContentDir*) base; _tmp2_ = NULL; _tmp1_ = NULL; _tmp0_ = NULL; _tmp3_ = NULL; plugin = (_tmp3_ = (_tmp2_ = EXTERNAL_PLUGIN (gupnp_device_info_get_resource_factory ((GUPnPDeviceInfo*) (_tmp1_ = (g_object_get ((GUPnPService*) self, "root-device", &_tmp0_, NULL), _tmp0_)))), (_tmp2_ == NULL) ? NULL : g_object_ref (_tmp2_)), (_tmp1_ == NULL) ? NULL : (_tmp1_ = (g_object_unref (_tmp1_), NULL)), _tmp3_); _tmp4_ = NULL; return (_tmp4_ = (RygelMediaContainer*) rygel_external_container_new ("0", plugin->service_name, plugin->root_object, gupnp_context_get_host_ip (gupnp_service_info_get_context ((GUPnPServiceInfo*) self)), NULL), (plugin == NULL) ? NULL : (plugin = (g_object_unref (plugin), NULL)), _tmp4_); }
static GUPnPServiceInfo * gupnp_device_get_service (GUPnPDeviceInfo *info, xmlNode *element) { GUPnPDevice *device; GUPnPService *service; GUPnPResourceFactory *factory; GUPnPContext *context; GUPnPDevice *root_device; const char *location, *udn; const SoupURI *url_base; device = GUPNP_DEVICE (info); root_device = GUPNP_IS_ROOT_DEVICE (device) ? device : GUPNP_DEVICE (device->priv->root_device); if (root_device == NULL) { g_warning ("Root device not found."); return NULL; } factory = gupnp_device_info_get_resource_factory (info); context = gupnp_device_info_get_context (info); udn = gupnp_device_info_get_udn (info); location = gupnp_device_info_get_location (info); url_base = gupnp_device_info_get_url_base (info); service = gupnp_resource_factory_create_service (factory, context, root_device, element, udn, location, url_base); return GUPNP_SERVICE_INFO (service); }