[rygel] core,plugins: MediaServerPlugin now an abstract class
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core,plugins: MediaServerPlugin now an abstract class
- Date: Thu, 23 Dec 2010 15:25:01 +0000 (UTC)
commit 66c87412d9bfc74726848c95a254ec8016ab075a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 22 17:08:27 2010 +0200
core,plugins: MediaServerPlugin now an abstract class
Instances of this class aren't of any use since default implementation of
its virtual method 'get_root_container' simply returns a null. So since
plugins have to create subclasses of this anyways, marking it and method
'get_root_container' as abstract.
src/plugins/external/rygel-external-plugin.vala | 2 +-
.../gst-launch/rygel-gst-launch-plugin.vala | 2 +-
.../media-export/rygel-media-export-plugin.vala | 2 +-
src/plugins/mediathek/rygel-mediathek-plugin.vala | 2 +-
src/plugins/test/rygel-test-plugin.vala | 2 +-
src/plugins/tracker/rygel-tracker-plugin.vala | 2 +-
src/rygel/rygel-media-server-plugin.vala | 6 ++----
7 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/external/rygel-external-plugin.vala b/src/plugins/external/rygel-external-plugin.vala
index 2a4ae1b..1d782cf 100644
--- a/src/plugins/external/rygel-external-plugin.vala
+++ b/src/plugins/external/rygel-external-plugin.vala
@@ -51,7 +51,7 @@ public class Rygel.External.Plugin : Rygel.MediaServerPlugin {
}
}
- public override MediaContainer? get_root_container (GUPnP.Context context) {
+ public override MediaContainer get_root_container (GUPnP.Context context) {
Container root_container = null;
try {
diff --git a/src/plugins/gst-launch/rygel-gst-launch-plugin.vala b/src/plugins/gst-launch/rygel-gst-launch-plugin.vala
index 5c531b1..967ffc8 100644
--- a/src/plugins/gst-launch/rygel-gst-launch-plugin.vala
+++ b/src/plugins/gst-launch/rygel-gst-launch-plugin.vala
@@ -34,7 +34,7 @@ public class Rygel.GstLaunch.Plugin : Rygel.MediaServerPlugin {
base ("GstLaunch", "Gst Launch");
}
- public override MediaContainer? get_root_container (GUPnP.Context context) {
+ public override MediaContainer get_root_container (GUPnP.Context context) {
return new RootContainer (this.title);
}
}
diff --git a/src/plugins/media-export/rygel-media-export-plugin.vala b/src/plugins/media-export/rygel-media-export-plugin.vala
index de3087a..f52ada4 100644
--- a/src/plugins/media-export/rygel-media-export-plugin.vala
+++ b/src/plugins/media-export/rygel-media-export-plugin.vala
@@ -78,7 +78,7 @@ public class Rygel.MediaExport.Plugin : Rygel.MediaServerPlugin {
base (OUR_PLUGIN, _("@REALNAME@'s media"));
}
- public override MediaContainer? get_root_container (GUPnP.Context context) {
+ public override MediaContainer get_root_container (GUPnP.Context context) {
try {
return RootContainer.get_instance ();
} catch (Error error) {
diff --git a/src/plugins/mediathek/rygel-mediathek-plugin.vala b/src/plugins/mediathek/rygel-mediathek-plugin.vala
index db78eee..3b500b4 100644
--- a/src/plugins/mediathek/rygel-mediathek-plugin.vala
+++ b/src/plugins/mediathek/rygel-mediathek-plugin.vala
@@ -34,7 +34,7 @@ public class Rygel.Mediathek.Plugin : Rygel.MediaServerPlugin {
base ("ZDFMediathek", "ZDF Mediathek");
}
- public override MediaContainer? get_root_container (GUPnP.Context context) {
+ public override MediaContainer get_root_container (GUPnP.Context context) {
return RootContainer.get_instance ();
}
}
diff --git a/src/plugins/test/rygel-test-plugin.vala b/src/plugins/test/rygel-test-plugin.vala
index a55fea4..fe49074 100644
--- a/src/plugins/test/rygel-test-plugin.vala
+++ b/src/plugins/test/rygel-test-plugin.vala
@@ -36,7 +36,7 @@ public class Rygel.Test.Plugin : Rygel.MediaServerPlugin {
base ("Test", "Test Streams");
}
- public override MediaContainer? get_root_container (GUPnP.Context context) {
+ public override MediaContainer get_root_container (GUPnP.Context context) {
return new RootContainer (this.title);
}
}
diff --git a/src/plugins/tracker/rygel-tracker-plugin.vala b/src/plugins/tracker/rygel-tracker-plugin.vala
index 2755393..a2346c1 100644
--- a/src/plugins/tracker/rygel-tracker-plugin.vala
+++ b/src/plugins/tracker/rygel-tracker-plugin.vala
@@ -32,7 +32,7 @@ public class Rygel.Tracker.Plugin : Rygel.MediaServerPlugin {
_("@REALNAME@'s media"));
}
- public override MediaContainer? get_root_container (GUPnP.Context context) {
+ public override MediaContainer get_root_container (GUPnP.Context context) {
if (root_container == null) {
root_container = new RootContainer (this.title);
}
diff --git a/src/rygel/rygel-media-server-plugin.vala b/src/rygel/rygel-media-server-plugin.vala
index 09fb8d4..8c26063 100644
--- a/src/rygel/rygel-media-server-plugin.vala
+++ b/src/rygel/rygel-media-server-plugin.vala
@@ -21,7 +21,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-public class Rygel.MediaServerPlugin : Rygel.Plugin {
+public abstract class Rygel.MediaServerPlugin : Rygel.Plugin {
private static const string MEDIA_SERVER_DESC_PATH =
BuildConfig.DATA_DIR + "/xml/MediaServer2.xml";
@@ -51,8 +51,6 @@ public class Rygel.MediaServerPlugin : Rygel.Plugin {
this.add_resource (info);
}
- public virtual MediaContainer? get_root_container (GUPnP.Context context) {
- return null;
- }
+ public abstract MediaContainer get_root_container (GUPnP.Context context);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]