libmpdclient
2.10.git
|
MPD client library. More...
Go to the source code of this file.
MPD client library.
Do not include this header directly. Use mpd/client.h instead.
Definition in file idle.h.
enum mpd_idle |
This enum contains bit masks for all idle events.
mpd_const const char* mpd_idle_name | ( | enum mpd_idle | idle | ) |
Returns the name of the specified idle event.
idle | an idle event id |
mpd_pure enum mpd_idle mpd_idle_name_parse | ( | const char * | name | ) |
Parses the name of an idle event.
name | an idle event name |
bool mpd_send_idle | ( | struct mpd_connection * | connection | ) |
Enters "idle" mode: MPD will stall the response until an event has occurred. Call mpd_send_noidle() to abort the idle mode, or mpd_recv_idle() to read the event mask (or synchronously wait for events).
bool mpd_send_idle_mask | ( | struct mpd_connection * | connection, |
enum mpd_idle | mask | ||
) |
Same as mpd_send_idle(), but listen only on specific events.
connection | the connection to MPD |
mask | a bit mask of idle events; must not be 0 |
bool mpd_send_noidle | ( | struct mpd_connection * | connection | ) |
Tells MPD to leave the "idle" mode. MPD will then respond with a list of events which have occurred (which may be empty). Call mpd_recv_idle() after that.
mpd_pure enum mpd_idle mpd_idle_parse_pair | ( | const struct mpd_pair * | pair | ) |
Parses a "changed" pair, which is part of MPD's response to the "idle" command.
enum mpd_idle mpd_recv_idle | ( | struct mpd_connection * | connection, |
bool | disable_timeout | ||
) |
Waits until MPD sends the list of idle events and returns it in a bit mask.
connection | the connection to MPD |
disable_timeout | if true, then libmpdclients temporarily disables the configured timeout (see mpd_connection_set_timeout()): this function blocks forever, until either MPD sends a response, or an error occurs. |
enum mpd_idle mpd_run_idle | ( | struct mpd_connection * | connection | ) |
Shortcut for mpd_send_idle() and mpd_recv_idle(). During mpd_recv_idle(), the configured timeout is disabled.
connection | the connection to MPD |
enum mpd_idle mpd_run_idle_mask | ( | struct mpd_connection * | connection, |
enum mpd_idle | mask | ||
) |
Shortcut for mpd_send_idle_mask() and mpd_recv_idle(). During mpd_recv_idle(), the configured timeout is disabled.
connection | the connection to MPD |
mask | a bit mask of idle events; must not be 0 |
enum mpd_idle mpd_run_noidle | ( | struct mpd_connection * | connection | ) |
Shortcut for mpd_send_noidle() and mpd_recv_idle(). During mpd_recv_idle(), the configured timeout is not disabled.
connection | the connection to MPD |