rygel r523 - in trunk/src: plugins/dvb plugins/test plugins/tracker rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r523 - in trunk/src: plugins/dvb plugins/test plugins/tracker rygel
- Date: Wed, 28 Jan 2009 12:35:08 +0000 (UTC)
Author: zeeshanak
Date: Wed Jan 28 12:35:08 2009
New Revision: 523
URL: http://svn.gnome.org/viewvc/rygel?rev=523&view=rev
Log:
Move the "max_count == 0" check into ContentDirectory.
Modified:
trunk/src/plugins/dvb/rygel-dvb-channel-group.vala
trunk/src/plugins/dvb/rygel-dvb-root-container.vala
trunk/src/plugins/test/rygel-test-root-container.vala
trunk/src/plugins/tracker/rygel-tracker-root-container.vala
trunk/src/rygel/rygel-content-directory.vala
Modified: trunk/src/plugins/dvb/rygel-dvb-channel-group.vala
==============================================================================
--- trunk/src/plugins/dvb/rygel-dvb-channel-group.vala (original)
+++ trunk/src/plugins/dvb/rygel-dvb-channel-group.vala Wed Jan 28 12:35:08 2009
@@ -65,10 +65,6 @@
public override Gee.List<MediaObject>? get_children (uint offset,
uint max_count)
throws GLib.Error {
- if (max_count == 0) {
- max_count = this.child_count;
- }
-
uint stop = offset + max_count;
stop = stop.clamp (0, this.child_count);
Modified: trunk/src/plugins/dvb/rygel-dvb-root-container.vala
==============================================================================
--- trunk/src/plugins/dvb/rygel-dvb-root-container.vala (original)
+++ trunk/src/plugins/dvb/rygel-dvb-root-container.vala Wed Jan 28 12:35:08 2009
@@ -103,10 +103,6 @@
public override Gee.List<MediaObject>? get_children (uint offset,
uint max_count)
throws GLib.Error {
- if (max_count == 0) {
- max_count = this.child_count;
- }
-
uint stop = offset + max_count;
stop = stop.clamp (0, this.child_count);
Modified: trunk/src/plugins/test/rygel-test-root-container.vala
==============================================================================
--- trunk/src/plugins/test/rygel-test-root-container.vala (original)
+++ trunk/src/plugins/test/rygel-test-root-container.vala Wed Jan 28 12:35:08 2009
@@ -59,10 +59,6 @@
public override Gee.List<MediaObject>? get_children (uint offset,
uint max_count)
throws GLib.Error {
- if (max_count == 0) {
- max_count = this.child_count;
- }
-
uint stop = offset + max_count;
stop = stop.clamp (0, this.child_count);
Modified: trunk/src/plugins/tracker/rygel-tracker-root-container.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-root-container.vala (original)
+++ trunk/src/plugins/tracker/rygel-tracker-root-container.vala Wed Jan 28 12:35:08 2009
@@ -67,10 +67,6 @@
public override Gee.List<MediaObject>? get_children (uint offset,
uint max_count)
throws GLib.Error {
- if (max_count == 0) {
- max_count = this.child_count;
- }
-
uint stop = offset + max_count;
stop = stop.clamp (0, this.child_count);
Modified: trunk/src/rygel/rygel-content-directory.vala
==============================================================================
--- trunk/src/rygel/rygel-content-directory.vala (original)
+++ trunk/src/rygel/rygel-content-directory.vala Wed Jan 28 12:35:08 2009
@@ -362,6 +362,11 @@
var container = (MediaContainer) media_object;
child_count = container.child_count;
+ if (max_count == 0) {
+ // No max count requested, try to fetch all children
+ max_count = child_count;
+ }
+
var children = container.get_children (offset, max_count);
if (children == null) {
throw new ContentDirectoryError.NO_SUCH_OBJECT ("No such object");
@@ -384,6 +389,11 @@
out uint child_count)
throws GLib.Error {
child_count = this.root_container.child_count;
+ if (max_count == 0) {
+ // No max count requested, try to fetch all children
+ max_count = child_count;
+ }
+
var children = this.root_container.get_children (offset, max_count);
if (children == null) {
throw new ContentDirectoryError.NO_SUCH_OBJECT ("No such object");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]