libmpdclient  2.13
mpd_connection Struct Reference

#include <connection.h>

Detailed Description

This opaque object represents a connection to a MPD server. Call mpd_connection_new() to create a new instance. To free an instance, call mpd_connection_free().

Error handling: most functions return a "bool" indicating success or failure. In this case, you may query the nature of the error with the functions mpd_connection_get_error(), mpd_connection_get_error_message(), mpd_connection_get_server_error().

Some errors can be cleared by calling mpd_connection_clear_error(), like MPD_ERROR_SERVER, MPD_ERROR_ARGUMENT. Most others are fatal, and cannot be recovered, like MPD_ERROR_CLOSED - mpd_connection_clear_error() returns false.

Some functions like mpd_recv_pair() cannot differentiate between "end of response" and "error". If this function returns NULL, you have to check mpd_connection_get_error().

Definition at line 48 of file connection.h.

The documentation for this struct was generated from the following file: