libmpdclient 2.22
|
MPD client library. More...
Go to the source code of this file.
Enumerations | |
enum | mpd_entity_type { MPD_ENTITY_TYPE_UNKNOWN , MPD_ENTITY_TYPE_DIRECTORY , MPD_ENTITY_TYPE_SONG , MPD_ENTITY_TYPE_PLAYLIST } |
Functions | |
void | mpd_entity_free (struct mpd_entity *entity) |
enum mpd_entity_type | mpd_entity_get_type (const struct mpd_entity *entity) |
const struct mpd_directory * | mpd_entity_get_directory (const struct mpd_entity *entity) |
const struct mpd_song * | mpd_entity_get_song (const struct mpd_entity *entity) |
const struct mpd_playlist * | mpd_entity_get_playlist (const struct mpd_entity *entity) |
struct mpd_entity * | mpd_entity_begin (const struct mpd_pair *pair) |
bool | mpd_entity_feed (struct mpd_entity *entity, const struct mpd_pair *pair) |
struct mpd_entity * | mpd_recv_entity (struct mpd_connection *connection) |
MPD client library.
Do not include this header directly. Use mpd/client.h instead.
Definition in file entity.h.
enum mpd_entity_type |
The type of a mpd_entity object.
Enumerator | |
---|---|
MPD_ENTITY_TYPE_UNKNOWN | The type of the entity received from MPD is not implemented in this version of libmpdclient. |
MPD_ENTITY_TYPE_DIRECTORY | A directory (mpd_directory) containing more entities. |
MPD_ENTITY_TYPE_SONG | A song file (mpd_song) which can be added to the playlist. |
MPD_ENTITY_TYPE_PLAYLIST | A stored playlist (mpd_playlist). |
void mpd_entity_free | ( | struct mpd_entity * | entity | ) |
Releases an entity. This also frees the wrapped object.
enum mpd_entity_type mpd_entity_get_type | ( | const struct mpd_entity * | entity | ) |
const struct mpd_directory * mpd_entity_get_directory | ( | const struct mpd_entity * | entity | ) |
Obtains a pointer to the mpd_directory object enclosed by this mpd_entity. Calling this function is only allowed if mpd_entity_get_type() has returned MPD_ENTITY_TYPE_DIRECTORY.
const struct mpd_song * mpd_entity_get_song | ( | const struct mpd_entity * | entity | ) |
Obtains a pointer to the mpd_song object enclosed by this mpd_entity. Calling this function is only allowed if mpd_entity_get_type() has returned MPD_ENTITY_TYPE_SONG.
const struct mpd_playlist * mpd_entity_get_playlist | ( | const struct mpd_entity * | entity | ) |
Obtains a pointer to the mpd_playlist object enclosed by this mpd_entity. Calling this function is only allowed if mpd_entity_get_type() has returned MPD_ENTITY_TYPE_PLAYLIST.
struct mpd_entity * mpd_entity_begin | ( | const struct mpd_pair * | pair | ) |
Begins parsing a new entity.
pair | the first pair in this entity |
bool mpd_entity_feed | ( | struct mpd_entity * | entity, |
const struct mpd_pair * | pair | ||
) |
Parses the pair, adding its information to the specified mpd_entity object.
struct mpd_entity * mpd_recv_entity | ( | struct mpd_connection * | connection | ) |
Receives the next entity from the MPD server.