Updating branch refs/heads/master to 43bea1d2dccfc9c124f2bda144d5ae33b1943e4b (commit) from 7e0dbc4b630506ee65e0428d4a64e0f67e6aa55b (commit)
commit 43bea1d2dccfc9c124f2bda144d5ae33b1943e4b Author: Landry Breuil <lan...@xfce.org> Date: Fri May 14 18:22:27 2010 +0200 Add skeleton for getting/setting outputs in simple-libmpd adds mpd_server_get_output_devices(), mpd_server_set_output_device(), mpd_Output struct and amend MpdData struct to also hold it. panel-plugin/simple-libmpd.c | 8 ++++++++ panel-plugin/simple-libmpd.h | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c index d62e8ac..232591e 100644 --- a/panel-plugin/simple-libmpd.c +++ b/panel-plugin/simple-libmpd.c @@ -501,6 +501,14 @@ MpdData* mpd_data_get_next(MpdData* md) return md; } +MpdData* mpd_server_get_output_devices(MpdObj* mo) +{ +} + +int mpd_server_set_output_device (MpdObj* mo, int id, int state) +{ +} + void mpd_status_set_volume(MpdObj* mo, int newvol) { char outbuf[15]; diff --git a/panel-plugin/simple-libmpd.h b/panel-plugin/simple-libmpd.h index f314bac..1bc7752 100644 --- a/panel-plugin/simple-libmpd.h +++ b/panel-plugin/simple-libmpd.h @@ -51,6 +51,12 @@ typedef struct { } mpd_Song; typedef struct { + int id; + char* name; + int enabled; +} mpd_Output; + +typedef struct { gchar* host; int port; gchar* pass; @@ -68,12 +74,23 @@ typedef struct { int buflen; } MpdObj; +typedef enum { + MPD_DATA_TYPE_SONG, + MPD_DATA_TYPE_OUTPUT_DEV +} MpdDataType; + /* here, i must cheat, too hard to follow libmpd's behaviour */ typedef struct { + /* holds type = song or output */ + MpdDataType type; /* ptr to current song */ mpd_Song* song; /* vector of all songs in playlist */ mpd_Song* allsongs; + /* ptr to current output */ + mpd_Output* output_dev; + /* vector of all outputs */ + mpd_Output* alloutputs; int nb; int cur; } MpdData; @@ -96,6 +113,8 @@ int mpd_player_get_current_song_pos(MpdObj*); MpdData* mpd_playlist_get_changes(MpdObj*, int); MpdData* mpd_data_get_next(MpdData*); mpd_Song* mpd_playlist_get_current_song(MpdObj*); +MpdData* mpd_server_get_output_devices(MpdObj*); +int mpd_server_set_output_device (MpdObj*, int, int); int mpd_playlist_get_playlist_length(MpdObj*); int mpd_check_error(MpdObj*); void mpd_set_hostname(MpdObj*, char*); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits