rygel r286 - in trunk: . src/media-providers/tracker
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r286 - in trunk: . src/media-providers/tracker
- Date: Tue, 11 Nov 2008 17:42:03 +0000 (UTC)
Author: zeeshanak
Date: Tue Nov 11 17:42:02 2008
New Revision: 286
URL: http://svn.gnome.org/viewvc/rygel?rev=286&view=rev
Log:
Don't keep GUPnP context and D-Bus proxy objects in TrackerItem.
It can access these from the parent container object.
Modified:
trunk/ChangeLog
trunk/src/media-providers/tracker/rygel-tracker-container.vala
trunk/src/media-providers/tracker/rygel-tracker-image-item.vala
trunk/src/media-providers/tracker/rygel-tracker-item.vala
trunk/src/media-providers/tracker/rygel-tracker-music-item.vala
trunk/src/media-providers/tracker/rygel-tracker-video-item.vala
Modified: trunk/src/media-providers/tracker/rygel-tracker-container.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-tracker-container.vala (original)
+++ trunk/src/media-providers/tracker/rygel-tracker-container.vala Tue Nov 11 17:42:02 2008
@@ -163,21 +163,15 @@
if (this.child_class == MediaItem.VIDEO_CLASS) {
item = new TrackerVideoItem (this.root_id + ":" + path,
path,
- this,
- this.metadata,
- this.context);
+ this);
} else if (this.child_class == MediaItem.IMAGE_CLASS) {
item = new TrackerImageItem (this.root_id + ":" + path,
path,
- this,
- this.metadata,
- this.context);
+ this);
} else {
item = new TrackerMusicItem (this.root_id + ":" + path,
path,
- this,
- this.metadata,
- this.context);
+ this);
}
item.serialize (didl_writer);
Modified: trunk/src/media-providers/tracker/rygel-tracker-image-item.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-tracker-image-item.vala (original)
+++ trunk/src/media-providers/tracker/rygel-tracker-image-item.vala Tue Nov 11 17:42:02 2008
@@ -30,10 +30,8 @@
public class Rygel.TrackerImageItem : TrackerItem {
public TrackerImageItem (string id,
string path,
- TrackerContainer parent,
- dynamic DBus.Object metadata,
- GUPnP.Context context) {
- base (id, path, parent, metadata, context);
+ TrackerContainer parent) {
+ base (id, path, parent);
keys = new string[] {"File:Name",
"File:Mime",
@@ -51,7 +49,7 @@
/* TODO: make this async */
try {
- values = this.metadata.Get (parent.category, path, keys);
+ values = this.parent.metadata.Get (parent.category, path, keys);
} catch (GLib.Error error) {
critical ("failed to get metadata for %s: %s\n",
path,
Modified: trunk/src/media-providers/tracker/rygel-tracker-item.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-tracker-item.vala (original)
+++ trunk/src/media-providers/tracker/rygel-tracker-item.vala Tue Nov 11 17:42:02 2008
@@ -30,7 +30,6 @@
public abstract class Rygel.TrackerItem : MediaItem {
protected TrackerContainer parent;
protected string path;
- protected GUPnP.Context context;
protected dynamic DBus.Object metadata;
@@ -38,17 +37,12 @@
public TrackerItem (string id,
string path,
- TrackerContainer parent,
- dynamic DBus.Object metadata,
- GUPnP.Context context) {
+ TrackerContainer parent) {
this.id = id;
this.path = path;
this.parent = parent;
this.parent_id = parent.id;
this.upnp_class = parent.child_class;
-
- this.metadata = metadata;
- this.context = context;
}
protected string seconds_to_iso8601 (string seconds) {
@@ -71,8 +65,8 @@
protected string uri_from_path (string path) {
string escaped_path = Uri.escape_string (path, "/", true);
- return "http://%s:%u%s".printf (this.context.host_ip,
- this.context.port,
+ return "http://%s:%u%s".printf (this.parent.context.host_ip,
+ this.parent.context.port,
escaped_path);
}
}
Modified: trunk/src/media-providers/tracker/rygel-tracker-music-item.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-tracker-music-item.vala (original)
+++ trunk/src/media-providers/tracker/rygel-tracker-music-item.vala Tue Nov 11 17:42:02 2008
@@ -30,10 +30,8 @@
public class Rygel.TrackerMusicItem : TrackerItem {
public TrackerMusicItem (string id,
string path,
- TrackerContainer parent,
- dynamic DBus.Object metadata,
- GUPnP.Context context) {
- base (id, path, parent, metadata, context);
+ TrackerContainer parent) {
+ base (id, path, parent);
keys = new string[] {"File:Name",
"File:Mime",
@@ -51,7 +49,7 @@
/* TODO: make this async */
try {
- values = this.metadata.Get (parent.category, path, keys);
+ values = this.parent.metadata.Get (parent.category, path, keys);
} catch (GLib.Error error) {
critical ("failed to get metadata for %s: %s\n",
path,
Modified: trunk/src/media-providers/tracker/rygel-tracker-video-item.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-tracker-video-item.vala (original)
+++ trunk/src/media-providers/tracker/rygel-tracker-video-item.vala Tue Nov 11 17:42:02 2008
@@ -30,10 +30,8 @@
public class Rygel.TrackerVideoItem : TrackerItem {
public TrackerVideoItem (string id,
string path,
- TrackerContainer parent,
- dynamic DBus.Object metadata,
- GUPnP.Context context) {
- base (id, path, parent, metadata, context);
+ TrackerContainer parent) {
+ base (id, path, parent);
keys = new string[] {"File:Name",
"File:Mime",
@@ -49,7 +47,7 @@
/* TODO: make this async */
try {
- values = this.metadata.Get (parent.category, path, keys);
+ values = this.parent.metadata.Get (parent.category, path, keys);
} catch (GLib.Error error) {
critical ("failed to get metadata for %s: %s\n",
path,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]