myMPD
Internal API documentation
Loading...
Searching...
No Matches
webradio.h File Reference

myMPD API webradio functions More...

#include "dist/sds/sds.h"
#include "src/lib/api.h"
#include "src/lib/config/mympd_state.h"
Include dependency graph for webradio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

sds mympd_api_webradio_search (struct t_webradios *webradios, sds buffer, unsigned request_id, enum mympd_cmd_ids cmd_id, unsigned offset, unsigned limit, sds expression, sds sort, bool sortdesc)
sds mympd_api_webradio_radio_get_by_name (struct t_webradios *webradios, sds buffer, unsigned request_id, enum mympd_cmd_ids cmd_id, sds name)
sds mympd_api_webradio_radio_get_by_uri (struct t_webradios *webradios, sds buffer, unsigned request_id, enum mympd_cmd_ids cmd_id, sds uri)
sds mympd_api_webradio_from_uri_tojson (struct t_mympd_state *mympd_state, const char *uri)
sds mympd_api_webradio_print (struct t_webradio_data *webradio, sds buffer, const char *uri)

Detailed Description

myMPD API webradio functions

Function Documentation

◆ mympd_api_webradio_from_uri_tojson()

sds mympd_api_webradio_from_uri_tojson ( struct t_mympd_state * mympd_state,
const char * uri )

Search webradio by uri in favorites and WebradioDB and print json response

Parameters
mympd_statepointer to mympd_state
uriUri to search for
Returns
newly allocated sds string, or empty string on error

◆ mympd_api_webradio_print()

sds mympd_api_webradio_print ( struct t_webradio_data * webradio,
sds buffer,
const char * uri )

Prints a webradio entry

Parameters
webradiowebradio data struct to print
bufferalready allocated buffer to append the data
uriMain uri for the entry
Returns
pointer to buffer

◆ mympd_api_webradio_radio_get_by_name()

sds mympd_api_webradio_radio_get_by_name ( struct t_webradios * webradios,
sds buffer,
unsigned request_id,
enum mympd_cmd_ids cmd_id,
sds name )

Gets a Webradio entry by name and print it as jsonrpc response

Parameters
webradiosPointer to webradios struct
bufferalready allocated sds string to append the response
request_idjsonrpc request id
cmd_idAPI method
namewebradio name
Returns
pointer to buffer

◆ mympd_api_webradio_radio_get_by_uri()

sds mympd_api_webradio_radio_get_by_uri ( struct t_webradios * webradios,
sds buffer,
unsigned request_id,
enum mympd_cmd_ids cmd_id,
sds uri )

Gets a Webradio entry by uri and print it as jsonrpc response

Parameters
webradiosPointer to webradios struct
bufferalready allocated sds string to append the response
request_idjsonrpc request id
cmd_idAPI method
uriwebradio stream uri
Returns
pointer to buffer

◆ mympd_api_webradio_search()

sds mympd_api_webradio_search ( struct t_webradios * webradios,
sds buffer,
unsigned request_id,
enum mympd_cmd_ids cmd_id,
unsigned offset,
unsigned limit,
sds expression,
sds sort,
bool sortdesc )

Searches the webradio list

Parameters
webradiosPointer to webradios struct
bufferalready allocated sds string to append the response
request_idjsonrpc request id
cmd_idAPI ID
offsetoffset for the list
limitmaximum entries to print
expressionstring to search
sortSort tag
sortdescSort descending?
Returns
pointer to buffer