libmpdclient 2.22
Functions
readpicture.h File Reference

MPD client library. More...

#include "compiler.h"
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for readpicture.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool mpd_send_readpicture (struct mpd_connection *connection, const char *uri, unsigned offset)
 
int mpd_recv_readpicture (struct mpd_connection *connection, void *buffer, size_t buffer_size)
 
int mpd_run_readpicture (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 readpicture.h.

Function Documentation

◆ mpd_send_readpicture()

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

Sends the "readpicture" command to MPD. Call mpd_recv_readpicture() to read response lines.

Parameters
connectiona valid and connected mpd_connection
urithe URI of the song
offsetto read from
Returns
true on success
Since
libmpdclient 2.20, MPD 0.22

◆ mpd_recv_readpicture()

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

Receives the "readpicture" response

Parameters
connectiona valid and connected mpd_connection
bufferan already allocated buffer, the size must be the same or greater than the binary chunk size (default 8192, can be set with binarylimit command)
buffer_sizethe size of the allocated buffer
Returns
read size on success, -1 on failure
Since
libmpdclient 2.20, MPD 0.22

◆ mpd_run_readpicture()

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

Shortcut for mpd_send_readpicture(), mpd_recv_readpicture() and mpd_response_finish().

Parameters
connectiona valid and connected mpd_connection
urithe URI of the song
offsetto read from
bufferan already allocated buffer, the size must be the same or greater than the binary chunk size (default 8192, can be set with binarylimit command)
buffer_sizethe size of the allocated buffer
Returns
read size on success, -1 on failure
Since
libmpdclient 2.20, MPD 0.22