rygel r147 - in trunk: . src/media-providers/tracker src/media-server
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r147 - in trunk: . src/media-providers/tracker src/media-server
- Date: Tue, 28 Oct 2008 21:01:31 +0000 (UTC)
Author: zeeshanak
Date: Tue Oct 28 21:01:30 2008
New Revision: 147
URL: http://svn.gnome.org/viewvc/rygel?rev=147&view=rev
Log:
Remove MediaProvider.get_root_children_count().
Remove MediaProvider.get_root_children_count() and allow each provider to
add metadata of it's root container to DIDL instead.
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:30 2008
@@ -200,10 +200,6 @@
update_id = uint32.MAX;
}
- public override uint get_root_children_count () {
- return this.containers.length ();
- }
-
/* Private methods */
private uint add_root_container_children (DIDLLiteWriter didl_writer) {
foreach (Tracker.Container container in this.containers)
@@ -211,7 +207,7 @@
container,
this.root_id);
- return this.get_root_children_count ();
+ return this.containers.length ();
}
private void add_container_from_db (DIDLLiteWriter didl_writer,
@@ -667,7 +663,7 @@
this.root_id,
this.root_parent_id,
this.title,
- this.get_root_children_count ());
+ this.containers.length ());
}
private Tracker.Container? get_item_parent (string uri) {
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:30 2008
@@ -75,6 +75,8 @@
if (root_id == this.root_id) {
this.add_root_children (didl_writer,
+ filter,
+ sort_criteria,
out number_returned,
out total_matches,
out update_id);
@@ -128,12 +130,10 @@
}
}
- public override uint get_root_children_count () {
- return this.providers.size ();
- }
-
/* Private methods */
private void add_root_children (DIDLLiteWriter didl_writer,
+ string filter,
+ string sort_criteria,
out uint number_returned,
out uint total_matches,
out uint update_id) {
@@ -146,14 +146,14 @@
MediaProvider provider = this.providers.lookup (key);
- add_container (didl_writer,
- (string) key,
- this.root_id,
- provider.title,
- provider.get_root_children_count ());
+ provider.add_metadata (didl_writer,
+ provider.root_id,
+ filter,
+ sort_criteria,
+ out update_id);
}
- number_returned = total_matches = this.get_root_children_count ();
+ number_returned = total_matches = this.providers.size ();
update_id = this.system_update_id;
}
@@ -164,7 +164,7 @@
this.root_id,
"-1", /* FIXME */
this.title,
- this.get_root_children_count ());
+ this.providers.size ());
update_id = this.system_update_id;
}
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:30 2008
@@ -51,7 +51,5 @@
string filter,
string sort_criteria,
out uint update_id) throws Error;
-
- public abstract uint get_root_children_count ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]