core: add some documentation
authorJens Georg <mail@jensge.org>
Fri, 26 Jun 2009 22:23:13 +0000 (00:23 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 9 Sep 2009 13:46:26 +0000 (16:46 +0300)
src/rygel/rygel-media-db.vala

index 6f589ba..9823b0b 100644 (file)
@@ -35,6 +35,11 @@ public enum Rygel.MediaDBObjectType {
     ITEM
 }
 
+/**
+ * Persistent storage of media objects
+ *
+ * MediaDB is a sqlite3 backed persistent storage of media objects
+ */
 public class Rygel.MediaDB : Object {
     private Database db;
     private MediaDBObjectFactory factory;
@@ -100,6 +105,16 @@ public class Rygel.MediaDB : Object {
     "FROM Object LEFT OUTER JOIN Meta_Data " +
         "ON Object.metadata_fk = Meta_Data.id WHERE Object.upnp_id = ?";
 
+    /**
+     * This is the database query used to retrieve the children for a
+     * given object.
+     *
+     * Sorting is as follows:
+     *   - by type: containers first, then items if both are present
+     *   - by upnp_class: items are sorted according to their class
+     *   - by track: sorted by track
+     *   - and after that alphabetically
+     */
     private const string GET_CHILDREN_STRING =
     "SELECT type_fk, title, Meta_Data.size, Meta_Data.mime_type, " +
             "Meta_Data.width, Meta_Data.height, " +