libmpdclient 2.22
Functions
neighbor.h File Reference

MPD client library. More...

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

Go to the source code of this file.

Functions

struct mpd_neighbormpd_neighbor_begin (const struct mpd_pair *pair)
 
bool mpd_neighbor_feed (struct mpd_neighbor *neighbor, const struct mpd_pair *pair)
 
void mpd_neighbor_free (struct mpd_neighbor *neighbor)
 
const char * mpd_neighbor_get_uri (const struct mpd_neighbor *neighbor)
 
const char * mpd_neighbor_get_display_name (const struct mpd_neighbor *neighbor)
 
bool mpd_send_list_neighbors (struct mpd_connection *connection)
 
struct mpd_neighbormpd_recv_neighbor (struct mpd_connection *connection)
 

Detailed Description

MPD client library.

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

Definition in file neighbor.h.

Function Documentation

◆ mpd_neighbor_begin()

struct mpd_neighbor * mpd_neighbor_begin ( const struct mpd_pair pair)

Begins parsing a new mpd_neighbor.

Parameters
pairthe first pair in this mount point
Returns
the new mpd_neighbor object, or NULL on error (out of memory, or wrong pair name)
Since
libmpdclient 2.17

◆ mpd_neighbor_feed()

bool mpd_neighbor_feed ( struct mpd_neighbor neighbor,
const struct mpd_pair pair 
)

Parses the pair, adding its information to the specified mpd_neighbor object.

Returns
true if the pair was parsed and added to the mpd_neighbor (or if the pair was not understood and ignored), false if this pair is the beginning of the next neighbor
Since
libmpdclient 2.17

◆ mpd_neighbor_free()

void mpd_neighbor_free ( struct mpd_neighbor neighbor)

Frees a mpd_neighbor object returned from mpd_recv_neighbor() or mpd_neighbor_begin().

Since
libmpdclient 2.17

◆ mpd_neighbor_get_uri()

const char * mpd_neighbor_get_uri ( const struct mpd_neighbor neighbor)
Returns
the neighbor mount point URI of the specified mpd_neighbor object
Since
libmpdclient 2.17

◆ mpd_neighbor_get_display_name()

const char * mpd_neighbor_get_display_name ( const struct mpd_neighbor neighbor)
Returns
the display name of the specified mpd_neighbor object;
Since
libmpdclient 2.17

◆ mpd_send_list_neighbors()

bool mpd_send_list_neighbors ( struct mpd_connection connection)

Sends the "listneighbors" command to MPD: queries a list of "neighbors" (e.g. accessible file servers on the local net). Call mpd_recv_neighbor() to read the response.

Parameters
connectiona valid and connected mpd_connection.
Returns
true on success
Since
libmpdclient 2.17, MPD 0.19

◆ mpd_recv_neighbor()

struct mpd_neighbor * mpd_recv_neighbor ( struct mpd_connection connection)

Reads the next mpd_neighbor from the MPD response. Free the return value with mpd_neighbor_free().

Returns
a mpd_neighbor object on success, NULL on error or end-of-response
Since
libmpdclient 2.17, MPD 0.19