[gnome-boxes/wip/silence-some-build-warnings: 3/3] gnome-boxes-search-provider: DBus methods should throw exceptions



commit 5317a924a7f0ea02ed6e264b45dd1af40a621804
Author: Felipe Borges <felipeborges gnome org>
Date:   Sat Aug 11 19:31:20 2018 +0200

    gnome-boxes-search-provider: DBus methods should throw exceptions
    
    It silents build time warnings.

 src/gnome-boxes-search-provider.vala | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gnome-boxes-search-provider.vala b/src/gnome-boxes-search-provider.vala
index e7a5f1b3..86151665 100644
--- a/src/gnome-boxes-search-provider.vala
+++ b/src/gnome-boxes-search-provider.vala
@@ -76,16 +76,16 @@ yield foreach_filename_from_dir (dir, (filename) => {
         return results;
     }
 
-    public async string[] GetInitialResultSet (string[] terms) {
+    public async string[] GetInitialResultSet (string[] terms) throws GLib.Error {
         return yield search (terms);
     }
 
     public async string[] GetSubsearchResultSet (string[] previous_results,
-                                           string[] new_terms) {
+                                           string[] new_terms) throws GLib.Error {
         return yield search (new_terms);
     }
 
-    public async HashTable<string, Variant>[] get_metas (owned string[] ids) {
+    public async HashTable<string, Variant>[] get_metas (owned string[] ids) throws GLib.Error {
         var metas = new HashTable<string, Variant>[ids.length];
         app.hold ();
 
@@ -123,11 +123,11 @@ yield foreach_filename_from_dir (dir, (filename) => {
 
     /* We have to put this in a separate method because vala does not seem to honor "owned"
        in the dbus method handler. I.e. it doesn't copy the ids array. */
-    public async HashTable<string, Variant>[] GetResultMetas (string[] ids) {
+    public async HashTable<string, Variant>[] GetResultMetas (string[] ids) throws GLib.Error {
         return yield get_metas (ids);
     }
 
-    public void ActivateResult (string search_id, string[] terms, uint32 timestamp) {
+    public void ActivateResult (string search_id, string[] terms, uint32 timestamp) throws GLib.Error {
         app.hold ();
 
         debug ("ActivateResult (%s)", search_id);
@@ -152,7 +152,7 @@ public void ActivateResult (string search_id, string[] terms, uint32 timestamp)
         app.release ();
     }
 
-    public void LaunchSearch (string[] terms, uint32 timestamp) {
+    public void LaunchSearch (string[] terms, uint32 timestamp) throws GLib.Error {
         app.hold ();
 
         debug ("LaunchSearch (%s)", string.joinv (", ", terms));


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