void module_init (RygelPluginLoader* loader) { #line 88 "rygel-gst-plugin.c" char* MEDIA_RENDERER_DESC_PATH; RygelPlugin* plugin; RygelResourceInfo* _tmp0_; RygelResourceInfo* _tmp1_; RygelResourceInfo* _tmp2_; #line 30 "rygel-gst-plugin.vala" g_return_if_fail (loader != NULL); #line 31 "rygel-gst-plugin.vala" MEDIA_RENDERER_DESC_PATH = g_strdup (DATA_DIR "/xml/MediaRenderer2.xml"); #line 34 "rygel-gst-plugin.vala" plugin = rygel_plugin_new (MEDIA_RENDERER_DESC_PATH, "GstRenderer", _ ("GStreamer Renderer"), NULL); #line 38 "rygel-gst-plugin.vala" rygel_plugin_add_resource (plugin, _tmp0_ = rygel_resource_info_new (RYGEL_CONNECTION_MANAGER_UPNP_ID, RYGEL_CONNECTION_MANAGER_UPNP_TYPE, RYGEL_CONNECTION_MANAGER_DESCRIPTION_PATH, RYGEL_TYPE_GST_CONNECTION_MANAGER)); #line 102 "rygel-gst-plugin.c" _rygel_resource_info_unref0 (_tmp0_); #line 42 "rygel-gst-plugin.vala" rygel_plugin_add_resource (plugin, _tmp1_ = rygel_resource_info_new (RYGEL_GST_AV_TRANSPORT_UPNP_ID, RYGEL_GST_AV_TRANSPORT_UPNP_TYPE, RYGEL_GST_AV_TRANSPORT_DESCRIPTION_PATH, RYGEL_TYPE_GST_AV_TRANSPORT)); #line 106 "rygel-gst-plugin.c" _rygel_resource_info_unref0 (_tmp1_); #line 46 "rygel-gst-plugin.vala" rygel_plugin_add_resource (plugin, _tmp2_ = rygel_resource_info_new (RYGEL_GST_RENDERING_CONTROL_UPNP_ID, RYGEL_GST_RENDERING_CONTROL_UPNP_TYPE, RYGEL_GST_RENDERING_CONTROL_DESCRIPTION_PATH, RYGEL_TYPE_GST_RENDERING_CONTROL)); #line 110 "rygel-gst-plugin.c" _rygel_resource_info_unref0 (_tmp2_); #line 51 "rygel-gst-plugin.vala" rygel_plugin_loader_add_plugin (loader, plugin); #line 114 "rygel-gst-plugin.c" _g_free0 (MEDIA_RENDERER_DESC_PATH); _g_object_unref0 (plugin); }
RygelPlugin* rygel_plugin_construct (GType object_type, const char* name, const char* title) { RygelPlugin * self; char* _tmp1_; const char* _tmp0_; char* _tmp3_; const char* _tmp2_; GeeArrayList* _tmp6_; GeeArrayList* _tmp7_; RygelResourceInfo* resource_info; g_return_val_if_fail (name != NULL, NULL); self = g_object_newv (object_type, 0, NULL); _tmp1_ = NULL; _tmp0_ = NULL; self->name = (_tmp1_ = (_tmp0_ = name, (_tmp0_ == NULL) ? NULL : g_strdup (_tmp0_)), self->name = (g_free (self->name), NULL), _tmp1_); _tmp3_ = NULL; _tmp2_ = NULL; self->title = (_tmp3_ = (_tmp2_ = title, (_tmp2_ == NULL) ? NULL : g_strdup (_tmp2_)), self->title = (g_free (self->title), NULL), _tmp3_); rygel_plugin_set_available (self, TRUE); if (title == NULL) { char* _tmp5_; const char* _tmp4_; _tmp5_ = NULL; _tmp4_ = NULL; self->title = (_tmp5_ = (_tmp4_ = name, (_tmp4_ == NULL) ? NULL : g_strdup (_tmp4_)), self->title = (g_free (self->title), NULL), _tmp5_); } _tmp6_ = NULL; self->resource_infos = (_tmp6_ = gee_array_list_new (RYGEL_TYPE_RESOURCE_INFO, (GBoxedCopyFunc) rygel_resource_info_ref, rygel_resource_info_unref, g_direct_equal), (self->resource_infos == NULL) ? NULL : (self->resource_infos = (g_object_unref (self->resource_infos), NULL)), _tmp6_); _tmp7_ = NULL; self->icon_infos = (_tmp7_ = gee_array_list_new (RYGEL_TYPE_ICON_INFO, (GBoxedCopyFunc) rygel_icon_info_ref, rygel_icon_info_unref, g_direct_equal), (self->icon_infos == NULL) ? NULL : (self->icon_infos = (g_object_unref (self->icon_infos), NULL)), _tmp7_); resource_info = rygel_resource_info_new (RYGEL_CONNECTION_MANAGER_UPNP_ID, RYGEL_CONNECTION_MANAGER_UPNP_TYPE, RYGEL_CONNECTION_MANAGER_DESCRIPTION_PATH, RYGEL_TYPE_CONNECTION_MANAGER); rygel_plugin_add_resource (self, resource_info); (resource_info == NULL) ? NULL : (resource_info = (rygel_resource_info_unref (resource_info), NULL)); return self; }
ExternalPlugin* external_plugin_construct (GType object_type, DBusGConnection* connection, const char* service_name) { GError * _inner_error_; ExternalPlugin * self; char* _tmp0_; char* _tmp1_; char* root_object; DBusGProxy* props; GValue value = {0}; GValue _tmp3_ = {0}; GValue _tmp2_ = {0}; const char* _tmp4_; char* title; char* _tmp6_; const char* _tmp5_; char* _tmp8_; const char* _tmp7_; RygelResourceInfo* resource_info; g_return_val_if_fail (connection != NULL, NULL); g_return_val_if_fail (service_name != NULL, NULL); _inner_error_ = NULL; _tmp0_ = NULL; _tmp1_ = NULL; root_object = (_tmp1_ = g_strconcat ("/", _tmp0_ = string_replace (service_name, ".", "/"), NULL), _tmp0_ = (g_free (_tmp0_), NULL), _tmp1_); props = dbus_g_proxy_new_for_name (connection, service_name, root_object, EXTERNAL_PLUGIN_PROPS_IFACE); _dynamic_Get4 (props, EXTERNAL_PLUGIN_OBJECT_IFACE, "DisplayName", &_tmp2_, &_inner_error_); value = (_tmp3_ = _tmp2_, G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL, _tmp3_); if (_inner_error_ != NULL) { root_object = (g_free (root_object), NULL); (props == NULL) ? NULL : (props = (g_object_unref (props), NULL)); G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL; g_critical ("file %s: line %d: uncaught error: %s", __FILE__, __LINE__, _inner_error_->message); g_clear_error (&_inner_error_); return NULL; } _tmp4_ = NULL; title = (_tmp4_ = g_value_get_string (&value), (_tmp4_ == NULL) ? NULL : g_strdup (_tmp4_)); self = (ExternalPlugin*) rygel_plugin_construct (object_type, service_name, title); _tmp6_ = NULL; _tmp5_ = NULL; self->service_name = (_tmp6_ = (_tmp5_ = service_name, (_tmp5_ == NULL) ? NULL : g_strdup (_tmp5_)), self->service_name = (g_free (self->service_name), NULL), _tmp6_); _tmp8_ = NULL; _tmp7_ = NULL; self->root_object = (_tmp8_ = (_tmp7_ = root_object, (_tmp7_ == NULL) ? NULL : g_strdup (_tmp7_)), self->root_object = (g_free (self->root_object), NULL), _tmp8_); resource_info = rygel_resource_info_new (RYGEL_CONTENT_DIRECTORY_UPNP_ID, RYGEL_CONTENT_DIRECTORY_UPNP_TYPE, RYGEL_CONTENT_DIRECTORY_DESCRIPTION_PATH, RYGEL_TYPE_EXTERNAL_CONTENT_DIR); rygel_plugin_add_resource ((RygelPlugin*) self, resource_info); root_object = (g_free (root_object), NULL); (props == NULL) ? NULL : (props = (g_object_unref (props), NULL)); G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL; title = (g_free (title), NULL); (resource_info == NULL) ? NULL : (resource_info = (rygel_resource_info_unref (resource_info), NULL)); return self; }
/* Path*/ TrackerPlugin* tracker_plugin_construct (GType object_type) { TrackerPlugin * self; RygelResourceInfo* resource_info; RygelIconInfo* icon_info; self = (TrackerPlugin*) rygel_plugin_construct (object_type, "Tracker", "@REALNAME@'s media"); resource_info = rygel_resource_info_new (RYGEL_CONTENT_DIRECTORY_UPNP_ID, RYGEL_CONTENT_DIRECTORY_UPNP_TYPE, RYGEL_CONTENT_DIRECTORY_DESCRIPTION_PATH, RYGEL_TYPE_MEDIA_TRACKER); rygel_plugin_add_resource ((RygelPlugin*) self, resource_info); icon_info = rygel_icon_info_new ("image/png", (guint) 48, (guint) 48, (guint) 24, TRACKER_PLUGIN_ICON); rygel_plugin_add_icon ((RygelPlugin*) self, icon_info); (resource_info == NULL) ? NULL : (resource_info = (rygel_resource_info_unref (resource_info), NULL)); (icon_info == NULL) ? NULL : (icon_info = (rygel_icon_info_unref (icon_info), NULL)); return self; }