diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-12-13 17:46:42 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-12-13 17:46:42 +0000 |
commit | 2a35f9b78b75cd95090142b891c401a46eec9bf3 (patch) | |
tree | 9817caf23baf835dbbfa48ccb5689b24522fc1af /src/mpris2-watcher.vala | |
parent | f800967fcabf6a9d7e6223ff8d6591f042496588 (diff) | |
download | ayatana-indicator-sound-2a35f9b78b75cd95090142b891c401a46eec9bf3.tar.gz ayatana-indicator-sound-2a35f9b78b75cd95090142b891c401a46eec9bf3.tar.bz2 ayatana-indicator-sound-2a35f9b78b75cd95090142b891c401a46eec9bf3.zip |
started along the road of removing the familiar db backend and replacing with the g-settings entry approach
Diffstat (limited to 'src/mpris2-watcher.vala')
-rw-r--r-- | src/mpris2-watcher.vala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mpris2-watcher.vala b/src/mpris2-watcher.vala index d154fcb..7814975 100644 --- a/src/mpris2-watcher.vala +++ b/src/mpris2-watcher.vala @@ -20,22 +20,22 @@ with this program. If not, see <http://www.gnu.org/licenses/>. [DBus (name = "org.freedesktop.DBus")] public interface FreeDesktopObject: Object { public abstract async string[] list_names() throws IOError; - public abstract signal void name_owner_changed (string name, - string old_owner, - string new_owner); + public abstract signal void name_owner_changed ( string name, + string old_owner, + string new_owner ); } public class Mpris2Watcher : GLib.Object { private const string FREEDESKTOP_SERVICE = "org.freedesktop.DBus"; private const string FREEDESKTOP_OBJECT = "/org/freedesktop/DBus"; - private const string MPRIS_PREFIX = "org.mpris.MediaPlayer2."; + public const string MPRIS_PREFIX = "org.mpris.MediaPlayer2."; private const string MPRIS_MEDIA_PLAYER_PATH = "/org/mpris/MediaPlayer2"; FreeDesktopObject fdesktop_obj; - public signal void client_appeared ( string desktop_name ); - public signal void client_disappeared ( string mpris_root_interface ); + public signal void client_appeared ( string desktop_file_name, string dbus_name ); + public signal void client_disappeared ( string dbus_name ); public Mpris2Watcher () { @@ -72,7 +72,7 @@ public class Mpris2Watcher : GLib.Object } else if (previous_owner == "" && current_owner != "") { debug ("Client '%s' has appeared", name); - client_appeared (mpris2_root.DesktopEntry); + client_appeared (mpris2_root.DesktopEntry, name); } } @@ -109,7 +109,7 @@ public class Mpris2Watcher : GLib.Object if (address.has_prefix (MPRIS_PREFIX)){ MprisRoot? mpris2_root = this.create_mpris_root(address); if (mpris2_root == null) return; - client_appeared (mpris2_root.DesktopEntry); + client_appeared (mpris2_root.DesktopEntry, address); } } } |