/* 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; }
void rygel_value_take_icon_info (GValue* value, gpointer v_object) { RygelIconInfo* old; g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_ICON_INFO)); old = value->data[0].v_pointer; if (v_object) { g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_ICON_INFO)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); value->data[0].v_pointer = v_object; } else { value->data[0].v_pointer = NULL; } if (old) { rygel_icon_info_unref (old); } }
static void rygel_value_icon_info_free_value (GValue* value) { if (value->data[0].v_pointer) { rygel_icon_info_unref (value->data[0].v_pointer); } }