public class MediaContainer : MediaObject {
public uint child_count = 10;
- public async MediaObjects? get_children (uint offset,
- uint max_count,
- Cancellable? cancellable)
- throws Error {
+ public async MediaObjects? get_children (
+ uint offset,
+ uint max_count,
+ string sort_criteria,
+ Cancellable? cancellable)
+ throws Error {
Idle.add ( () => { get_children.callback (); return false; });
yield;
uint total_matches;
// check corners
- var result = yield search (null, 0, 0, out total_matches, null);
+ var result = yield search (null, 0, 0, out total_matches, "", null);
assert (total_matches == 10);
assert (result.size == 10);
- result = yield search (null, 10, 0, out total_matches, null);
+ result = yield search (null, 10, 0, out total_matches, "", null);
assert (total_matches == 10);
assert (result.size == 0);
for (int i = 1; i < 10; ++i) {
- result = yield search (null, i, 0, out total_matches, null);
+ result = yield search (null, i, 0, out total_matches, "", null);
assert (total_matches == 10);
assert (result.size == 10 - i);
}
uint total_matches;
// check corners
- var result = yield search (null, 0, 4, out total_matches, null);
+ var result = yield search (null, 0, 4, out total_matches, "", null);
assert (total_matches == 0);
assert (result.size == 4);
- result = yield search (null, 10, 4, out total_matches, null);
+ result = yield search (null, 10, 4, out total_matches, "", null);
assert (total_matches == 0);
assert (result.size == 0);
for (int i = 1; i < 10; ++i) {
- result = yield search (null, i, 3, out total_matches, null);
+ result = yield search (null, i, 3, out total_matches, "", null);
assert (total_matches == 0);
assert (result.size == int.min (10 - i, 3));
}
uint offset,
uint max_count,
out uint total_matches,
+ string sort_criteria,
Cancellable? cancellable)
throws Error {
return yield this.simple_search (expression,
offset,
max_count,
out total_matches,
+ sort_criteria,
cancellable);
}