* src/gupnp-media-provider.vala:
* src/gupnp-media-tracker.vala:
- Add "title" prop to MediaProvider interface.
+ - Add "title" prop to MediaProvider interface.
+ - Add get_root_children_count() to MediaProvider interface.
2008-08-03 Zeeshan Ali Khattak <zeenix@gmail.com>
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,
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 ();
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 ();
string filter,
string sort_criteria,
out uint update_id);
+
+ public abstract uint get_root_children_count ();
}
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,
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) {