[rygel] all: Fix warings rergarding DBus errors



commit 4025ad299af13d21e20abc4defef077816bb7570
Author: Jens Georg <mail jensge org>
Date:   Tue Sep 4 21:48:04 2018 +0200

    all: Fix warings rergarding DBus errors
    
    Newer vala wants us to throw IOError and DBusError

 src/librygel-core/rygel-dbus-interface.vala         |  2 +-
 src/plugins/external/rygel-external-interfaces.vala | 12 ++++++++----
 src/plugins/mpris/rygel-mpris-interfaces.vala       | 12 ++++++------
 src/plugins/tracker/rygel-tracker-interfaces.vala   | 13 ++++++++-----
 src/rygel/rygel-dbus-service.vala                   |  2 +-
 5 files changed, 24 insertions(+), 17 deletions(-)
---
diff --git a/src/librygel-core/rygel-dbus-interface.vala b/src/librygel-core/rygel-dbus-interface.vala
index 20026b9f..7a6a2478 100644
--- a/src/librygel-core/rygel-dbus-interface.vala
+++ b/src/librygel-core/rygel-dbus-interface.vala
@@ -26,7 +26,7 @@ public interface Rygel.DBusInterface : Object {
     public const string SERVICE_NAME = "org.gnome.Rygel1";
     public const string OBJECT_PATH = "/org/gnome/Rygel1";
 
-    public abstract void shutdown () throws IOError;
+    public abstract void shutdown () throws IOError, DBusError;
 }
 
 [DBus (name = "org.gnome.Rygel1.AclProvider1")]
diff --git a/src/plugins/external/rygel-external-interfaces.vala 
b/src/plugins/external/rygel-external-interfaces.vala
index 873a084b..ab37d592 100644
--- a/src/plugins/external/rygel-external-interfaces.vala
+++ b/src/plugins/external/rygel-external-interfaces.vala
@@ -51,22 +51,26 @@ public interface Rygel.External.MediaContainerProxy : DBusProxy,
     public abstract async HashTable<string,Variant>[] list_children
                                         (uint     offset,
                                          uint     max_count,
-                                         string[] filter) throws DBusError;
+                                         string[] filter)
+                                         throws IOError, DBusError;
     public abstract async HashTable<string,Variant>[] list_containers
                                         (uint     offset,
                                          uint     max_count,
-                                         string[] filter) throws DBusError;
+                                         string[] filter)
+                                         throws IOError, DBusError;
     public abstract async HashTable<string,Variant>[] list_items
                                         (uint     offset,
                                          uint     max_count,
-                                         string[] filter) throws DBusError;
+                                         string[] filter)
+                                         throws IOError, DBusError;
 
     // Optional API
     public abstract async HashTable<string,Variant>[] search_objects
                                         (string   query,
                                         uint     offset,
                                         uint     max_count,
-                                        string[] filter) throws DBusError;
+                                        string[] filter)
+                                        throws IOError, DBusError;
 
     public abstract ObjectPath icon { owned get; set; }
 }
diff --git a/src/plugins/mpris/rygel-mpris-interfaces.vala b/src/plugins/mpris/rygel-mpris-interfaces.vala
index 1a17125e..ee019746 100644
--- a/src/plugins/mpris/rygel-mpris-interfaces.vala
+++ b/src/plugins/mpris/rygel-mpris-interfaces.vala
@@ -46,10 +46,10 @@ public interface Rygel.MPRIS.MediaPlayer.PlayerProxy : DBusProxy,
     public abstract bool can_control { get; }
     public abstract HashTable<string,Variant> metadata { owned get; }
 
-    public abstract void pause () throws DBusError;
-    public abstract void play_pause () throws DBusError;
-    public abstract void stop () throws DBusError;
-    public abstract void play () throws DBusError;
-    public abstract void seek (int64 offset) throws DBusError;
-    public abstract void open_uri (string uri) throws DBusError;
+    public abstract void pause () throws IOError, DBusError;
+    public abstract void play_pause () throws IOError, DBusError;
+    public abstract void stop () throws IOError, DBusError;
+    public abstract void play () throws IOError, DBusError;
+    public abstract void seek (int64 offset) throws IOError, DBusError;
+    public abstract void open_uri (string uri) throws IOError, DBusError;
 }
diff --git a/src/plugins/tracker/rygel-tracker-interfaces.vala 
b/src/plugins/tracker/rygel-tracker-interfaces.vala
index 8344fa90..e4b21a0b 100644
--- a/src/plugins/tracker/rygel-tracker-interfaces.vala
+++ b/src/plugins/tracker/rygel-tracker-interfaces.vala
@@ -30,19 +30,22 @@ public struct Event {
 
 [DBus (name = "org.freedesktop.Tracker1.Statistics")]
 public interface Rygel.Tracker.StatsIface : DBusProxy {
-    public abstract string[,] get () throws DBusError;
+    public abstract string[,] get () throws IOError, DBusError;
 }
 
 [DBus (name = "org.freedesktop.Tracker1.Resources")]
 public interface Rygel.Tracker.ResourcesIface: DBusProxy {
     public abstract async string[,] sparql_query (string query)
-                                                  throws DBusError;
-    public abstract async void sparql_update (string query) throws DBusError;
+                                                  throws IOError, DBusError;
+    public abstract async void sparql_update (string query)
+                                              throws IOError, DBusError;
     public abstract async HashTable<string,string>[,] sparql_update_blank
-                                        (string query) throws DBusError;
+                                        (string query)
+                                         throws IOError, DBusError;
 }
 
 [DBus (name = "org.freedesktop.Tracker1.Miner.Files.Index")]
 public interface Rygel.Tracker.MinerFilesIndexIface: DBusProxy {
-    public abstract async void index_file (string uri) throws DBusError;
+    public abstract async void index_file (string uri)
+                                           throws IOError, DBusError;
 }
diff --git a/src/rygel/rygel-dbus-service.vala b/src/rygel/rygel-dbus-service.vala
index 45d9b10e..e3d55891 100644
--- a/src/rygel/rygel-dbus-service.vala
+++ b/src/rygel/rygel-dbus-service.vala
@@ -31,7 +31,7 @@ internal class Rygel.DBusService : Object, DBusInterface {
         this.main = main;
     }
 
-    public void shutdown () throws IOError {
+    public void shutdown () throws IOError, DBusError {
         this.main.exit (0);
     }
 


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