aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-08-17 17:43:34 +0100
committerConor Curran <conor.curran@canonical.com>2010-08-17 17:43:34 +0100
commitf18466945a43718111ec93a79f1936157b02ce3f (patch)
treeec71788e99e1c1c404aa61f1d3fff0052790311e /src/mpris2-controller.vala
parent7aa4517861e27a0857d36e83844d670446c22ee6 (diff)
downloadayatana-indicator-sound-f18466945a43718111ec93a79f1936157b02ce3f.tar.gz
ayatana-indicator-sound-f18466945a43718111ec93a79f1936157b02ce3f.tar.bz2
ayatana-indicator-sound-f18466945a43718111ec93a79f1936157b02ce3f.zip
we have mpris 2 basic stuff working with rb perfectly
Diffstat (limited to 'src/mpris2-controller.vala')
-rw-r--r--src/mpris2-controller.vala13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index c5ca0a5..8b937b7 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -34,23 +34,24 @@ public interface MprisRoot : DBus.Object {
[DBus (name = "org.mpris.MediaPlayer2.Player")]
public interface MprisPlayer : DBus.Object {
-
+
+ // properties
public abstract HashTable<string, Value?> Metadata{owned get; set;}
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;
-
+ // signals
public signal void Seeked(int64 new_position);
- //public signal void PropertiesChanged(string source, HashTable<string, Value?> changed_properties, string[] invalid);
}
[DBus (name = "org.freedesktop.DBus.Properties")]
public interface FreeDesktopProperties : DBus.Object{
+ // signals
public signal void PropertiesChanged(string source, HashTable<string, Value?> changed_properties, string[] invalid);
}
@@ -96,7 +97,7 @@ public class Mpris2Controller : GLib.Object
{
debug("properties-changed for interface %s", interface_source);
if(changed_properties == null || interface_source.has_prefix(this.root_interface) == false){
- warning("Property-changed hash is null");
+ warning("Property-changed hash is null or this is an interface that concerns us");
return;
}
Value? play_v = changed_properties.lookup("PlaybackStatus");
@@ -160,8 +161,6 @@ public class Mpris2Controller : GLib.Object
MetadataMenuitem.attributes_format());
this.owner.custom_items[PlayerController.widget_order.SCRUB].update(this.player.Metadata,
ScrubMenuitem.attributes_format());
- ScrubMenuitem scrub = this.owner.custom_items[PlayerController.widget_order.SCRUB] as ScrubMenuitem;
- scrub.update_position(this.player.Position);
}
public void transport_event(TransportMenuitem.action command)