Send password.
[doldaconnect.git] / include / doldaconnect / uilib.h
... / ...
CommitLineData
1#ifndef _UILIB_H
2#define _UILIB_H
3
4#include <wchar.h>
5
6struct dc_response
7{
8 struct dc_response *next, *prev;
9 int code, tag;
10 wchar_t *cmdname;
11 void *data;
12 void *internal;
13 struct
14 {
15 int argc;
16 wchar_t **argv;
17 } *rlines;
18 int linessize;
19 int numlines;
20 int curline;
21};
22
23struct dc_intresp
24{
25 int code;
26 int argc;
27 struct
28 {
29 int type;
30 union
31 {
32 int num;
33 wchar_t *str;
34 double flnum;
35 } val;
36 } *argv;
37};
38
39int dc_init(void);
40void dc_cleanup(void);
41void dc_disconnect(void);
42void dc_freeresp(struct dc_response *resp);
43struct dc_response *dc_getresp(void);
44struct dc_response *dc_gettaggedresp(int tag);
45struct dc_response *dc_gettaggedrespsync(int tag);
46int dc_wantwrite(void);
47int dc_getstate(void);
48int dc_queuecmd(int (*callback)(struct dc_response *), void *data, ...);
49int dc_handleread(void);
50int dc_handlewrite(void);
51int dc_connect(char *host, int port);
52struct dc_intresp *dc_interpret(struct dc_response *resp);
53void dc_freeires(struct dc_intresp *ires);
54const char *dc_gethostname(void);
55
56#endif