chiark / gitweb /
More commands.
[disorder] / lib / client.h
CommitLineData
460b9539 1/*
2 * This file is part of DisOrder.
5aff007d 3 * Copyright (C) 2004-2008 Richard Kettlewell
460b9539 4 *
e7eb3a27 5 * This program is free software: you can redistribute it and/or modify
460b9539 6 * it under the terms of the GNU General Public License as published by
e7eb3a27 7 * the Free Software Foundation, either version 3 of the License, or
460b9539 8 * (at your option) any later version.
e7eb3a27
RK
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
460b9539 15 * You should have received a copy of the GNU General Public License
e7eb3a27 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
460b9539 17 */
c4e2cfdd
RK
18/** @file lib/client.h
19 * @brief Simple C client
20 *
158d0961 21 * See @ref lib/eclient.h for an asynchronous-capable client
c4e2cfdd
RK
22 * implementation.
23 */
460b9539 24
25#ifndef CLIENT_H
26#define CLIENT_H
27
05b75f8d 28#include <time.h>
319d7107 29#include "configuration.h"
05b75f8d 30
c4e2cfdd 31/** @brief Client data */
460b9539 32typedef struct disorder_client disorder_client;
33
34struct queue_entry;
35struct kvp;
36struct sink;
37
460b9539 38disorder_client *disorder_new(int verbose);
460b9539 39int disorder_connect(disorder_client *c);
fdf98378 40int disorder_connect_user(disorder_client *c,
41 const char *username,
42 const char *password);
0227f67d 43int disorder_connect_cookie(disorder_client *c, const char *cookie);
319d7107
RK
44int disorder_connect_generic(struct config *conf,
45 disorder_client *c,
46 const char *username,
47 const char *password,
48 const char *cookie);
460b9539 49int disorder_close(disorder_client *c);
460b9539 50int disorder_playing(disorder_client *c, struct queue_entry **qp);
460b9539 51char *disorder_user(disorder_client *c);
460b9539 52int disorder_prefs(disorder_client *c, const char *track,
53 struct kvp **kp);
460b9539 54int disorder_set_volume(disorder_client *c, int left, int right);
55int disorder_get_volume(disorder_client *c, int *left, int *right);
460b9539 56int disorder_log(disorder_client *c, struct sink *s);
2a10b70b
RK
57int disorder_new_tracks(disorder_client *c,
58 char ***vecp, int *nvecp,
59 int max);
ca831831 60int disorder_rtp_address(disorder_client *c, char **addressp, char **portp);
bb037be2 61const char *disorder_last(disorder_client *c);
758aa6c3
RK
62int disorder_schedule_get(disorder_client *c, const char *id,
63 struct kvp **actiondatap);
64int disorder_schedule_add(disorder_client *c,
65 time_t when,
66 const char *priority,
67 const char *action,
68 ...);
f0feb22e 69
7788b7c7
RK
70#include "client-stubs.h"
71
460b9539 72#endif /* CLIENT_H */
73
74/*
75Local Variables:
76c-basic-offset:2
77comment-column:40
78End:
79*/