[PATCH 15/15] vala: update binding and example for the caps and options changes



From: Guillaume Emont <guijemont igalia com>

---
 bindings/vala/grilo-uninstalled.files.in |    2 ++
 tools/vala/grilo-test.vala               |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/bindings/vala/grilo-uninstalled.files.in b/bindings/vala/grilo-uninstalled.files.in
index 2f1ddad..9215fe9 100644
--- a/bindings/vala/grilo-uninstalled.files.in
+++ b/bindings/vala/grilo-uninstalled.files.in
@@ -4,6 +4,8 @@
 @top_builddir@/src/grl-media-plugin.h
 @top_builddir@/src/grl-media-source.h
 @top_builddir@/src/grl-metadata-key.h
+@top_builddir@/src/grl-caps.h
+@top_builddir@/src/grl-operation-options.h
 @top_builddir@/src/grl-metadata-source.h
 @top_builddir@/src/grl-multiple.h
 @top_builddir@/src/grl-plugin-registry.h
diff --git a/tools/vala/grilo-test.vala b/tools/vala/grilo-test.vala
index 26cdb6a..38040f0 100644
--- a/tools/vala/grilo-test.vala
+++ b/tools/vala/grilo-test.vala
@@ -67,7 +67,11 @@ public class SimplePlaylist : Object {
 
 		foreach (MediaSource source in source_list) {
 			debug ("%s - %s", source.get_name (), q);
-			source.search (q, keys, 0, 100, Grl.MetadataResolutionFlags.FULL | Grl.MetadataResolutionFlags.IDLE_RELAY, search_cb);
+			var caps = source.get_caps (Grl.SupportedOps.SEARCH);
+			var options = new Grl.OperationOptions (caps);
+			options.set_count (100);
+			options.set_flags (Grl.MetadataResolutionFlags.FULL | Grl.MetadataResolutionFlags.IDLE_RELAY);
+			source.search (q, keys, options, search_cb);
 		}
 	}
 
-- 
1.7.5.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]