- if(ferror(c->fpin) || feof(c->fpin)) return -1;
- return 0;
-}
-
-int disorder_part(disorder_client *c, char **partp,
- const char *track, const char *context, const char *part) {
- return disorder_simple(c, partp, "part", track, context, part, (char *)0);
-}
-
-int disorder_resolve(disorder_client *c, char **trackp, const char *track) {
- return disorder_simple(c, trackp, "resolve", track, (char *)0);
-}
-
-int disorder_pause(disorder_client *c) {
- return disorder_simple(c, 0, "pause", (char *)0);
-}
-
-int disorder_resume(disorder_client *c) {
- return disorder_simple(c, 0, "resume", (char *)0);
-}
-
-int disorder_tags(disorder_client *c,
- char ***vecp, int *nvecp) {
- return disorder_simple_list(c, vecp, nvecp, "tags", (char *)0);
-}
-
-int disorder_users(disorder_client *c,
- char ***vecp, int *nvecp) {
- return disorder_simple_list(c, vecp, nvecp, "users", (char *)0);
-}
-
-/** @brief Get recentl added tracks
- * @param c Client
- * @param vecp Where to store pointer to list
- * @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);
-}
-
-int disorder_set_global(disorder_client *c,
- const char *key, const char *value) {
- return disorder_simple(c, 0, "set-global", key, value, (char *)0);
-}
-
-int disorder_unset_global(disorder_client *c, const char *key) {
- return disorder_simple(c, 0, "unset-global", key, (char *)0);
-}
-
-int disorder_get_global(disorder_client *c, const char *key, char **valuep) {
- return disorder_simple(c, valuep, "get-global", key, (char *)0);
-}
-
-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) {
- error(0, "malformed rtp-address reply");