libmpdclient 2.22
|
MPD client library. More...
#include "compiler.h"
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
Enumerations | |
enum | mpd_fingerprint_type { MPD_FINGERPRINT_TYPE_UNKNOWN , MPD_FINGERPRINT_TYPE_CHROMAPRINT } |
Functions | |
enum mpd_fingerprint_type | mpd_parse_fingerprint_type (const char *name) |
bool | mpd_send_getfingerprint (struct mpd_connection *connection, const char *uri) |
const char * | mpd_run_getfingerprint_chromaprint (struct mpd_connection *connection, const char *uri, char *buffer, size_t buffer_size) |
MPD client library.
Do not include this header directly. Use mpd/client.h instead.
Definition in file fingerprint.h.
enum mpd_fingerprint_type |
Enumerator | |
---|---|
MPD_FINGERPRINT_TYPE_UNKNOWN | |
MPD_FINGERPRINT_TYPE_CHROMAPRINT |
Definition at line 21 of file fingerprint.h.
enum mpd_fingerprint_type mpd_parse_fingerprint_type | ( | const char * | name | ) |
Parse a mpd_pair name to check which fingerprint type it contains.
bool mpd_send_getfingerprint | ( | struct mpd_connection * | connection, |
const char * | uri | ||
) |
Sends the "getfingerprint" command to MPD. Call mpd_recv_pair() to read response lines. Use mpd_parse_fingerprint_type() to check each pair's name; the pair's value then contains the actual fingerprint.
connection | a valid and connected mpd_connection |
uri | the song URI |
const char * mpd_run_getfingerprint_chromaprint | ( | struct mpd_connection * | connection, |
const char * | uri, | ||
char * | buffer, | ||
size_t | buffer_size | ||
) |
Shortcut for mpd_send_getfingerprint(), mpd_recv_pair_named() and mpd_response_finish().
connection | a valid and connected mpd_connection |
uri | the song URI |
buffer | a buffer for the fingerprint string |
buffer_size | the size of the buffer (with enough room for a trailing null byte); if the buffer is too small, behavior is undefined; the library may truncate the string or fail |