chiark / gitweb /
Mention scripts/protocol in README.developers, and bring other bits a
[disorder] / lib / client-stubs.h
index 231238a06c04bcdbd259940d52f79dd7c752fe43..19649ac37d3a3f491cbc2c1b4533d3a49fa00109 100644 (file)
@@ -57,18 +57,22 @@ int disorder_allfiles(disorder_client *c, const char *dir, const char *re, char
  *
  * The confirmation string must have been created with 'register'.  The username is returned so the caller knows who they are.
  *
+ * @param c Client
  * @param confirmation Confirmation string
  * @return 0 on success, non-0 on error
  */
 int disorder_confirm(disorder_client *c, const char *confirmation);
+
 /** @brief Log in with a cookie
  *
  * The cookie must have been created with 'make-cookie'.  The username is returned so the caller knows who they are.
  *
+ * @param c Client
  * @param cookie Cookie string
  * @return 0 on success, non-0 on error
  */
 int disorder_cookie(disorder_client *c, const char *cookie);
+
 /** @brief Delete user
  *
  * Requires the 'admin' right.
@@ -200,6 +204,29 @@ int disorder_length(disorder_client *c, const char *track, long *lengthp);
  */
 int disorder_make_cookie(disorder_client *c, char **cookiep);
 
+/** @brief Move a track
+ *
+ * Requires one of the 'move mine', 'move random' or 'move any' rights depending on how the track came to be added to the queue.
+ *
+ * @param c Client
+ * @param track Track ID or name
+ * @param delta How far to move the track towards the head of the queue
+ * @return 0 on success, non-0 on error
+ */
+int disorder_move(disorder_client *c, const char *track, long delta);
+
+/** @brief Move multiple tracks
+ *
+ * Requires one of the 'move mine', 'move random' or 'move any' rights depending on how the track came to be added to the queue.
+ *
+ * @param c Client
+ * @param target Move after this track, or to head if ""
+ * @param ids List of tracks to move by ID
+ * @param nids Length of ids
+ * @return 0 on success, non-0 on error
+ */
+int disorder_moveafter(disorder_client *c, const char *target, char **ids, int nids);
+
 /** @brief Do nothing
  *
  * Used as a keepalive.  No authentication required.
@@ -242,6 +269,18 @@ int disorder_pause(disorder_client *c);
  */
 int disorder_play(disorder_client *c, const char *track, char **idp);
 
+/** @brief Play multiple tracks
+ *
+ * Requires the 'play' right.
+ *
+ * @param c Client
+ * @param target Insert into queue after this track, or at head if ""
+ * @param tracks List of track names to play
+ * @param ntracks Length of tracks
+ * @return 0 on success, non-0 on error
+ */
+int disorder_playafter(disorder_client *c, const char *target, char **tracks, int ntracks);
+
 /** @brief Delete a playlist
  *
  * Requires the 'play' right and permission to modify the playlist.