albumart.h File Reference

MPD client library. More...

`#include "compiler.h"`
`#include <stdbool.h>`
`#include <stddef.h>`

Go to the source code of this file.

## Functions

bool | mpd_send_albumart (struct mpd_connection *connection, const char *uri, unsigned offset)
int | mpd_recv_albumart (struct mpd_connection *connection, void *buffer, size_t buffer_size)
int | mpd_run_albumart (struct mpd_connection *connection, const char *uri, unsigned offset, void *buffer, size_t buffer_size)

## Detailed Description

MPD client library.

Do not include this header directly. Use mpd/client.h instead.

Definition in file albumart.h.

## Function Documentation

## mpd_send_albumart()

bool mpd_send_albumart | ( | struct mpd_connection * | connection,
|  | const char * | uri,
|  | unsigned | offset
| ) |  |

Sends the "albumart" command to MPD. Call mpd_recv_albumart() to read response lines.

Parameters

  connection | a valid and connected mpd_connection
  uri | the URI of the song
  offset | to read from

Returns
  true on success

## mpd_recv_albumart()

int mpd_recv_albumart | ( | struct mpd_connection * | connection,
|  | void * | buffer,
|  | size_t | buffer_size
| ) |  |

Receives the "albumart" response

Parameters

  connection | a valid and connected mpd_connection
  buffer | an already allocated buffer, should be of the same size as the binary chunk size (default 8192, can be set with binarylimit command)
  buffer_size | the size of the allocated buffer

Returns
  read size on success, -1 on failure

## mpd_run_albumart()

int mpd_run_albumart | ( | struct mpd_connection * | connection,
|  | const char * | uri,
|  | unsigned | offset,
|  | void * | buffer,
|  | size_t | buffer_size
| ) |  |

Shortcut for mpd_send_albumart(), mpd_recv_albumart() and mpd_response_finish().

Parameters

  connection | a valid and connected mpd_connection
  uri | the URI of the song
  offset | to read from
  buffer | an already allocated buffer, should be of the same size as the binary chunk size (default 8192, can be set with binarylimit command)
  buffer_size | the size of the allocated buffer

Returns
  read size on success, -1 on failure