MPD client library.
More...
#include "compiler.h"
#include <stdbool.h>
Go to the source code of this file.
|
enum | mpd_idle {
MPD_IDLE_DATABASE = 0x1
, MPD_IDLE_STORED_PLAYLIST = 0x2
, MPD_IDLE_QUEUE = 0x4
, MPD_IDLE_PLAYLIST = MPD_IDLE_QUEUE
,
MPD_IDLE_PLAYER = 0x8
, MPD_IDLE_MIXER = 0x10
, MPD_IDLE_OUTPUT = 0x20
, MPD_IDLE_OPTIONS = 0x40
,
MPD_IDLE_UPDATE = 0x80
, MPD_IDLE_STICKER = 0x100
, MPD_IDLE_SUBSCRIPTION = 0x200
, MPD_IDLE_MESSAGE = 0x400
,
MPD_IDLE_PARTITION = 0x800
, MPD_IDLE_NEIGHBOR = 0x1000
, MPD_IDLE_MOUNT = 0x2000
} |
|
MPD client library.
Do not include this header directly. Use mpd/client.h instead.
Definition in file idle.h.
◆ mpd_idle
This enum contains bit masks for all idle events.
- Since
- libmpdclient 2.5 added support for MPD_IDLE_STICKER, MPD_IDLE_SUBSCRIPTION and MPD_IDLE_MESSAGE.
-
libmpdclient 2.17 added support for MPD_IDLE_PARTITION.
-
libmpdclient 2.19 added support for MPD_IDLE_NEIGHBOR, MPD_IDLE_MOUNT
Enumerator |
---|
MPD_IDLE_DATABASE | song database has been updated
|
MPD_IDLE_STORED_PLAYLIST | a stored playlist has been modified, created, deleted or renamed
|
MPD_IDLE_QUEUE | the queue has been modified
|
MPD_IDLE_PLAYLIST | deprecated, don't use
|
MPD_IDLE_PLAYER | the player state has changed: play, stop, pause, seek, ...
|
MPD_IDLE_MIXER | the volume has been modified
|
MPD_IDLE_OUTPUT | an audio output device has been enabled or disabled
|
MPD_IDLE_OPTIONS | options have changed: crossfade, random, repeat, ...
|
MPD_IDLE_UPDATE | a database update has started or finished.
|
MPD_IDLE_STICKER | a sticker has been modified.
|
MPD_IDLE_SUBSCRIPTION | a client has subscribed to or unsubscribed from a channel
|
MPD_IDLE_MESSAGE | a message on a subscribed channel was received
|
MPD_IDLE_PARTITION | a partition was added or changed
|
MPD_IDLE_NEIGHBOR | a neighbor was found or lost
|
MPD_IDLE_MOUNT | the mount list has changed
|
Definition at line 29 of file idle.h.
◆ mpd_idle_name()
const char * mpd_idle_name |
( |
enum mpd_idle |
idle | ) |
|
Returns the name of the specified idle event.
- Parameters
-
- Returns
- the name, or NULL if that event is not known
◆ mpd_idle_name_parse()
enum mpd_idle mpd_idle_name_parse |
( |
const char * |
name | ) |
|
Parses the name of an idle event.
- Parameters
-
- Returns
- the id, or 0 if that event is not known
◆ mpd_send_idle()
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).
- Parameters
-
connection | the connection to MPD |
- Returns
- true on success
◆ mpd_send_idle_mask()
Same as mpd_send_idle(), but listen only on specific events.
- Parameters
-
connection | the connection to MPD |
mask | a bit mask of idle events; must not be 0 |
- Returns
- true on success
◆ mpd_send_noidle()
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.
- Parameters
-
connection | the connection to MPD |
- Returns
- true on success
◆ mpd_idle_parse_pair()
Parses a "changed" pair, which is part of MPD's response to the "idle" command.
- Parameters
-
- Returns
- an idle code, or 0 if the pair was not understood
◆ mpd_recv_idle()
Waits until MPD sends the list of idle events and returns it in a bit mask.
- Parameters
-
connection | the connection to MPD |
disable_timeout | if true, then libmpdclient temporarily disables the configured timeout (see mpd_connection_set_timeout()): this function blocks forever, until either MPD sends a response, or an error occurs. |
- Returns
- the event bit mask, or 0 on error or if there were no events
◆ mpd_run_idle()
◆ mpd_run_idle_mask()
◆ mpd_run_noidle()