rygel r126 - in trunk: . src
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r126 - in trunk: . src
- Date: Tue, 28 Oct 2008 21:00:58 +0000 (UTC)
Author: zeeshanak
Date: Tue Oct 28 21:00:57 2008
New Revision: 126
URL: http://svn.gnome.org/viewvc/rygel?rev=126&view=rev
Log:
Add get_root_children_count() to MediaProvider interface.
Modified:
trunk/ChangeLog
trunk/src/gupnp-media-manager.vala
trunk/src/gupnp-media-provider.vala
trunk/src/gupnp-media-tracker.vala
Modified: trunk/src/gupnp-media-manager.vala
==============================================================================
--- trunk/src/gupnp-media-manager.vala (original)
+++ trunk/src/gupnp-media-manager.vala Tue Oct 28 21:00:57 2008
@@ -128,6 +128,10 @@
return didl;
}
+ public uint get_root_children_count () {
+ return this.providers.size ();
+ }
+
/* Private methods */
private string browse_root_container (out uint number_returned,
out uint total_matches,
@@ -141,10 +145,10 @@
add_container ((string) key,
this.root_id,
provider.title,
- -1); /* FIXME */
+ provider.get_root_children_count ());
});
- number_returned = total_matches = this.providers.size ();
+ number_returned = total_matches = this.get_root_children_count ();
/* End DIDL-Lite fragment */
this.didl_writer.end_didl_lite ();
@@ -167,7 +171,7 @@
add_container (this.root_id,
"-1", /* FIXME */
this.title,
- this.providers.size ());
+ this.get_root_children_count ());
/* End DIDL-Lite fragment */
this.didl_writer.end_didl_lite ();
Modified: trunk/src/gupnp-media-provider.vala
==============================================================================
--- trunk/src/gupnp-media-provider.vala (original)
+++ trunk/src/gupnp-media-provider.vala Tue Oct 28 21:00:57 2008
@@ -42,5 +42,7 @@
string filter,
string sort_criteria,
out uint update_id);
+
+ public abstract uint get_root_children_count ();
}
Modified: trunk/src/gupnp-media-tracker.vala
==============================================================================
--- trunk/src/gupnp-media-tracker.vala (original)
+++ trunk/src/gupnp-media-tracker.vala Tue Oct 28 21:00:57 2008
@@ -230,12 +230,16 @@
return didl;
}
+ public uint get_root_children_count () {
+ return this.containers.length ();
+ }
+
/* Private methods */
private uint add_root_container_children () {
foreach (Tracker.Container container in this.containers)
this.add_container_from_db (container, this.root_id);
- return this.containers.length ();
+ return this.get_root_children_count ();
}
private void add_container_from_db (Tracker.Container container,
@@ -676,7 +680,7 @@
add_container (this.root_id,
this.root_parent_id,
this.title,
- this.containers.length ());
+ this.get_root_children_count ());
}
private Tracker.Container? get_item_parent (string uri) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]