-/** @brief Get recently added tracks
- * @param c Client
- * @param vecp Where to store pointer to list (UTF-8)
- * @param nvecp Where to store count
- * @param max Maximum tracks to fetch, or 0 for all available
- * @return 0 on success, non-0 on error
- */
-int disorder_new_tracks(disorder_client *c,
- char ***vecp, int *nvecp,
- int max) {
- char limit[32];
-
- sprintf(limit, "%d", max);
- return disorder_simple_list(c, vecp, nvecp, "new", limit, (char *)0);
-}
-
-/** @brief Get server's RTP address information
- * @param c Client
- * @param addressp Where to store address (UTF-8)
- * @param portp Where to store port (UTF-8)
- * @return 0 on success, non-0 on error
- */
-int disorder_rtp_address(disorder_client *c, char **addressp, char **portp) {
- char *r;
- int rc, n;
- char **vec;
-
- if((rc = disorder_simple(c, &r, "rtp-address", (char *)0)))
- return rc;
- vec = split(r, &n, SPLIT_QUOTES, 0, 0);
- if(n != 2) {
- c->last = "malformed RTP address";
- disorder_error(0, "malformed rtp-address reply");
- return -1;
- }
- *addressp = vec[0];
- *portp = vec[1];
- return 0;
-}
-
-/** @brief Get details of a scheduled event
- * @param c Client
- * @param id Event ID
- * @param actiondatap Where to put details
- * @return 0 on success, non-0 on error
- */
-int disorder_schedule_get(disorder_client *c, const char *id,
- struct kvp **actiondatap) {
- char **lines, **bits;
- int rc, nbits;
-
- *actiondatap = 0;
- if((rc = disorder_simple_list(c, &lines, NULL,
- "schedule-get", id, (char *)0)))
- return rc;
- while(*lines) {
- if(!(bits = split(*lines++, &nbits, SPLIT_QUOTES, 0, 0))) {
- disorder_error(0, "invalid schedule-get reply: cannot split line");
- return -1;
- }
- if(nbits != 2) {
- disorder_error(0, "invalid schedule-get reply: wrong number of fields");
- return -1;
- }
- kvp_set(actiondatap, bits[0], bits[1]);
- }
- return 0;
-}
-