[rygel] media-export: Make object-factory hand out virtual containers



commit d4002d07d37ebaa3b468ad9ad56c4e7c08daed5d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Mar 22 16:37:53 2010 +0200

    media-export: Make object-factory hand out virtual containers

 .../rygel-media-export-object-factory.vala         |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-object-factory.vala b/src/plugins/media-export/rygel-media-export-object-factory.vala
index 4ccaf70..5a5b977 100644
--- a/src/plugins/media-export/rygel-media-export-object-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-object-factory.vala
@@ -25,6 +25,10 @@ internal class Rygel.MediaExportObjectFactory : MediaDBObjectFactory {
                                                   string  id,
                                                   string  title,
                                                   uint    child_count) {
-        return new MediaExportWritableContainer (media_db, id, title);
+        if (id.has_prefix (MediaExportQueryContainer.PREFIX)) {
+            return new MediaExportQueryContainer (media_db, id, title);
+        } else {
+            return new MediaExportWritableContainer (media_db, id, title);
+        }
     }
 }



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