diff options
| author | Conor Curran <conor.curran@canonical.com> | 2010-09-14 19:18:28 +0100 |
|---|---|---|
| committer | Conor Curran <conor.curran@canonical.com> | 2010-09-14 19:18:28 +0100 |
| commit | a817479e8353f8f84dc4f95bb980f2d1b4ba1380 (patch) | |
| tree | ff8c1c03db6d2dbc98417a16dcca51916610e4a7 /src/mpris2-controller.vala | |
| parent | 0568dd3b8c0510269699d4f9f256b878137008d3 (diff) | |
| parent | bab2f6616d4ad90243d3551513ad9e90c0df692e (diff) | |
| download | ayatana-indicator-sound-a817479e8353f8f84dc4f95bb980f2d1b4ba1380.tar.gz ayatana-indicator-sound-a817479e8353f8f84dc4f95bb980f2d1b4ba1380.tar.bz2 ayatana-indicator-sound-a817479e8353f8f84dc4f95bb980f2d1b4ba1380.zip | |
service crash fix branch merge
Diffstat (limited to 'src/mpris2-controller.vala')
| -rw-r--r-- | src/mpris2-controller.vala | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala index bab20ae..2f5bcde 100644 --- a/src/mpris2-controller.vala +++ b/src/mpris2-controller.vala @@ -28,8 +28,8 @@ public interface MprisRoot : DBus.Object { public abstract string Identity{owned get; set;} public abstract string DesktopEntry{owned get; set;} // methods - public abstract void Quit() throws DBus.Error; - public abstract void Raise() throws DBus.Error; + public abstract async void Quit() throws DBus.Error; + public abstract async void Raise() throws DBus.Error; } [DBus (name = "org.mpris.MediaPlayer2.Player")] @@ -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", @@ -215,12 +213,12 @@ public class Mpris2Controller : GLib.Object } return true; } - + public void expose() { if(this.connected() == true){ try{ - this.mpris2_root.Raise(); + this.mpris2_root.Raise.begin(); } catch(DBus.Error e){ error("Exception thrown while calling function Raise - %s", e.message); |
