[rygel] core: Add get_all_children from SimpleContainer



commit 6264bb3c535896e66cb9a9dd7b80b2f97d092d0e
Author: Jens Georg <mail jensge org>
Date:   Thu Jul 21 12:50:20 2011 +0200

    core: Add get_all_children from SimpleContainer
    
    The "children" member only contains the non-empty children. This adds
    a get_all_children() method that returns all, non-empty and empty
    children.

 src/rygel/rygel-simple-container.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-simple-container.vala b/src/rygel/rygel-simple-container.vala
index 81f40af..640af42 100644
--- a/src/rygel/rygel-simple-container.vala
+++ b/src/rygel/rygel-simple-container.vala
@@ -55,6 +55,14 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
         this.add_child (child);
     }
 
+    public MediaObjects get_all_children () {
+        var all = new MediaObjects ();
+        all.add_all (this.children);
+        all.add_all (this.empty_children);
+
+        return all;
+    }
+
     /**
      * NOTE: This method only actually adds the child container to the hierarchy
      * until it has any children to offer.



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