Logo Search packages:      
Sourcecode: libmpdclient version File versions  Download package

mpd_connection Struct Reference

#include <internal.h>

List of all members.


Detailed Description

This opaque object represents a connection to a MPD server. Call mpd_connection_new() to create a new instance.

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_clear_error(), like MPD_ERROR_SERVER, MPD_ERROR_ARGUMENT. Most others are fatal, and cannot be recovered, like MPD_ERROR_CLOSED - mpd_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 42 of file internal.h.


Public Types

enum  { PAIR_STATE_NONE, PAIR_STATE_NULL, PAIR_STATE_QUEUED, PAIR_STATE_FLOATING }

Public Attributes

struct mpd_asyncasync
int command_list_remaining
bool discrete_finished
struct mpd_error_info error
struct mpd_pair pair
enum mpd_connection:: { ... }  pair_state
struct mpd_parser * parser
bool receiving
char * request
bool sending_command_list
bool sending_command_list_ok
struct timeval timeout
unsigned version [3]

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

Generated by  Doxygen 1.6.0   Back to index