[rygel/rygel-0-16] server: Make some SimpleContainer methods protected and documented.



commit 9bfc932ddf0e84fb1579987310d36a6fce402cac
Author: Murray Cumming <murrayc openismus com>
Date:   Thu Sep 13 12:27:50 2012 +0200

    server: Make some SimpleContainer methods protected and documented.
    
    Make get_all_children() and is_child_id_unique() protected and
    document them as being useful when implementing derived classes,
    because they are only used in plugins that derive their own
    containers.
    
    jens: Revert API change for rygel 0.16 branch

 src/librygel-server/rygel-simple-container.vala |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-simple-container.vala b/src/librygel-server/rygel-simple-container.vala
index 6f3fa3b..bda5180 100644
--- a/src/librygel-server/rygel-simple-container.vala
+++ b/src/librygel-server/rygel-simple-container.vala
@@ -72,6 +72,16 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
         this.add_child (child);
     }
 
+    /**
+     * Get all children, including the empty children.
+     *
+     * This is useful when all children are empty,
+     * so get_children() would return no objects,
+     * but when you need to add items to the empty
+     * items.
+     *
+     * This is useful only when implementing derived classes.
+     */
     public MediaObjects get_all_children () {
         var all = new MediaObjects ();
         all.add_all (this.children);
@@ -122,6 +132,14 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
         this.child_count = 0;
     }
 
+    /**
+     * Check that the ID is unique within this container.
+     *
+     * This is useful only when implementing derived classes.
+     *
+     * @param child_id The ID to check for uniqueness.
+     * @return true if the child ID is unique within this container.
+     */
     public bool is_child_id_unique (string child_id) {
         var unique = true;
 



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