|
libmpd 11.8.17
|
#include "libmpdclient.h"#include "libmpd-version.h"#include "libmpd-player.h"#include "libmpd-status.h"#include "libmpd-database.h"#include "libmpd-playlist.h"#include "libmpd-strfsong.h"#include "libmpd-sticker.h"Go to the source code of this file.
Data Structures | |
| struct | _MpdData |
Macros | |
| #define | __MPD_LIB__ |
| #define | TRUE 1 |
| #define | FALSE 0 |
Typedefs | |
| typedef struct _MpdObj | MpdObj |
| typedef struct _MpdData | MpdData |
| typedef void(*) | StatusChangedCallback(MpdObj *mi, ChangedStatusType what, void *userdata) |
| typedef int(*) | ErrorCallback(MpdObj *mi, int id, char *msg, void *userdata) |
| typedef void(*) | ConnectionChangedCallback(MpdObj *mi, int connect, void *userdata) |
Variables | |
| char * | libmpd_version |
| typedef void(*) ConnectionChangedCallback(MpdObj *mi, int connect, void *userdata) |
| typedef int(*) ErrorCallback(MpdObj *mi, int id, char *msg, void *userdata) |
| mi | a MpdObj |
| id | The error Code. |
| msg | human-readable informative error message. |
| userdata | user data set when the signal handler was connected. This signal is called when an error has occurred in the communication with mpd. |
return: TRUE if libmpd should disconnect.
| typedef struct _MpdObj MpdObj |
The Main Mpd Object. Don't access any of the internal values directly, but use the provided functions.
| typedef void(*) StatusChangedCallback(MpdObj *mi, ChangedStatusType what, void *userdata) |
| mi | a MpdObj |
| what | a ChangedStatusType that determines what changed triggered the signal. This is a bitmask. |
| userdata | user data set when the signal handler was connected. |
Signal that gets called when the state of mpd has changed. Look ChangedStatusType to see the possible events.
| enum ChangedStatusType |
Bitwise enumeration to determine what triggered the status_changed signals This is used in combination with the StatusChangedCallback
| enum MpdError |
Enum that represent the errors libmpd functions can return
| enum MpdServerCommand |
| int mpd_check_connected | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Checks if MpdObj is connected
References mpd_check_connected().
Referenced by mpd_check_connected().
| int mpd_check_error | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Checks if there was an error
References mpd_check_error().
Referenced by mpd_check_error().
| int mpd_connect | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Connect to the mpd daemon. Warning: mpd_connect connects anonymous, to authenticate use mpd_send_password
References mpd_connect().
Referenced by mpd_connect().
| int mpd_connect_real | ( | MpdObj * | mi, |
| mpd_Connection * | connection ) |
References mpd_connect_real().
Referenced by mpd_connect_real().
| data | a MpdData item |
removes the passed MpdData from the underlying list, and returns the element before data
References mpd_data_delete_item().
Referenced by mpd_data_delete_item().
| void mpd_data_free | ( | MpdData * | data | ) |
| data | a MpdData |
Free's a MpdData List
References mpd_data_free().
Referenced by mpd_data_free().
| data | a MpdData |
Returns the first MpdData in the list.
References mpd_data_get_first().
Referenced by mpd_data_get_first().
| data | a MpdData |
Returns the next MpdData in the list. If it's the last item in the list, it will free the list.
You can iterate through a list like this and have it freed afterwards.
References mpd_data_get_next().
Referenced by mpd_data_get_next().
| int mpd_data_is_last | ( | MpdData const * | data | ) |
| data | a MpdData |
Checks if the passed MpdData is the last in a list
References mpd_data_is_last().
Referenced by mpd_data_is_last().
| int mpd_disconnect | ( | MpdObj * | mi | ) |
| mi | The MpdObj to disconnect |
Disconnect the current connection
References mpd_disconnect().
Referenced by mpd_disconnect().
| void mpd_free | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Free the MpdObj, when still connected the connection will be disconnected first
References mpd_free().
Referenced by mpd_free().
| const char * mpd_get_hostname | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
gets the set hostname
References mpd_get_hostname().
Referenced by mpd_get_hostname().
| int mpd_misc_get_tag_by_name | ( | char * | name | ) |
| name | a NULL terminated string |
gets the Matching MpdDataType matching at the string
References mpd_misc_get_tag_by_name().
Referenced by mpd_misc_get_tag_by_name().
| MpdObj * mpd_new | ( | char * | hostname, |
| int | port, | ||
| char * | password ) |
| hostname | The hostname to connect to |
| port | The port to connect to |
| password | The password to use for the connection, or NULL for no password |
Create a new MpdObj with provided settings:
References mpd_new().
Referenced by mpd_new().
| MpdObj * mpd_new_default | ( | ) |
mpd_new_default
Create a new MpdObj with default settings. Hostname will be set to "localhost". Port will be 6600.
same as calling:
References mpd_new_default().
Referenced by mpd_new_default().
| int mpd_send_password | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Forces libmpd to re-authenticate itself.
When successful it will trigger the "permission" changed signal.
References mpd_send_password().
Referenced by mpd_send_password().
| int mpd_server_check_command_allowed | ( | MpdObj * | mi, |
| const char * | command ) |
| mi | a MpdObj |
| command | the command to check |
Checks if the user is allowed to execute the command and if the server supports it
References mpd_server_check_command_allowed().
Referenced by mpd_server_check_command_allowed().
| int mpd_server_check_version | ( | MpdObj * | mi, |
| int | major, | ||
| int | minor, | ||
| int | micro ) |
| mi | a MpdObj |
| major | the major version number |
| minor | the minor version number |
| micro | the micro version number |
Checks if the connected mpd server version is equal or higher.
References mpd_server_check_version().
Referenced by mpd_server_check_version().
| long unsigned mpd_server_get_database_update_time | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Gets a unix timestamp of the last time the database was updated.
References mpd_server_get_database_update_time().
Referenced by mpd_server_get_database_update_time().
| mi | a MpdObj |
Returns a list of audio output devices stored in a MpdData list
References mpd_server_get_output_devices().
Referenced by mpd_server_get_output_devices().
| MpdServerReplaygainMode mpd_server_get_replaygain_mode | ( | MpdObj * | mi | ) |
References mpd_server_get_replaygain_mode().
Referenced by mpd_server_get_replaygain_mode().
| char ** mpd_server_get_tag_types | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
References mpd_server_get_tag_types().
Referenced by mpd_server_get_tag_types().
| char ** mpd_server_get_url_handlers | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
References mpd_server_get_url_handlers().
Referenced by mpd_server_get_url_handlers().
| char * mpd_server_get_version | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
References mpd_server_get_version().
Referenced by mpd_server_get_version().
| int mpd_server_has_idle | ( | MpdObj * | mi | ) |
| mi | a MpdObj |
Reports if the connected mpd supports the idle command.
References mpd_server_has_idle().
Referenced by mpd_server_has_idle().
| int mpd_server_set_output_device | ( | MpdObj * | mi, |
| int | device_id, | ||
| int | state ) |
| mi | a MpdObj |
| device_id | The id of the output device |
| state | The state to change the output device to, 1 is enable, 0 is disable. |
Enable or Disable an audio output device
References mpd_server_set_output_device().
Referenced by mpd_server_set_output_device().
| int mpd_server_set_replaygain_mode | ( | MpdObj * | mi, |
| MpdServerReplaygainMode | mode ) |
References mpd_server_set_replaygain_mode().
Referenced by mpd_server_set_replaygain_mode().
| int mpd_server_tag_supported | ( | MpdObj * | mi, |
| int | tag ) |
| mi | a MpdObj |
| tag | a mpd_TagItems |
Returns if mpd supports this tag.
return 1 if support 0 if not
References mpd_server_tag_supported().
Referenced by mpd_server_tag_supported().
| int mpd_set_connection_timeout | ( | MpdObj * | mi, |
| float | timeout ) |
| mi | a MpdObj |
| timeout | A timeout (in seconds) |
Set the timeout of the connection. If already connected the timeout of the running connection
References mpd_set_connection_timeout().
Referenced by mpd_set_connection_timeout().
| int mpd_set_hostname | ( | MpdObj * | mi, |
| char * | hostname ) |
| mi | a MpdObj |
| hostname | The new hostname to use |
set the hostname
References mpd_set_hostname().
Referenced by mpd_set_hostname().
| int mpd_set_password | ( | MpdObj * | mi, |
| const char * | password ) |
| mi | a MpdObj |
| password | The new password to use |
Set the password
References mpd_set_password().
Referenced by mpd_set_password().
| int mpd_set_port | ( | MpdObj * | mi, |
| int | port ) |
| mi | a MpdObj |
| port | The port to use. (Default: 6600) |
Set the Port number
References mpd_set_port().
Referenced by mpd_set_port().
| void mpd_signal_connect_connection_changed | ( | MpdObj * | mi, |
| ConnectionChangedCallback | connection_changed, | ||
| void * | userdata ) |
| mi | a MpdObj |
| connection_changed | a ConnectionChangedCallback |
| userdata | user data passed to the callback |
References mpd_signal_connect_connection_changed().
Referenced by mpd_signal_connect_connection_changed().
| void mpd_signal_connect_error | ( | MpdObj * | mi, |
| ErrorCallback | error, | ||
| void * | userdata ) |
| mi | a MpdObj |
| error | a ErrorCallback |
| userdata | user data passed to the callback |
References mpd_signal_connect_error().
Referenced by mpd_signal_connect_error().
| void mpd_signal_connect_status_changed | ( | MpdObj * | mi, |
| StatusChangedCallback | status_changed, | ||
| void * | userdata ) |
| mi | a MpdObj |
| status_changed | a StatusChangedCallback |
| userdata | user data passed to the callback |
References mpd_signal_connect_status_changed().
Referenced by mpd_signal_connect_status_changed().
|
extern |