[ --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,
[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
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
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
$(TRACKER_PLUGIN) \
$(DVB_PLUGIN) \
$(MEDIATHEK_PLUGIN) \
- $(FOLDER_PLUGIN) \
+ $(MEDIA_EXPORT_PLUGIN) \
$(EXTERNAL_PLUGIN)
MAINTAINERCLEANFILES = Makefile.in
+++ /dev/null
-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
--- /dev/null
+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
*
* 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
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 + "," +
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);
// 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;
* @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 ());
using Rygel;
using GLib;
-public class Rygel.FolderDirectorySearchResult :
+public class Rygel.MediaExportDirectorySearchResult :
Rygel.SimpleAsyncResult<Gee.List<MediaObject>> {
private uint max_count;
private uint offset;
private const int MAX_CHILDREN = 10;
- public FolderDirectorySearchResult (MediaContainer parent,
+ public MediaExportDirectorySearchResult (MediaContainer parent,
uint offset,
uint max_count,
AsyncReadyCallback callback) {
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);
*/
[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 ();
}
}
* 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,
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;
/**
* 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) {
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));
}
}