aboutsummaryrefslogtreecommitdiff
path: root/src/media-player-user.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-02-21 16:20:39 -0600
committerTed Gould <ted@gould.cx>2014-02-21 16:20:39 -0600
commitceab1b92d76d4cf28fecd0f1858a628ec85ff21e (patch)
tree918de972f2307d6cec2445d2a9a8b043ff309d39 /src/media-player-user.vala
parent946e20203b946ee9d11885ad759eec45bfee65a2 (diff)
downloadayatana-indicator-sound-ceab1b92d76d4cf28fecd0f1858a628ec85ff21e.tar.gz
ayatana-indicator-sound-ceab1b92d76d4cf28fecd0f1858a628ec85ff21e.tar.bz2
ayatana-indicator-sound-ceab1b92d76d4cf28fecd0f1858a628ec85ff21e.zip
Get the proxy values out
Diffstat (limited to 'src/media-player-user.vala')
-rw-r--r--src/media-player-user.vala41
1 files changed, 33 insertions, 8 deletions
diff --git a/src/media-player-user.vala b/src/media-player-user.vala
index bb00b07..ac73138 100644
--- a/src/media-player-user.vala
+++ b/src/media-player-user.vala
@@ -56,23 +56,38 @@ public abstract class MediaPlayerUser : MediaPlayer {
get { return username; }
}
+ string name_cache;
public override string name {
get {
- /* TODO */
- return "";
+ if (this.proxy != null) {
+ name_cache = this.proxy.player_name;
+ return name_cache;
+ } else {
+ return "";
+ }
}
}
+ string state_cache;
public override string state {
get {
- /* TODO */
- return "";
+ if (this.proxy != null) {
+ state_cache = this.proxy.state;
+ return state_cache;
+ } else {
+ return "";
+ }
}
set { }
}
+ Icon icon_cache;
public override Icon? icon {
get {
- /* TODO */
- return null;
+ if (this.proxy != null) {
+ icon_cache = Icon.deserialize(this.proxy.player_icon);
+ return icon_cache;
+ } else {
+ return null;
+ }
}
}
public override string dbus_name { get { return ""; } }
@@ -80,10 +95,20 @@ public abstract class MediaPlayerUser : MediaPlayer {
public override bool is_running { get { return true; } }
public override bool can_raise { get { return false; } }
+ MediaPlayer.Track track_cache;
public override MediaPlayer.Track? current_track {
get {
- /* TODO: */
- return null;
+ if (this.proxy != null) {
+ track_cache = new MediaPlayer.Track(
+ this.proxy.artist,
+ this.proxy.title,
+ this.proxy.album,
+ this.proxy.art_url
+ );
+ return track_cache;
+ } else {
+ return null;
+ }
}
set { }
}