libmpdclient 2.24
stringnormalization.h File Reference
#include "recv.h"
#include "compiler.h"
#include <stdbool.h>

Go to the source code of this file.

Enumerations

enum  mpd_stringnormalization_option { MPD_STRINGNORMALIZATION_UNKNOWN = -1 , MPD_STRINGNORMALIZATION_STRIP_DIACRITICS , MPD_STRINGNORMALIZATION_COUNT }

Functions

const char * mpd_stringnormalization_name (enum mpd_stringnormalization_option option)
enum mpd_stringnormalization_option mpd_stringnormalization_name_parse (const char *name)
bool mpd_send_list_stringnormalization (struct mpd_connection *connection)
bool mpd_send_list_stringnormalization_available (struct mpd_connection *connection)
static struct mpd_pairmpd_recv_stringnormalization_pair (struct mpd_connection *connection)
bool mpd_send_disable_stringnormalization (struct mpd_connection *connection, const enum mpd_stringnormalization_option *options, unsigned n)
bool mpd_run_disable_stringnormalization (struct mpd_connection *connection, const enum mpd_stringnormalization_option *options, unsigned n)
bool mpd_send_enable_stringnormalization (struct mpd_connection *connection, const enum mpd_stringnormalization_option *options, unsigned n)
bool mpd_run_enable_stringnormalization (struct mpd_connection *connection, const enum mpd_stringnormalization_option *options, unsigned n)
bool mpd_send_clear_stringnormalization (struct mpd_connection *connection)
bool mpd_run_clear_stringnormalization (struct mpd_connection *connection)
bool mpd_send_all_stringnormalization (struct mpd_connection *connection)
bool mpd_run_all_stringnormalization (struct mpd_connection *connection)

Enumeration Type Documentation

◆ mpd_stringnormalization_option

Since
libmpdclient 2.24
Enumerator
MPD_STRINGNORMALIZATION_UNKNOWN 

Special value returned by mpd_stringnormalization_parse() when an unknown name was passed.

MPD_STRINGNORMALIZATION_STRIP_DIACRITICS 
MPD_STRINGNORMALIZATION_COUNT 

Definition at line 15 of file stringnormalization.h.

Function Documentation

◆ mpd_stringnormalization_name()

const char * mpd_stringnormalization_name ( enum mpd_stringnormalization_option option)

Looks up the name of the specified stringnormalization option.

Returns
the name, or NULL if the tag type is not valid

◆ mpd_stringnormalization_name_parse()

enum mpd_stringnormalization_option mpd_stringnormalization_name_parse ( const char * name)

Parses a stringnormalization option name, and returns its mpd_protocol_feature value.

Returns
a mpd_protocol_feature value, or MPD_FEATURE_UNKNOWN if the name was not recognized

◆ mpd_send_list_stringnormalization()

bool mpd_send_list_stringnormalization ( struct mpd_connection * connection)

Requests a list of enabled stringnormalization options. Use mpd_recv_stringnormalization_pair() to obtain the list of "option" pairs.

Parameters
connectionthe connection to MPD
Returns
true on success, false on error
Since
libmpdclient 2.24, MPD 0.25

◆ mpd_send_list_stringnormalization_available()

bool mpd_send_list_stringnormalization_available ( struct mpd_connection * connection)

Requests a list of available protocol features. Use mpd_recv_stringnormalization_pair() to obtain the list of "stringnormalization option" pairs.

Parameters
connectionthe connection to MPD
Returns
true on success, false on error
Since
libmpdclient 2.24, MPD 0.25

◆ mpd_recv_stringnormalization_pair()

struct mpd_pair * mpd_recv_stringnormalization_pair ( struct mpd_connection * connection)
inlinestatic

Receives the next stringnormalization option. Call this in a loop after mpd_send_list_stringnormalization().

Free the return value with mpd_return_pair().

Parameters
connectiona mpd_connection
Returns
a "stringnormalization option" pair, or NULL on error or if the end of the response is reached
Since
libmpdclient 2.24, MPD 0.25

Definition at line 92 of file stringnormalization.h.

◆ mpd_send_disable_stringnormalization()

bool mpd_send_disable_stringnormalization ( struct mpd_connection * connection,
const enum mpd_stringnormalization_option * options,
unsigned n )

Disables one or more stringnormalization option from the list of stringnormalization options.

Parameters
connectionthe connection to MPD
optionsan array of stringnormalization options to disable
nthe number of protocol features in the array
Returns
true on success, false on error
Since
libmpdclient 2.24, MPD 0.25

◆ mpd_run_disable_stringnormalization()

bool mpd_run_disable_stringnormalization ( struct mpd_connection * connection,
const enum mpd_stringnormalization_option * options,
unsigned n )

Shortcut for mpd_send_disable_stringnormalization() and mpd_response_finish().

Since
libmpdclient 2.24, MPD 0.25

◆ mpd_send_enable_stringnormalization()

bool mpd_send_enable_stringnormalization ( struct mpd_connection * connection,
const enum mpd_stringnormalization_option * options,
unsigned n )

Re-enable one or more stringnormalization options from the list of stringnormalization options for this client.

Parameters
connectionthe connection to MPD
optionsan array of stringnormalization options to enable
nthe number of protocol features in the array
Returns
true on success, false on error
Since
libmpdclient 2.24, MPD 0.25

◆ mpd_run_enable_stringnormalization()

bool mpd_run_enable_stringnormalization ( struct mpd_connection * connection,
const enum mpd_stringnormalization_option * options,
unsigned n )

Shortcut for mpd_send_enable_stringnormalization() and mpd_response_finish().

Since
libmpdclient 2.24, MPD 0.25

◆ mpd_send_clear_stringnormalization()

bool mpd_send_clear_stringnormalization ( struct mpd_connection * connection)

Clear the list of enabled stringnormalization options for this client.

Parameters
connectionthe connection to MPD
Returns
true on success, false on error
Since
libmpdclient 2.24, MPD 0.25

◆ mpd_run_clear_stringnormalization()

bool mpd_run_clear_stringnormalization ( struct mpd_connection * connection)

Shortcut for mpd_send_clear_stringnormalization() and mpd_response_finish().

Since
libmpdclient 2.24, MPD 0.25

◆ mpd_send_all_stringnormalization()

bool mpd_send_all_stringnormalization ( struct mpd_connection * connection)

Enable all available stringnormalization options for this client.

Parameters
connectionthe connection to MPD
Returns
true on success, false on error
Since
libmpdclient 2.24, MPD 0.25

◆ mpd_run_all_stringnormalization()

bool mpd_run_all_stringnormalization ( struct mpd_connection * connection)

Shortcut for mpd_send_all_stringnormalization() and mpd_response_finish().

Since
libmpdclient 2.24, MPD 0.25