Commit | Line | Data |
---|---|---|
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 | 32 | typedef struct disorder_client disorder_client; |
33 | ||
34 | struct queue_entry; | |
35 | struct kvp; | |
36 | struct sink; | |
37 | ||
460b9539 | 38 | disorder_client *disorder_new(int verbose); |
460b9539 | 39 | int disorder_connect(disorder_client *c); |
fdf98378 | 40 | int disorder_connect_user(disorder_client *c, |
41 | const char *username, | |
42 | const char *password); | |
0227f67d | 43 | int disorder_connect_cookie(disorder_client *c, const char *cookie); |
319d7107 RK |
44 | int disorder_connect_generic(struct config *conf, |
45 | disorder_client *c, | |
46 | const char *username, | |
47 | const char *password, | |
48 | const char *cookie); | |
460b9539 | 49 | int disorder_close(disorder_client *c); |
460b9539 | 50 | char *disorder_user(disorder_client *c); |
460b9539 | 51 | int disorder_log(disorder_client *c, struct sink *s); |
bb037be2 | 52 | const char *disorder_last(disorder_client *c); |
f0feb22e | 53 | |
7788b7c7 RK |
54 | #include "client-stubs.h" |
55 | ||
460b9539 | 56 | #endif /* CLIENT_H */ |
57 | ||
58 | /* | |
59 | Local Variables: | |
60 | c-basic-offset:2 | |
61 | comment-column:40 | |
62 | End: | |
63 | */ |