media-export: Make some vfuncs protected.
authorMurray Cumming <murrayc@murrayc.com>
Thu, 17 Jan 2013 12:40:38 +0000 (13:40 +0100)
committerMurray Cumming <murrayc@murrayc.com>
Thu, 17 Jan 2013 12:40:38 +0000 (13:40 +0100)
doc/reference/librygel-server/gtkdoc/implementing-server-plugins.xml
src/plugins/media-export/rygel-media-export-harvesting-task.vala
src/plugins/media-export/rygel-media-export-media-cache.vala
src/plugins/media-export/rygel-media-export-trackable-db-container.vala

index bd90bc3..baa3203 100644 (file)
@@ -82,7 +82,7 @@ implemented in Vala.
 
 <para>The <classname>RygelMediaExportPlugin</classname> class, derived from <link linkend="RygelMediaServerPlugin">RygelMediaServerPlugin</link>, simply instantiates its <classname>RygelMediaExportRootContainer</classname> class, derived from <link linkend="RygelMediaContainer">RygelMediaContainer</link>, providing it to the base class as the root container.</para>
 
-<para>The <classname>RygelMediaExportRootContainer</classname> creates an instance of its RygelMediaExportMediaCache, which uses SQLite to maintain a cache of the media files that it finds on the file system.</para>
+<para>The <classname>RygelMediaExportRootContainer</classname> creates an instance of a RygelMediaExportMediaCache class and a RygelMediaExportHarvester class. The harvester finds files on the filesystem, and stores them in the media cache, which uses SQLite to keep trak of them.</para>
 <!-- TODO: Simplify the class hierarchy in the example. -->
 
 </section>
index c3c8c52..91c584b 100644 (file)
@@ -324,7 +324,7 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
 
         if (item != null) {
             item.parent_ref = this.containers.peek_head ();
-            // This is only necessary to generate the poper <objAdd LastChange
+            // This is only necessary to generate the proper <objAdd LastChange
             // entry
             if (entry.known) {
                 (item as UpdatableObject).commit.begin ();
index aeb7615..4a12ae0 100644 (file)
@@ -43,7 +43,7 @@ internal struct Rygel.MediaExport.ExistsCacheEntry {
 }
 
 /**
- * Persistent storage of media objects
+ * Persistent storage of media objects.
  *
  * MediaExportDB is a sqlite3 backed persistent storage of media objects.
  */
index b5d705c..f8ca5bf 100644 (file)
@@ -27,7 +27,8 @@ public class Rygel.MediaExport.TrackableDbContainer : TrackableContainer,
         base (id, title);
     }
 
-    public async void add_child (MediaObject object) {
+    // TrackableContainer virtual function implementations:
+    protected async void add_child (MediaObject object) {
         try {
             if (object is MediaItem) {
                 this.media_db.save_item (object as MediaItem);
@@ -41,7 +42,7 @@ public class Rygel.MediaExport.TrackableDbContainer : TrackableContainer,
         }
     }
 
-    public async void remove_child (MediaObject object) {
+    protected async void remove_child (MediaObject object) {
         try {
             this.media_db.remove_object (object);
         } catch (Error error) {