Detailed Description
These functions allow the client to control the player part of mpd. To use the read functions you need "read" permission on mpd. To use the control functions you need "control" and "read" permission on mpd.
Enumeration Type Documentation
Enum representing the possible states of the player
- Enumerator:
MPD_PLAYER_PAUSE |
The player is paused
|
MPD_PLAYER_PLAY |
The player is playing
|
MPD_PLAYER_STOP |
The player is stopped
|
MPD_PLAYER_UNKNOWN |
The player is in an unknown state
|
Definition at line 34 of file libmpd-player.h.
Function Documentation
- Parameters:
-
Get the state of consume mode: 1 if enabled, 0 when disabled.
- Returns:
- the state of consume
- Parameters:
-
Returns the id of the currently playing song
- Returns:
- the songid of the playing song
- Parameters:
-
Returns the position of the currently playing song in the playlist
- Returns:
- the position of the playing song
- Parameters:
-
Get the state of random: 1 if enabled, 0 when disabled.
- Returns:
- the state of random
- Examples:
- testcase.c.
- Parameters:
-
Get the state of repeat: 1 if enabled, 0 when disabled.
- Returns:
- the state of repeat
- Examples:
- testcase.c.
- Parameters:
-
Get the state of single mode: 1 if enabled, 0 when disabled.
- Returns:
- the state of single
- Parameters:
-
Returns the mpd play state (play/paused/stop)
- Returns:
- a MpdState
- Examples:
- testcase.c.
- Parameters:
-
Sends mpd the next command.
- Returns:
- a #MpdError
- Examples:
- testcase.c.
- Parameters:
-
Sends mpd the pause command.
- Returns:
- a #MpdError
- Examples:
- testcase.c.
- Parameters:
-
Sends mpd the play command.
This equals:
- Returns:
- a #MpdError
- Examples:
- testcase.c.
- Parameters:
-
Plays the song with id
- Returns:
- a #MpdError
- Examples:
- testcase.c.
- Parameters:
-
Sends mpd the prev command.
- Returns:
- a #MpdError
- Examples:
- testcase.c.
- Parameters:
-
mi | a #MpdObj |
sec | Position to seek to. (in seconds) |
Seek through the current song.
- Returns:
- a #MpdError
- Parameters:
-
mi | a #MpdObj |
consume | the state of consume mode |
Enable/disable consume mode. (consume = 1 is enabled, consume = 0 disabled)
- Parameters:
-
mi | a #MpdObj |
random | New state of random (1 is enabled, 0 is disabled) |
Enable/disable random
- Returns:
- 0 when successful
- Examples:
- testcase.c.
- Parameters:
-
mi | a #MpdObj |
repeat | New state of repeat (1 is enabled, 0 is disabled) |
Enable/disabled repeat
- Returns:
- 0 when successful
- Examples:
- testcase.c.
- Parameters:
-
mi | a #MpdObj |
single | the state of single mode |
Enable/disable single mode. (single = 1 is enabled, single = 0 disabled)
- Returns:
- a #MpdError
- Parameters:
-
Sends mpd the stop command.
- Returns:
- a #MpdError
- Examples:
- testcase.c.