8 #include <mpd/client.h> 13 #ifdef ENABLE_ASYNC_CONNECT 17 struct mpd_settings *settings;
26 struct mpd_settings *settings2;
41 #ifdef ENABLE_ASYNC_CONNECT 42 struct aconnect *async_connect;
54 const struct mpd_song *
song;
75 #if defined(ENABLE_ASYNC_CONNECT) && !defined(WIN32) 97 | MPD_IDLE_STORED_PLAYLIST
105 | MPD_IDLE_SUBSCRIPTION
115 mpdclient_finish_command(
struct mpdclient *c)
139 mpdclient_is_connected(
const struct mpdclient *c)
150 mpdclient_is_dead(
const struct mpdclient *c)
153 #ifdef ENABLE_ASYNC_CONNECT 154 && c->async_connect == NULL
161 mpdclient_is_playing(
const struct mpdclient *c)
163 return c->
status != NULL &&
164 (mpd_status_get_state(c->
status) == MPD_STATE_PLAY ||
165 mpd_status_get_state(c->
status) == MPD_STATE_PAUSE);
169 static inline const struct mpd_song *
170 mpdclient_get_current_song(
const struct mpdclient *c)
172 return c->
song != NULL && mpdclient_is_playing(c)
186 struct mpd_connection *
unsigned timeout_ms
Definition: mpdclient.h:34
const char * host
Definition: mpdclient.h:30
bool mpdclient_playlist_update(struct mpdclient *c)
enum mpd_idle events
Definition: mpdclient.h:73
struct mpdclient * mpdclient_new(const gchar *host, unsigned port, unsigned timeout_ms, const gchar *password)
bool mpdclient_send_read_messages(struct mpdclient *c)
bool idle
Definition: mpdclient.h:83
bool mpdclient_cmd_unsubscribe(struct mpdclient *c, const char *channel)
bool mpdclient_cmd_delete_range(struct mpdclient *c, unsigned start, unsigned end)
bool playing
Definition: mpdclient.h:88
unsigned enter_idle_source_id
Definition: mpdclient.h:60
Definition: filelist.h:35
void mpdclient_free(struct mpdclient *c)
bool mpdclient_cmd_add_path(struct mpdclient *c, const gchar *path)
bool mpdclient_cmd_volume(struct mpdclient *c, gint value)
const char * password
Definition: mpdclient.h:36
Definition: mpdclient.h:96
unsigned connection_id
Definition: mpdclient.h:66
bool mpdclient_cmd_delete(struct mpdclient *c, gint index)
Definition: mpdclient.h:12
struct mpd_status * status
Definition: mpdclient.h:53
struct mpdclient_playlist playlist
Definition: mpdclient.h:39
void mpdclient_disconnect(struct mpdclient *c)
void mpdclient_connect(struct mpdclient *c)
struct mpd_glib_source * source
Definition: mpdclient.h:51
bool mpdclient_handle_error(struct mpdclient *c)
char * mpdclient_settings_name(const struct mpdclient *c)
bool mpdclient_update(struct mpdclient *c)
unsigned port
Definition: mpdclient.h:31
bool mpdclient_filelist_add_all(struct mpdclient *c, struct filelist *fl)
struct mpd_message * mpdclient_recv_message(struct mpdclient *c)
bool mpdclient_cmd_crop(struct mpdclient *c)
bool mpdclient_playlist_update_changes(struct mpdclient *c)
bool mpdclient_cmd_volume_down(struct mpdclient *c)
const struct mpd_song * song
Definition: mpdclient.h:54
bool mpdclient_cmd_move(struct mpdclient *c, unsigned dest, unsigned src)
struct mpd_connection * mpdclient_get_connection(struct mpdclient *c)
int volume
Definition: mpdclient.h:68
bool mpdclient_cmd_send_message(struct mpdclient *c, const char *channel, const char *text)
bool mpdclient_cmd_subscribe(struct mpdclient *c, const char *channel)
#define gcc_pure
Definition: Compiler.h:100
struct mpd_connection * connection
Definition: mpdclient.h:45
bool mpdclient_cmd_add(struct mpdclient *c, const struct mpd_song *song)
bool mpdclient_cmd_volume_up(struct mpdclient *c)
bool mpdclient_cmd_clear(struct mpdclient *c)
Definition: playlist.h:30