[rygel] tracker: Remove TrackerCategory.child_class



commit 36ba1ecfcae589a3c5e941b0087d257adbc2395c
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Sep 17 18:29:53 2009 +0300

    tracker: Remove TrackerCategory.child_class
    
    TrackerCategory doesn't need to know it's children's UPnP class.

 src/plugins/tracker/rygel-tracker-category.vala    |    7 +------
 .../tracker/rygel-tracker-image-category.vala      |    2 +-
 src/plugins/tracker/rygel-tracker-image-item.vala  |    2 +-
 src/plugins/tracker/rygel-tracker-item.vala        |    3 ++-
 .../tracker/rygel-tracker-music-category.vala      |    2 +-
 src/plugins/tracker/rygel-tracker-music-item.vala  |    2 +-
 .../tracker/rygel-tracker-video-category.vala      |    2 +-
 src/plugins/tracker/rygel-tracker-video-item.vala  |    2 +-
 8 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-category.vala b/src/plugins/tracker/rygel-tracker-category.vala
index e5cbf53..7f16c1a 100644
--- a/src/plugins/tracker/rygel-tracker-category.vala
+++ b/src/plugins/tracker/rygel-tracker-category.vala
@@ -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 ();
diff --git a/src/plugins/tracker/rygel-tracker-image-category.vala b/src/plugins/tracker/rygel-tracker-image-category.vala
index 23c102e..9b301c8 100644
--- a/src/plugins/tracker/rygel-tracker-image-category.vala
+++ b/src/plugins/tracker/rygel-tracker-image-category.vala
@@ -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 () {
diff --git a/src/plugins/tracker/rygel-tracker-image-item.vala b/src/plugins/tracker/rygel-tracker-image-item.vala
index 466880e..896ccc1 100644
--- a/src/plugins/tracker/rygel-tracker-image-item.vala
+++ b/src/plugins/tracker/rygel-tracker-image-item.vala
@@ -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 () {
diff --git a/src/plugins/tracker/rygel-tracker-item.vala b/src/plugins/tracker/rygel-tracker-item.vala
index 12f3ac2..52969ba 100644
--- a/src/plugins/tracker/rygel-tracker-item.vala
+++ b/src/plugins/tracker/rygel-tracker-item.vala
@@ -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;
 
diff --git a/src/plugins/tracker/rygel-tracker-music-category.vala b/src/plugins/tracker/rygel-tracker-music-category.vala
index 9aa7d3a..a71eb91 100644
--- a/src/plugins/tracker/rygel-tracker-music-category.vala
+++ b/src/plugins/tracker/rygel-tracker-music-category.vala
@@ -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 () {
diff --git a/src/plugins/tracker/rygel-tracker-music-item.vala b/src/plugins/tracker/rygel-tracker-music-item.vala
index 9b2c871..1c49ae4 100644
--- a/src/plugins/tracker/rygel-tracker-music-item.vala
+++ b/src/plugins/tracker/rygel-tracker-music-item.vala
@@ -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 () {
diff --git a/src/plugins/tracker/rygel-tracker-video-category.vala b/src/plugins/tracker/rygel-tracker-video-category.vala
index 3628999..e33cfd0 100644
--- a/src/plugins/tracker/rygel-tracker-video-category.vala
+++ b/src/plugins/tracker/rygel-tracker-video-category.vala
@@ -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 () {
diff --git a/src/plugins/tracker/rygel-tracker-video-item.vala b/src/plugins/tracker/rygel-tracker-video-item.vala
index d5fbf9c..9f7043e 100644
--- a/src/plugins/tracker/rygel-tracker-video-item.vala
+++ b/src/plugins/tracker/rygel-tracker-video-item.vala
@@ -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 () {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]