[rygel] folder: Rename to MediaExport



commit 9a570ea815d2eb55f4824ee8487a9af74b98bfba
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Jun 4 16:13:46 2009 +0300

    folder: Rename to MediaExport
---
 configure.ac                                       |   12 ++--
 src/plugins/Makefile.am                            |    6 +-
 src/plugins/folder/Makefile.am                     |   54 --------------------
 src/plugins/media-export/Makefile.am               |   54 ++++++++++++++++++++
 .../rygel-media-export-container.vala}             |   20 ++++----
 ...ygel-media-export-directory-search-result.vala} |    6 +-
 .../rygel-media-export-plugin.vala}                |    8 ++--
 .../rygel-media-export-root-container.vala}        |   18 +++---
 8 files changed, 89 insertions(+), 89 deletions(-)

diff --git a/configure.ac b/configure.ac
index 950084d..3bdc0ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,10 +187,10 @@ AC_ARG_ENABLE(dvb-plugin,
 	[  --enable-dvb-plugin          build DVB plugin],,
         enable_dvb_plugin=yes)
 
-# Build Folder plugin
-AC_ARG_ENABLE(folder-plugin,
-	[  --enable-folder-plugin          build Folder plugin],,
-        enable_folder_plugin=yes)
+# Build MediaExport plugin
+AC_ARG_ENABLE(media-export-plugin,
+	[  --enable-media-export-plugin          build MediaExport plugin],,
+        enable_media_export_plugin=yes)
 
 # Build External plugin
 AC_ARG_ENABLE(external-plugin,
@@ -211,7 +211,7 @@ AM_CONDITIONAL([BUILD_TRACKER_PLUGIN],
                [test "x$enable_tracker_plugin" = "xyes"])
 AM_CONDITIONAL([BUILD_DVB_PLUGIN], [test "x$enable_dvb_plugin" = "xyes"])
 AM_CONDITIONAL([BUILD_MEDIATHEK_PLUGIN], [test "x$enable_mediathek_plugin" = "xyes"])
-AM_CONDITIONAL([BUILD_FOLDER_PLUGIN], [test "x$enable_folder_plugin" = "xyes"])
+AM_CONDITIONAL([BUILD_MEDIA_EXPORT_PLUGIN], [test "x$enable_media_export_plugin" = "xyes"])
 AM_CONDITIONAL([BUILD_EXTERNAL_PLUGIN], [test "x$enable_external_plugin" = "xyes"])
 
 # Gettext
@@ -231,7 +231,7 @@ src/rygel/Makefile
 src/ui/Makefile
 src/plugins/Makefile
 src/plugins/dvb/Makefile
-src/plugins/folder/Makefile
+src/plugins/media-export/Makefile
 src/plugins/external/Makefile
 src/plugins/mediathek/Makefile
 src/plugins/tracker/Makefile
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 91b3c81..1ead891 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -14,8 +14,8 @@ if BUILD_MEDIATHEK_PLUGIN
 MEDIATHEK_PLUGIN = mediathek
 endif
 
-if BUILD_FOLDER_PLUGIN
-FOLDER_PLUGIN = folder
+if BUILD_MEDIA_EXPORT_PLUGIN
+MEDIA_EXPORT_PLUGIN = media-export
 endif
 
 if BUILD_EXTERNAL_PLUGIN
@@ -26,7 +26,7 @@ SUBDIRS = $(TEST_PLUGIN) \
 	  $(TRACKER_PLUGIN) \
 	  $(DVB_PLUGIN) \
 	  $(MEDIATHEK_PLUGIN) \
-	  $(FOLDER_PLUGIN) \
+	  $(MEDIA_EXPORT_PLUGIN) \
 	  $(EXTERNAL_PLUGIN)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/plugins/folder/Makefile.am b/src/plugins/folder/Makefile.am
deleted file mode 100644
index 66d7d98..0000000
--- a/src/plugins/folder/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-plugindir = $(libdir)/rygel-1.0
-
-plugin_LTLIBRARIES = librygel-media-folder.la
-
-AM_CFLAGS = $(LIBGUPNP_CFLAGS) \
-	$(LIBGUPNP_AV_CFLAGS) \
-	$(LIBDBUS_GLIB_CFLAGS) \
-	$(LIBGSTREAMER_CFLAGS) \
-	$(LIBGCONF_CFLAGS) \
-	$(GEE_CFLAGS) \
-	-I$(top_srcdir)/src/rygel -DDATA_DIR='"$(datadir)"'
-
-BUILT_SOURCES = rygel-folder-root-container.c \
-		rygel-folder-container.c \
-		rygel-folder-directory-search-result.c \
-		rygel-folder-plugin.c
-
-$(BUILT_SOURCES) : rygel-media-folder.stamp
-
-librygel_media_folder_la_SOURCES = \
-	rygel-folder-plugin.c \
-	rygel-folder-plugin.vala \
-	rygel-folder-root-container.c \
-	rygel-folder-root-container.vala \
-	rygel-folder-container.c \
-	rygel-folder-container.vala \
-	rygel-folder-directory-search-result.c \
-	rygel-folder-directory-search-result.vala
-
-rygel-media-folder.stamp: $(filter %.vala,$(librygel_media_folder_la_SOURCES))
-	$(VALAC) -g -C --vapidir=$(top_srcdir)/src/rygel \
-	--pkg rygel-1.0 \
-	--pkg cstuff \
-	--pkg gupnp-1.0 \
-	--pkg gupnp-av-1.0 \
-	--pkg libsoup-2.4 \
-	--pkg gee-1.0 \
-	--pkg libxml-2.0 \
-	--pkg gconf-2.0 \
-	$^
-	touch $@
-
-librygel_media_folder_la_LIBADD = \
-	$(LIBGUPNP_LIBS) \
-	$(LIBGUPNP_AV_LIBS) \
-	$(LIBDBUS_GLIB_LIBS) \
-	$(LIBGSTREAMER_LIBS) \
-	$(LIBGCONF_LIBS) \
-	$(GEE_LIBS)
-librygel_media_folder_la_LDFLAGS = -shared -fPIC -module -avoid-version
-
-CLEANFILES = $(BUILT_SOURCES) rygel-media-folder.stamp
-MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = $(BUILT_SOURCES) rygel-media-folder.stamp
diff --git a/src/plugins/media-export/Makefile.am b/src/plugins/media-export/Makefile.am
new file mode 100644
index 0000000..0dba7fe
--- /dev/null
+++ b/src/plugins/media-export/Makefile.am
@@ -0,0 +1,54 @@
+plugindir = $(libdir)/rygel-1.0
+
+plugin_LTLIBRARIES = librygel-media-media-export.la
+
+AM_CFLAGS = $(LIBGUPNP_CFLAGS) \
+	$(LIBGUPNP_AV_CFLAGS) \
+	$(LIBDBUS_GLIB_CFLAGS) \
+	$(LIBGSTREAMER_CFLAGS) \
+	$(LIBGCONF_CFLAGS) \
+	$(GEE_CFLAGS) \
+	-I$(top_srcdir)/src/rygel -DDATA_DIR='"$(datadir)"'
+
+BUILT_SOURCES = rygel-media-export-root-container.c \
+		rygel-media-export-container.c \
+		rygel-media-export-directory-search-result.c \
+		rygel-media-export-plugin.c
+
+$(BUILT_SOURCES) : rygel-media-media-export.stamp
+
+librygel_media_media_export_la_SOURCES = \
+	rygel-media-export-plugin.c \
+	rygel-media-export-plugin.vala \
+	rygel-media-export-root-container.c \
+	rygel-media-export-root-container.vala \
+	rygel-media-export-container.c \
+	rygel-media-export-container.vala \
+	rygel-media-export-directory-search-result.c \
+	rygel-media-export-directory-search-result.vala
+
+rygel-media-media-export.stamp: $(filter %.vala,$(librygel_media_media_export_la_SOURCES))
+	$(VALAC) -g -C --vapidir=$(top_srcdir)/src/rygel \
+	--pkg rygel-1.0 \
+	--pkg cstuff \
+	--pkg gupnp-1.0 \
+	--pkg gupnp-av-1.0 \
+	--pkg libsoup-2.4 \
+	--pkg gee-1.0 \
+	--pkg libxml-2.0 \
+	--pkg gconf-2.0 \
+	$^
+	touch $@
+
+librygel_media_media_export_la_LIBADD = \
+	$(LIBGUPNP_LIBS) \
+	$(LIBGUPNP_AV_LIBS) \
+	$(LIBDBUS_GLIB_LIBS) \
+	$(LIBGSTREAMER_LIBS) \
+	$(LIBGCONF_LIBS) \
+	$(GEE_LIBS)
+librygel_media_media_export_la_LDFLAGS = -shared -fPIC -module -avoid-version
+
+CLEANFILES = $(BUILT_SOURCES) rygel-media-media-export.stamp
+MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = $(BUILT_SOURCES) rygel-media-media-export.stamp
diff --git a/src/plugins/folder/rygel-folder-container.vala b/src/plugins/media-export/rygel-media-export-container.vala
similarity index 89%
rename from src/plugins/folder/rygel-folder-container.vala
rename to src/plugins/media-export/rygel-media-export-container.vala
index 861870e..5a2ac2f 100644
--- a/src/plugins/folder/rygel-folder-container.vala
+++ b/src/plugins/media-export/rygel-media-export-container.vala
@@ -28,7 +28,7 @@ using Rygel;
  *
  * The folder contents will be queried on demand and cached afterwards
  */
-public class Rygel.FolderContainer : MediaContainer {
+public class Rygel.MediaExportContainer : MediaContainer {
 
     /**
      * Number of children to use for crawling the subdir
@@ -54,10 +54,10 @@ public class Rygel.FolderContainer : MediaContainer {
                                        AsyncReadyCallback callback) {
         // if the cache is empty, fill it
         if (items.size == 0) {
-            var res = new FolderDirectorySearchResult (this, 
-                                offset, 
-                                max_count, 
-                                callback);
+            var res = new MediaExportDirectorySearchResult (this,
+                                                            offset,
+                                                            max_count,
+                                                            callback);
 
             root_dir.enumerate_children_async (
                                 FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE + "," +
@@ -85,8 +85,8 @@ public class Rygel.FolderContainer : MediaContainer {
     public override Gee.List<MediaObject>? get_children_finish (
                                                          AsyncResult res)
                                                          throws GLib.Error {
-        if (res is FolderDirectorySearchResult) {
-            var dsr = (FolderDirectorySearchResult) res;
+        if (res is MediaExportDirectorySearchResult) {
+            var dsr = (MediaExportDirectorySearchResult) res;
 
             foreach (var item in dsr.data) {
                 this.items.add (item);
@@ -133,8 +133,8 @@ public class Rygel.FolderContainer : MediaContainer {
         // folders
         if (item == null) {
             foreach (var tmp in items) {
-                if (tmp is FolderContainer) {
-                    var folder = (FolderContainer) tmp;
+                if (tmp is MediaExportContainer) {
+                    var folder = (MediaExportContainer) tmp;
                     item = folder.find_object_sync (id);
                     if (item != null) {
                         break;
@@ -153,7 +153,7 @@ public class Rygel.FolderContainer : MediaContainer {
      * @parameter file, directory you want to expose
      * @parameter full, show full path in title
      */
-    public FolderContainer (MediaContainer parent, File file) {
+    public MediaExportContainer (MediaContainer parent, File file) {
         string id = Checksum.compute_for_string (ChecksumType.MD5, 
                                                  file.get_uri ());
 
diff --git a/src/plugins/folder/rygel-folder-directory-search-result.vala b/src/plugins/media-export/rygel-media-export-directory-search-result.vala
similarity index 96%
rename from src/plugins/folder/rygel-folder-directory-search-result.vala
rename to src/plugins/media-export/rygel-media-export-directory-search-result.vala
index 14235ac..4ffb879 100644
--- a/src/plugins/folder/rygel-folder-directory-search-result.vala
+++ b/src/plugins/media-export/rygel-media-export-directory-search-result.vala
@@ -22,7 +22,7 @@ using Gee;
 using Rygel;
 using GLib;
 
-public class Rygel.FolderDirectorySearchResult : 
+public class Rygel.MediaExportDirectorySearchResult :
              Rygel.SimpleAsyncResult<Gee.List<MediaObject>> {
     private uint max_count;
     private uint offset;
@@ -30,7 +30,7 @@ public class Rygel.FolderDirectorySearchResult :
 
     private const int MAX_CHILDREN = 10;
 
-    public FolderDirectorySearchResult (MediaContainer     parent,
+    public MediaExportDirectorySearchResult (MediaContainer     parent,
                                         uint               offset,
                                         uint               max_count,
                                         AsyncReadyCallback callback) {
@@ -62,7 +62,7 @@ public class Rygel.FolderDirectorySearchResult :
                     var f = file.get_child (file_info.get_name ());
                     MediaObject item = null;
                     if (file_info.get_file_type () == FileType.DIRECTORY) {
-                        item = new Rygel.FolderContainer (
+                        item = new Rygel.MediaExportContainer (
                                                (MediaContainer) source_object,
                                                f);
 
diff --git a/src/plugins/folder/rygel-folder-plugin.vala b/src/plugins/media-export/rygel-media-export-plugin.vala
similarity index 85%
rename from src/plugins/folder/rygel-folder-plugin.vala
rename to src/plugins/media-export/rygel-media-export-plugin.vala
index 179d365..d9f6694 100644
--- a/src/plugins/folder/rygel-folder-plugin.vala
+++ b/src/plugins/media-export/rygel-media-export-plugin.vala
@@ -36,20 +36,20 @@ using GLib;
  */
 [ModuleInit]
 public void module_init (PluginLoader loader) {
-    Plugin plugin = new Plugin.MediaServer ("Folder", "@REALNAME@'s media");
+    var plugin = new Plugin.MediaServer ("MediaExport", "@REALNAME@'s media");
 
     var resource_info = new ResourceInfo (ContentDirectory.UPNP_ID,
                                           ContentDirectory.UPNP_TYPE,
                                           ContentDirectory.DESCRIPTION_PATH,
-                                          typeof (Rygel.FolderContentDir));
+                                          typeof (Rygel.MediaExportContentDir));
 
     plugin.add_resource (resource_info);
 
     loader.add_plugin (plugin);
 }
 
-public class Rygel.FolderContentDir : ContentDirectory {
+public class Rygel.MediaExportContentDir : ContentDirectory {
     public override MediaContainer? create_root_container () {
-        return new FolderRootContainer ();
+        return new MediaExportRootContainer ();
     }
 }
diff --git a/src/plugins/folder/rygel-folder-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
similarity index 88%
rename from src/plugins/folder/rygel-folder-root-container.vala
rename to src/plugins/media-export/rygel-media-export-root-container.vala
index 5a5f6fa..427fda9 100644
--- a/src/plugins/folder/rygel-folder-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -27,8 +27,8 @@ using GConf;
  * MediaContainer which exposes the contents of a directory 
  * as items
  */
-public class Rygel.FolderRootContainer : MediaContainer {
-    private ArrayList<FolderContainer> items;
+public class Rygel.MediaExportRootContainer : MediaContainer {
+    private ArrayList<MediaExportContainer> items;
 
     public override void get_children (uint offset, 
                                        uint max_count,
@@ -75,8 +75,8 @@ public class Rygel.FolderRootContainer : MediaContainer {
 
         if (item == null) {
             foreach (var tmp in items) {
-                if (tmp is FolderContainer) {
-                    var folder = (FolderContainer) tmp;
+                if (tmp is MediaExportContainer) {
+                    var folder = (MediaExportContainer) tmp;
                     item = folder.find_object_sync (id);
                     if (item != null) {
                         break;
@@ -91,13 +91,13 @@ public class Rygel.FolderRootContainer : MediaContainer {
     /**
      * Create a new root container.
      */
-    public FolderRootContainer () {
-        base.root ("FolderRoot", 0);
+    public MediaExportRootContainer () {
+        base.root ("MediaExportRoot", 0);
 
-        this.items = new ArrayList<FolderContainer> ();
+        this.items = new ArrayList<MediaExportContainer> ();
 
         var config = Rygel.Configuration.get_default ();
-        var dirs = config.get_string_list ("Folder", "folders");
+        var dirs = config.get_string_list ("MediaExport", "folders");
 
         // either an error occured or the gconf key is not set
         if (dirs.size == 0) {
@@ -117,7 +117,7 @@ public class Rygel.FolderRootContainer : MediaContainer {
         foreach (var dir in dirs) {
             var f = File.new_for_commandline_arg (dir);
             if (f.query_exists (null)) {
-                items.add (new FolderContainer (this, f));
+                items.add (new MediaExportContainer (this, f));
             }
         }
 



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