*
* Makes the calling user owner of a randomly picked track.
*
+ * @param c Client
* @param id Track ID
* @return 0 on success, non-0 on error
*/
*
* Create a new user. Requires the 'admin' right. Email addresses etc must be filled in in separate commands.
*
+ * @param c Client
* @param user New username
* @param password Initial password
* @param rights Initial rights (optional)
*
* See 'files' and 'dirs' for more specific lists.
*
+ * @param c Client
* @param dir Directory to list (optional)
* @param re Regexp that results must match (optional)
* @param filesp List of matching files and directories
*
* Requires the 'admin' right.
*
+ * @param c Client
* @param user User to delete
* @return 0 on success, non-0 on error
*/
*
*
*
+ * @param c Client
* @param dir Directory to list (optional)
* @param re Regexp that results must match (optional)
* @param filesp List of matching directories
*
* Play will stop at the end of the current track, if one is playing. Requires the 'global prefs' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_disable(disorder_client *c);
*
* With the 'admin' right you can do anything. Otherwise you need the 'userinfo' right and can only set 'email' and 'password'.
*
+ * @param c Client
* @param username User to modify
* @param property Property name
* @param value New property value
*
* Requires the 'global prefs' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_enable(disorder_client *c);
*
*
*
+ * @param c Client
* @param enabledp 1 if play is enabled and 0 otherwise
* @return 0 on success, non-0 on error
*/
*
*
*
+ * @param c Client
* @param track Track name
* @param existsp 1 if the track exists and 0 otherwise
* @return 0 on success, non-0 on error
*
*
*
+ * @param c Client
* @param dir Directory to list (optional)
* @param re Regexp that results must match (optional)
* @param filesp List of matching files
*
* If the track does not exist that is an error. If the track exists but the preference does not then a null value is returned.
*
+ * @param c Client
* @param track Track name
* @param pref Preference name
* @param valuep Preference value
*
* If the preference does exist not then a null value is returned.
*
+ * @param c Client
* @param pref Global preference name
* @param valuep Preference value
* @return 0 on success, non-0 on error
*
* If the track does not exist an error is returned.
*
+ * @param c Client
* @param track Track name
* @param lengthp Track length in seconds
* @return 0 on success, non-0 on error
*
* The cookie may be redeemed via the 'cookie' command
*
+ * @param c Client
* @param cookiep Newly created cookie
* @return 0 on success, non-0 on error
*/
*
* Used as a keepalive. No authentication required.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_nop(disorder_client *c);
*
* If the name part cannot be constructed an empty string is returned.
*
+ * @param c Client
* @param track Track name
* @param context Context ("sort" or "display")
* @param part Name part ("artist", "album" or "title")
*
* Requires the 'pause' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_pause(disorder_client *c);
*
* Requires the 'play' right.
*
+ * @param c Client
* @param track Track to play
* @param idp Queue ID of new track
* @return 0 on success, non-0 on error
*
* Requires the 'play' right and permission to modify the playlist.
*
+ * @param c Client
* @param playlist Playlist to delete
* @return 0 on success, non-0 on error
*/
*
* Requires the 'read' right and oermission to read the playlist.
*
+ * @param c Client
* @param playlist Playlist name
* @param tracksp List of tracks in playlist
* @param ntracksp Number of elements in tracksp
*
* Requires the 'read' right and permission to read the playlist.
*
+ * @param c Client
* @param playlist Playlist to read
* @param sharep Sharing status ("public", "private" or "shared")
* @return 0 on success, non-0 on error
*
* Requires the 'play' right and permission to modify the playlist. A given connection may lock at most one playlist.
*
+ * @param c Client
* @param playlist Playlist to delete
* @return 0 on success, non-0 on error
*/
int disorder_playlist_lock(disorder_client *c, const char *playlist);
+/** @brief Set the contents of a playlist
+ *
+ * Requires the 'play' right and permission to modify the playlist, which must be locked.
+ *
+ * @param c Client
+ * @param playlist Playlist to modify
+ * @param tracks New list of tracks for playlist
+ * @param ntracks Length of tracks
+ * @return 0 on success, non-0 on error
+ */
+int disorder_playlist_set(disorder_client *c, const char *playlist, char **tracks, int ntracks);
+
/** @brief Set a playlist's sharing status
*
* Requires the 'play' right and permission to modify the playlist.
*
+ * @param c Client
* @param playlist Playlist to modify
* @param share New sharing status ("public", "private" or "shared")
* @return 0 on success, non-0 on error
*
* The playlist to unlock is implicit in the connection.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_playlist_unlock(disorder_client *c);
*
* Requires the 'read' right. Only playlists that you have permission to read are returned.
*
+ * @param c Client
* @param playlistsp Playlist names
* @param nplaylistsp Number of elements in playlistsp
* @return 0 on success, non-0 on error
*/
int disorder_playlists(disorder_client *c, char ***playlistsp, int *nplaylistsp);
+/** @brief List the queue
+ *
+ *
+ *
+ * @param c Client
+ * @param queuep Current queue contents
+ * @return 0 on success, non-0 on error
+ */
+int disorder_queue(disorder_client *c, struct queue_entry **queuep);
+
/** @brief Disable random play
*
* Requires the 'global prefs' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_random_disable(disorder_client *c);
*
* Requires the 'global prefs' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_random_enable(disorder_client *c);
*
* Random play counts as enabled even if play is disabled.
*
+ * @param c Client
* @param enabledp 1 if random play is enabled and 0 otherwise
* @return 0 on success, non-0 on error
*/
int disorder_random_enabled(disorder_client *c, int *enabledp);
+/** @brief List recently played tracks
+ *
+ *
+ *
+ * @param c Client
+ * @param recentp Recently played tracks
+ * @return 0 on success, non-0 on error
+ */
+int disorder_recent(disorder_client *c, struct queue_entry **recentp);
+
/** @brief Re-read configuraiton file.
*
* Requires the 'admin' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_reconfigure(disorder_client *c);
*
* Requires the 'register' right which is usually only available to the 'guest' user. Redeem the confirmation string via 'confirm' to complete registration.
*
+ * @param c Client
* @param username Requested new username
* @param password Requested initial password
* @param email New user's email address
*
* If the user has no valid email address, or no password, or a reminder has been sent too recently, then no reminder will be sent.
*
+ * @param c Client
* @param username User to remind
* @return 0 on success, non-0 on error
*/
*
* Requires one of the 'remove mine', 'remove random' or 'remove any' rights depending on how the track came to be added to the queue.
*
+ * @param c Client
* @param id Track ID
* @return 0 on success, non-0 on error
*/
*
* Requires the 'rescan' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_rescan(disorder_client *c);
*
* Converts aliases to non-alias track names
*
+ * @param c Client
* @param track Track name (might be an alias)
* @param resolvedp Resolve track name (definitely not an alias)
* @return 0 on success, non-0 on error
*
* Requires the 'pause' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_resume(disorder_client *c);
*
* It will not subsequently be possible to log in with the cookie.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_revoke(disorder_client *c);
*
* Requires one of the 'scratch mine', 'scratch random' or 'scratch any' rights depending on how the track came to be added to the queue.
*
+ * @param c Client
* @param id Track ID (optional)
* @return 0 on success, non-0 on error
*/
*
* Users can always delete their own scheduled events; with the admin right you can delete any event.
*
+ * @param c Client
* @param event ID of event to delete
* @return 0 on success, non-0 on error
*/
*
* This just lists IDs. Use 'schedule-get' to retrieve more detail
*
+ * @param c Client
* @param idsp List of event IDs
* @param nidsp Number of elements in idsp
* @return 0 on success, non-0 on error
*
* Terms are either keywords or tags formatted as 'tag:TAG-NAME'.
*
+ * @param c Client
* @param terms List of search terms
* @param tracksp List of matching tracks
* @param ntracksp Number of elements in tracksp
*
* Requires the 'prefs' right.
*
+ * @param c Client
* @param track Track name
* @param pref Preference name
* @param value New value
*
* Requires the 'global prefs' right.
*
+ * @param c Client
* @param pref Preference name
* @param value New value
* @return 0 on success, non-0 on error
*
* Requires the 'admin' right.
*
+ * @param c Client
* @return 0 on success, non-0 on error
*/
int disorder_shutdown(disorder_client *c);
*
* The details of what the server reports are not really defined. The returned strings are intended to be printed out one to a line..
*
+ * @param c Client
* @param statsp List of server information strings.
* @param nstatsp Number of elements in statsp
* @return 0 on success, non-0 on error
*
* Only tags which apply to at least one track are returned.
*
+ * @param c Client
* @param tagsp List of tags
* @param ntagsp Number of elements in tagsp
* @return 0 on success, non-0 on error
*
* Requires the 'prefs' right.
*
+ * @param c Client
* @param track Track name
* @param pref Preference name
* @return 0 on success, non-0 on error
*
* Requires the 'global prefs' right.
*
+ * @param c Client
* @param pref Preference name
* @return 0 on success, non-0 on error
*/
*
* If the user does not exist an error is returned, if the user exists but the property does not then a null value is returned.
*
+ * @param c Client
* @param username User to read
* @param property Property to read
* @param valuep Value of property
*
*
*
+ * @param c Client
* @param usersp List of users
* @param nusersp Number of elements in usersp
* @return 0 on success, non-0 on error
*
*
*
+ * @param c Client
* @param versionp Server version string
* @return 0 on success, non-0 on error
*/