ContentDirectory.get_*_children() returns a Gee.List.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Wed, 28 Jan 2009 12:33:28 +0000 (12:33 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Wed, 28 Jan 2009 12:33:28 +0000 (12:33 +0000)
svn path=/trunk/; revision=498

src/plugins/dvb/rygel-dvb-content-dir.vala
src/plugins/test/rygel-test-content-dir.vala
src/plugins/tracker/rygel-media-tracker.vala
src/rygel/rygel-content-directory.vala

index 1fcdb65..d768d29 100644 (file)
@@ -115,7 +115,7 @@ public class Rygel.DVBContentDir : ContentDirectory {
         return media_object;
     }
 
-    public override ArrayList<MediaObject> get_children (
+    public override Gee.List<MediaObject> get_children (
                                                  string   container_id,
                                                  uint     offset,
                                                  uint     max_count,
@@ -144,10 +144,10 @@ public class Rygel.DVBContentDir : ContentDirectory {
             throw new ContentDirectoryError.NO_SUCH_OBJECT ("No such object");
         }
 
-        return (ArrayList<MediaObject>) children;
+        return children;
     }
 
-    public override ArrayList<MediaObject> get_root_children (
+    public override Gee.List<MediaObject> get_root_children (
                                                  uint     offset,
                                                  uint     max_count,
                                                  out uint child_count)
@@ -169,7 +169,7 @@ public class Rygel.DVBContentDir : ContentDirectory {
             throw new ContentDirectoryError.NO_SUCH_OBJECT ("No such object");
         }
 
-        return (ArrayList<MediaObject>) children;
+        return children;
     }
 
     // Private methods
index 8cda531..23fbee6 100644 (file)
@@ -54,7 +54,7 @@ public class Rygel.TestContentDir : ContentDirectory {
         this.root_container.child_count = this.items.size;
     }
 
-    public override ArrayList<MediaObject> get_root_children (
+    public override Gee.List<MediaObject> get_root_children (
                                                  uint     offset,
                                                  uint     max_count,
                                                  out uint child_count)
@@ -76,7 +76,7 @@ public class Rygel.TestContentDir : ContentDirectory {
             throw new ContentDirectoryError.NO_SUCH_OBJECT ("No such object");
         }
 
-        return (ArrayList<MediaObject>) children;
+        return children;
     }
 
     public override MediaObject find_object_by_id (string object_id)
index 01ade8f..962060e 100644 (file)
@@ -69,7 +69,7 @@ public class Rygel.MediaTracker : ContentDirectory {
         this.search_parser = new SearchCriteriaParser ();
     }
 
-    public override ArrayList<MediaObject> get_children (
+    public override Gee.List<MediaObject> get_children (
                                                  string   container_id,
                                                  uint     offset,
                                                  uint     max_count,
@@ -105,7 +105,7 @@ public class Rygel.MediaTracker : ContentDirectory {
         return media_object;
     }
 
-    public override ArrayList<MediaObject> get_root_children (
+    public override Gee.List<MediaObject> get_root_children (
                                                  uint     offset,
                                                  uint     max_count,
                                                  out uint child_count)
@@ -127,7 +127,7 @@ public class Rygel.MediaTracker : ContentDirectory {
             throw new ContentDirectoryError.NO_SUCH_OBJECT ("No such object");
         }
 
-        return (ArrayList<MediaObject>) children;
+        return children;
     }
 
     /* Private methods */
index 3eabd41..838eb9e 100644 (file)
@@ -73,11 +73,11 @@ public class Rygel.ContentDirectory: Service {
     DIDLLiteWriter didl_writer;
 
     // Public abstract methods derived classes need to implement
-    public virtual ArrayList<MediaObject> get_children (string   container_id,
-                                                        uint     offset,
-                                                        uint     max_count,
-                                                        out uint child_count)
-                                                        throws GLib.Error {
+    public virtual Gee.List<MediaObject> get_children (string   container_id,
+                                                       uint     offset,
+                                                       uint     max_count,
+                                                       out uint child_count)
+                                                       throws GLib.Error {
         throw new ServerError.NOT_IMPLEMENTED ("Not Implemented\n");
     }
 
@@ -86,7 +86,7 @@ public class Rygel.ContentDirectory: Service {
         throw new ServerError.NOT_IMPLEMENTED ("Not Implemented\n");
     }
 
-    public virtual ArrayList<MediaObject> get_root_children (
+    public virtual Gee.List<MediaObject> get_root_children (
                                                     uint     offset,
                                                     uint     max_count,
                                                     out uint child_count)
@@ -332,7 +332,7 @@ public class Rygel.ContentDirectory: Service {
         if (args.requested_count == 0)
             args.requested_count = MAX_REQUESTED_COUNT;
 
-        ArrayList<MediaItem> children;
+        Gee.List<MediaItem> children;
 
         children = this.get_children (args.object_id,
                                       args.index,