tracker: Remove TrackerCategory.child_class
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 17 Sep 2009 15:29:53 +0000 (18:29 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 19 Sep 2009 16:50:15 +0000 (19:50 +0300)
TrackerCategory doesn't need to know it's children's UPnP class.

src/plugins/tracker/rygel-tracker-category.vala
src/plugins/tracker/rygel-tracker-image-category.vala
src/plugins/tracker/rygel-tracker-image-item.vala
src/plugins/tracker/rygel-tracker-item.vala
src/plugins/tracker/rygel-tracker-music-category.vala
src/plugins/tracker/rygel-tracker-music-item.vala
src/plugins/tracker/rygel-tracker-video-category.vala
src/plugins/tracker/rygel-tracker-video-item.vala

index e5cbf53..7f16c1a 100644 (file)
@@ -44,20 +44,15 @@ public abstract class Rygel.TrackerCategory : Rygel.MediaContainer {
 
     public string category;
 
-    /* UPnP class of items under this container */
-    public string child_class;
-
     Gee.List<AsyncResult> results;
 
     public TrackerCategory (string         id,
                             MediaContainer parent,
                             string         title,
-                            string         category,
-                            string         child_class) {
+                            string         category) {
         base (id, parent, title, 0);
 
         this.category = category;
-        this.child_class = child_class;
 
         try {
             this.create_proxies ();
index 23c102e..9b301c8 100644 (file)
@@ -28,7 +28,7 @@ public class Rygel.TrackerImageCategory : Rygel.TrackerCategory {
     public TrackerImageCategory (string         id,
                                  MediaContainer parent,
                                  string         title) {
-        base (id, parent, title, "Images", MediaItem.IMAGE_CLASS);
+        base (id, parent, title, "Images");
     }
 
     protected override string[] get_metadata_keys () {
index 466880e..896ccc1 100644 (file)
@@ -46,7 +46,7 @@ public class Rygel.TrackerImageItem : Rygel.TrackerItem {
                              string          path,
                              TrackerCategory parent,
                              string[]        metadata) {
-        base (id, path, parent, metadata);
+        base (id, path, parent, MediaItem.IMAGE_CLASS, metadata);
     }
 
     public static string[] get_metadata_keys () {
index 12f3ac2..52969ba 100644 (file)
@@ -33,8 +33,9 @@ public abstract class Rygel.TrackerItem : Rygel.MediaItem {
     public TrackerItem (string          id,
                         string          path,
                         TrackerCategory parent,
+                        string          upnp_class,
                         string[]        metadata) {
-        base (id, parent, "", parent.child_class);
+        base (id, parent, "", upnp_class);
 
         this.path = path;
 
index 9aa7d3a..a71eb91 100644 (file)
@@ -28,7 +28,7 @@ public class Rygel.TrackerMusicCategory : Rygel.TrackerCategory {
     public TrackerMusicCategory (string         id,
                                  MediaContainer parent,
                                  string         title) {
-        base (id, parent, title, "Music", MediaItem.MUSIC_CLASS);
+        base (id, parent, title, "Music");
     }
 
     protected override string[] get_metadata_keys () {
index 9b2c871..1c49ae4 100644 (file)
@@ -47,7 +47,7 @@ public class Rygel.TrackerMusicItem : Rygel.TrackerItem {
                              string          path,
                              TrackerCategory parent,
                              string[]        metadata) {
-        base (id, path, parent, metadata);
+        base (id, path, parent, MediaItem.MUSIC_CLASS, metadata);
     }
 
     public static string[] get_metadata_keys () {
index 3628999..e33cfd0 100644 (file)
@@ -28,7 +28,7 @@ public class Rygel.TrackerVideoCategory : Rygel.TrackerCategory {
     public TrackerVideoCategory (string         id,
                                  MediaContainer parent,
                                  string         title) {
-        base (id, parent, title, "Videos", MediaItem.VIDEO_CLASS);
+        base (id, parent, title, "Videos");
     }
 
     protected override string[] get_metadata_keys () {
index d5fbf9c..9f7043e 100644 (file)
@@ -45,7 +45,7 @@ public class Rygel.TrackerVideoItem : Rygel.TrackerItem {
                              string          path,
                              TrackerCategory parent,
                              string[]        metadata) {
-        base (id, path, parent, metadata);
+        base (id, path, parent, MediaItem.VIDEO_CLASS, metadata);
     }
 
     public static string[] get_metadata_keys () {