myMPD filesystem API
More...
|
| 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) |
◆ 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
-
◆ 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_state | pointer to mympd state |
| partition_state | pointer to the partition state |
| buffer | already allocated sds string to append result |
| request_id | jsonrpc request id |
| path | path to list |
| offset | offset for listing |
| limit | max entries to list |
| searchstr | string to search |
| tagcols | columns 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
-
| rt | Rax tree to insert |
| key | Key to insert |
| entity_name | Displayname of the entity |
| entity | Pointer to mpd entity |
| searchstr | String to search in entity_name |
| searchstr_len | Length of searchstr |
- Returns
- true on match, else false