X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/c12575c6cea802f894df6ca8b04c1b3656496592..c645bbf04f3a2d814d029a3e6010b5622d0e9224:/lib/client-stubs.h diff --git a/lib/client-stubs.h b/lib/client-stubs.h index 153b082..da36a88 100644 --- a/lib/client-stubs.h +++ b/lib/client-stubs.h @@ -22,6 +22,11 @@ */ #ifndef CLIENT_STUBS_H #define CLIENT_STUBS_H +/** @file lib/client-stubs.h + * @brief Generated client API + * + * Don't include this file directly - use @ref lib/client.h instead. + */ /** @brief Adopt a track * @@ -539,10 +544,31 @@ int disorder_revoke(disorder_client *c); * * @param c Client * @param addressp Where to store hostname or address + * @param portp Where to store service name or port number * @return 0 on success, non-0 on error */ int disorder_rtp_address(disorder_client *c, char **addressp, char **portp); +/** @brief Cancel RTP stream + * + * + * + * @param c Client + * @return 0 on success, non-0 on error + */ +int disorder_rtp_cancel(disorder_client *c); + +/** @brief Request a unicast RTP stream + * + * + * + * @param c Client + * @param address Destination address + * @param port Destination port number + * @return 0 on success, non-0 on error + */ +int disorder_rtp_request(disorder_client *c, const char *address, const char *port); + /** @brief Terminate the playing track. * * Requires one of the 'scratch mine', 'scratch random' or 'scratch any' rights depending on how the track came to be added to the queue. @@ -553,6 +579,43 @@ int disorder_rtp_address(disorder_client *c, char **addressp, char **portp); */ int disorder_scratch(disorder_client *c, const char *id); +/** @brief Schedule a track to play in the future + * + * + * + * @param c Client + * @param when When to play the track + * @param priority Event priority ("normal" or "junk") + * @param track Track to play + * @return 0 on success, non-0 on error + */ +int disorder_schedule_add_play(disorder_client *c, time_t when, const char *priority, const char *track); + +/** @brief Schedule a global setting to be changed in the future + * + * + * + * @param c Client + * @param when When to change the setting + * @param priority Event priority ("normal" or "junk") + * @param pref Global preference to set + * @param value New value of global preference + * @return 0 on success, non-0 on error + */ +int disorder_schedule_add_set_global(disorder_client *c, time_t when, const char *priority, const char *pref, const char *value); + +/** @brief Schedule a global setting to be unset in the future + * + * + * + * @param c Client + * @param when When to change the setting + * @param priority Event priority ("normal" or "junk") + * @param pref Global preference to set + * @return 0 on success, non-0 on error + */ +int disorder_schedule_add_unset_global(disorder_client *c, time_t when, const char *priority, const char *pref); + /** @brief Delete a scheduled event. * * Users can always delete their own scheduled events; with the admin right you can delete any event. @@ -722,6 +785,7 @@ int disorder_set_volume(disorder_client *c, long left, long right); * * @param c Client * @param leftp Left channel volume + * @param rightp Right channel volume * @return 0 on success, non-0 on error */ int disorder_get_volume(disorder_client *c, long *leftp, long *rightp);