rygel r135 - in trunk: . src/media-providers/tracker src/media-server
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r135 - in trunk: . src/media-providers/tracker src/media-server
- Date: Tue, 28 Oct 2008 21:01:12 +0000 (UTC)
Author: zeeshanak
Date: Tue Oct 28 21:01:12 2008
New Revision: 135
URL: http://svn.gnome.org/viewvc/rygel?rev=135&view=rev
Log:
Make MediaProvider an abstract class rather than interface.
We will have to do this at some point anyway to put common functionality into
this module but the real reason to do this right now is that support for
constuct-only props in interfaces was recenlty dropped in Vala (for good
reasons).
Modified:
trunk/ChangeLog
trunk/src/media-providers/tracker/gupnp-media-tracker.vala
trunk/src/media-server/gupnp-media-manager.vala
trunk/src/media-server/gupnp-media-provider.vala
Modified: trunk/src/media-providers/tracker/gupnp-media-tracker.vala
==============================================================================
--- trunk/src/media-providers/tracker/gupnp-media-tracker.vala (original)
+++ trunk/src/media-providers/tracker/gupnp-media-tracker.vala Tue Oct 28 21:01:12 2008
@@ -44,7 +44,7 @@
}
}
-public class GUPnP.MediaTracker : GLib.Object, MediaProvider {
+public class GUPnP.MediaTracker : MediaProvider {
/* class-wide constants */
public static const string TRACKER_SERVICE = "org.freedesktop.Tracker";
public static const string TRACKER_PATH = "/org/freedesktop/tracker";
@@ -69,12 +69,6 @@
private DIDLLiteWriter didl_writer;
private SearchCriteriaParser search_parser;
- /* Properties */
- public string# root_id { get; construct; }
- public string# root_parent_id { get; construct; }
- public string# title { get; private construct; }
- public GUPnP.Context context { get; construct; }
-
construct {
this.containers = new List<Tracker.Container> ();
this.containers.append
@@ -124,14 +118,14 @@
this.context = context;
}
- public string? browse (string container_id,
- string filter,
- uint starting_index,
- uint requested_count,
- string sort_criteria,
- out uint number_returned,
- out uint total_matches,
- out uint update_id) {
+ public override string? browse (string container_id,
+ string filter,
+ uint starting_index,
+ uint requested_count,
+ string sort_criteria,
+ out uint number_returned,
+ out uint total_matches,
+ out uint update_id) {
string didl;
/* Start DIDL-Lite fragment */
@@ -177,10 +171,10 @@
return didl;
}
- public string get_metadata (string object_id,
- string filter,
- string sort_criteria,
- out uint update_id) {
+ public override string get_metadata (string object_id,
+ string filter,
+ string sort_criteria,
+ out uint update_id) {
string didl;
bool found;
@@ -230,7 +224,7 @@
return didl;
}
- public uint get_root_children_count () {
+ public override uint get_root_children_count () {
return this.containers.length ();
}
Modified: trunk/src/media-server/gupnp-media-manager.vala
==============================================================================
--- trunk/src/media-server/gupnp-media-manager.vala (original)
+++ trunk/src/media-server/gupnp-media-manager.vala Tue Oct 28 21:01:12 2008
@@ -24,14 +24,10 @@
using CStuff;
-public class GUPnP.MediaManager : GLib.Object, MediaProvider {
+public class GUPnP.MediaManager : MediaProvider {
private DIDLLiteWriter didl_writer;
/* Properties */
- public string# root_id { get; construct; }
- public string# root_parent_id { get; construct; }
- public string# title { get; private construct; }
- public GUPnP.Context context { get; construct; }
public uint32 system_update_id { get; private set; }
/* HashTable of Media Providers
@@ -68,14 +64,14 @@
this.context = context;
}
- public string? browse (string container_id,
- string filter,
- uint starting_index,
- uint requested_count,
- string sort_criteria,
- out uint number_returned,
- out uint total_matches,
- out uint update_id) {
+ public override string? browse (string container_id,
+ string filter,
+ uint starting_index,
+ uint requested_count,
+ string sort_criteria,
+ out uint number_returned,
+ out uint total_matches,
+ out uint update_id) {
string didl;
string root_id = this.get_root_id_from_id (container_id);
@@ -107,10 +103,10 @@
return didl;
}
- public string get_metadata (string object_id,
- string filter,
- string sort_criteria,
- out uint update_id) {
+ public override string get_metadata (string object_id,
+ string filter,
+ string sort_criteria,
+ out uint update_id) {
string didl;
string root_id = this.get_root_id_from_id (object_id);
@@ -135,7 +131,7 @@
return didl;
}
- public uint get_root_children_count () {
+ public override uint get_root_children_count () {
return this.providers.size ();
}
Modified: trunk/src/media-server/gupnp-media-provider.vala
==============================================================================
--- trunk/src/media-server/gupnp-media-provider.vala (original)
+++ trunk/src/media-server/gupnp-media-provider.vala Tue Oct 28 21:01:12 2008
@@ -22,12 +22,12 @@
* version 2 of the License, or (at your option) any later version.
*/
-public interface GUPnP.MediaProvider : GLib.Object {
+public abstract class GUPnP.MediaProvider : GLib.Object {
/* Properties */
- public abstract string# root_id { get; construct; }
- public abstract string# root_parent_id { get; construct; }
- public abstract string# title { get; private construct; }
- public abstract GUPnP.Context context { get; construct; }
+ public string# root_id { get; construct; }
+ public string# root_parent_id { get; construct; }
+ public string# title { get; private construct; }
+ public GUPnP.Context context { get; construct; }
public abstract string? browse (string container_id,
string filter,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]