2024-10-12 16:35:42 +00:00
|
|
|
[DBus (name = "org.mpris.MediaPlayer2")]
|
|
|
|
class Mpris : Object {
|
|
|
|
internal signal void on_raise ();
|
|
|
|
internal signal void on_quit ();
|
|
|
|
|
|
|
|
public bool can_raise { get { return true; } }
|
|
|
|
public void raise () throws Error {
|
|
|
|
this.on_raise ();
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool can_quit { get { return true; } }
|
|
|
|
public void quit () throws Error {
|
|
|
|
this.on_quit ();
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool can_set_fullscreen { get { return false; } }
|
|
|
|
public bool fullscreen { get { return false; } set { assert (false); } }
|
|
|
|
public bool has_track_list { get { return false; } }
|
2024-10-12 20:52:29 +00:00
|
|
|
public string identity { owned get { return "audrey"; } }
|
|
|
|
public string desktop_entry { owned get { return "eu.callcc.audrey"; } }
|
2024-10-12 16:35:42 +00:00
|
|
|
public string[] supported_uri_schemes { owned get { return {}; } }
|
|
|
|
public string[] supported_mime_types { owned get { return {}; } }
|
|
|
|
}
|
|
|
|
|
|
|
|
[DBus (name = "org.mpris.MediaPlayer2.Player")]
|
|
|
|
class MprisPlayer : Object {
|
|
|
|
internal signal void on_next ();
|
|
|
|
internal signal void on_previous ();
|
|
|
|
internal signal void on_pause ();
|
|
|
|
internal signal void on_play_pause ();
|
|
|
|
internal signal void on_stop ();
|
|
|
|
internal signal void on_play ();
|
|
|
|
internal signal void on_seek (int64 offset);
|
|
|
|
internal signal void on_set_position (string track_id, int64 position);
|
|
|
|
|
|
|
|
public void next () throws Error { this.on_next (); }
|
|
|
|
public void previous () throws Error { this.on_previous (); }
|
|
|
|
public void pause () throws Error { print("pause\n");this.on_pause (); }
|
|
|
|
public void play_pause () throws Error { this.on_play_pause (); }
|
|
|
|
public void stop () throws Error { this.on_stop (); }
|
|
|
|
public void play () throws Error { this.on_play (); }
|
|
|
|
public void seek (int64 offset) throws Error { this.on_seek (offset); }
|
|
|
|
public void set_position (string track_id, int64 position) throws Error { this.on_set_position (track_id, position); }
|
|
|
|
public void open_uri (string uri) throws Error { assert (false); }
|
|
|
|
|
|
|
|
public signal void seeked (int64 position);
|
|
|
|
|
|
|
|
public string playback_status { owned get; internal set; default = "Stopped"; }
|
|
|
|
public string loop_status { owned get; set; default = "None"; }
|
|
|
|
public double rate { get; set; default = 1.0; }
|
|
|
|
public bool shuffle { get; set; default = false; }
|
|
|
|
public HashTable<string, Variant> metadata_map { owned get; default = new HashTable<string,Variant>(null, null); }
|
|
|
|
public double volume { get; set; default = 1.0; }
|
|
|
|
[CCode (notify = false)]
|
|
|
|
public int64 position { get; default = 0; }
|
|
|
|
public double minimum_rate { get { return 1.0; } }
|
|
|
|
public double maximum_rate { get { return 1.0; } }
|
|
|
|
public bool can_go_next { get; default = false; }
|
|
|
|
public bool can_go_previous { get; default = false; }
|
|
|
|
public bool can_play { get; default = false; }
|
|
|
|
public bool can_pause { get; default = false; }
|
|
|
|
public bool can_seek { get; default = false; }
|
|
|
|
[CCode (notify = false)]
|
|
|
|
public bool can_control { get { return false; } }
|
|
|
|
}
|