From edb20cb04d9f977c7ddf70f6edc707546e2997c0 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 14 Sep 2010 12:43:23 +0100 Subject: all dbus method calls now async --- src/mpris2-controller.vala | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala index 696fd09..2f5bcde 100644 --- a/src/mpris2-controller.vala +++ b/src/mpris2-controller.vala @@ -40,11 +40,9 @@ public interface MprisPlayer : DBus.Object { public abstract int32 Position{owned get; set;} public abstract string PlaybackStatus{owned get; set;} // methods - public abstract void SetPosition(DBus.ObjectPath path, int64 pos) throws DBus.Error; - public abstract void PlayPause() throws DBus.Error; - public abstract void Pause() throws DBus.Error; - public abstract void Next() throws DBus.Error; - public abstract void Previous() throws DBus.Error; + public abstract async void PlayPause() throws DBus.Error; + public abstract async void Next() throws DBus.Error; + public abstract async void Previous() throws DBus.Error; // signals public signal void Seeked(int64 new_position); } @@ -176,7 +174,7 @@ public class Mpris2Controller : GLib.Object if(command == TransportMenuitem.action.PLAY_PAUSE){ debug("transport_event PLAY_PAUSE"); try{ - this.player.PlayPause(); + this.player.PlayPause.begin(); } catch(DBus.Error error){ warning("DBus Error calling the player objects PlayPause method %s", @@ -185,7 +183,7 @@ public class Mpris2Controller : GLib.Object } else if(command == TransportMenuitem.action.PREVIOUS){ try{ - this.player.Previous(); + this.player.Previous.begin(); } catch(DBus.Error error){ warning("DBus Error calling the player objects Previous method %s", @@ -194,7 +192,7 @@ public class Mpris2Controller : GLib.Object } else if(command == TransportMenuitem.action.NEXT){ try{ - this.player.Next(); + this.player.Next.begin(); } catch(DBus.Error error){ warning("DBus Error calling the player objects Next method %s", -- cgit v1.2.3