diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-09-14 12:43:23 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-09-14 12:43:23 +0100 |
commit | edb20cb04d9f977c7ddf70f6edc707546e2997c0 (patch) | |
tree | f5ceac9ec5ebade2cfad6e4e3512319cefe2450f /src | |
parent | b68421bc7f4f36342463498b44e2a3fb4b11fe7e (diff) | |
download | ayatana-indicator-sound-edb20cb04d9f977c7ddf70f6edc707546e2997c0.tar.gz ayatana-indicator-sound-edb20cb04d9f977c7ddf70f6edc707546e2997c0.tar.bz2 ayatana-indicator-sound-edb20cb04d9f977c7ddf70f6edc707546e2997c0.zip |
all dbus method calls now async
Diffstat (limited to 'src')
-rw-r--r-- | src/mpris2-controller.vala | 14 |
1 files 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", |