myMPD
Internal API documentation
Loading...
Searching...
No Matches
filesystem.c File Reference

myMPD filesystem API More...

Include dependency graph for filesystem.c:

Data Structures

struct  t_dir_entry

Functions

static void free_t_dir_entry (void *data)
static bool search_dir_entry (rax *rt, sds key, sds entity_name, struct mpd_entity *entity, const char *searchstr, size_t searchstr_len)
sds mympd_api_browse_filesystem (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, sds buffer, unsigned request_id, sds path, unsigned offset, unsigned limit, sds searchstr, const struct t_fields *tagcols)

Detailed Description

myMPD filesystem API

Function Documentation

◆ free_t_dir_entry()

void free_t_dir_entry ( void * data)
static

private functions Frees the t_dir_entry struct used as callback for rax_free_data

Parameters
datavoid pointer to a t_dir_entry struct

◆ mympd_api_browse_filesystem()

sds mympd_api_browse_filesystem ( struct t_mympd_state * mympd_state,
struct t_partition_state * partition_state,
sds buffer,
unsigned request_id,
sds path,
unsigned offset,
unsigned limit,
sds searchstr,
const struct t_fields * tagcols )

Public functions Lists the entry of directory in the mpd music directory as jsonrpc response Custom order: directories, playlists, songs

Parameters
mympd_statepointer to mympd state
partition_statepointer to the partition state
bufferalready allocated sds string to append result
request_idjsonrpc request id
pathpath to list
offsetoffset for listing
limitmax entries to list
searchstrstring to search
tagcolscolumns to print
Returns
pointer to buffer

◆ search_dir_entry()

bool search_dir_entry ( rax * rt,
sds key,
sds entity_name,
struct mpd_entity * entity,
const char * searchstr,
size_t searchstr_len )
static

Search the entry for searchstr and add matches to the rax tree

Parameters
rtRax tree to insert
keyKey to insert
entity_nameDisplayname of the entity
entityPointer to mpd entity
searchstrString to search in entity_name
searchstr_lenLength of searchstr
Returns
true on match, else false