4 #define DC_LOGIN_ERR_SUCCESS 0
5 #define DC_LOGIN_ERR_NOLOGIN 1
6 #define DC_LOGIN_ERR_SERVER 2
7 #define DC_LOGIN_ERR_USER 3
8 #define DC_LOGIN_ERR_CONV 4
9 #define DC_LOGIN_ERR_AUTHFAIL 5
11 #define DC_LOGIN_CONV_NOECHO 0
12 #define DC_LOGIN_CONV_ECHO 1
13 #define DC_LOGIN_CONV_INFO 2
14 #define DC_LOGIN_CONV_ERROR 3
16 #define DC_FNN_STATE_SYN 0
17 #define DC_FNN_STATE_HS 1
18 #define DC_FNN_STATE_EST 2
19 #define DC_FNN_STATE_DEAD 3
25 #define DC_TRNS_WAITING 0
27 #define DC_TRNS_MAIN 2
28 #define DC_TRNS_DONE 3
30 #define DC_TRNSD_UNKNOWN 0
32 #define DC_TRNSD_DOWN 2
34 #define DC_TRNSE_NOERROR 0
35 #define DC_TRNSE_NOTFOUND 1
36 #define DC_TRNSE_NOSLOTS 2
42 struct dc_fnetnode *next, *prev;
49 void (*destroycb)(struct dc_fnetnode *fn);
51 struct dc_fnetpeer *peers;
52 struct dc_fnetpeerdatum *peerdata;
53 void (*newpeercb)(struct dc_fnetpeer *peer);
54 void (*delpeercb)(struct dc_fnetpeer *peer);
55 void (*chpeercb)(struct dc_fnetpeer *peer);
59 struct dc_fnetpeerdatum
61 struct dc_fnetpeerdatum *next, *prev;
69 struct dc_fnetpeerdatum *datum;
80 struct dc_fnetpeer *next, *prev;
81 struct dc_fnetnode *fn;
86 struct dc_fnetpeerdi *di;
91 struct dc_transfer *next, *prev;
94 wchar_t *peerid, *peernick;
96 dc_lnum_t size, curpos;
101 void (*destroycb)(struct dc_transfer *transfer);
105 int dc_convtty(int type, wchar_t *text, char **resp, void *data);
106 int dc_convnone(int type, wchar_t *text, char **resp, void *data);
107 void dc_loginasync(char *username, int useauthless, int (*conv)(int, wchar_t *, char **, void *), void (*callback)(int, wchar_t *, void *), void *udata);
108 int dc_login(char *username, int useauthless, int (*conv)(int, wchar_t *, char **, void *), wchar_t **reason);
109 struct dc_fnetnode *dc_findfnetnode(int id);
110 void dc_getfnlistasync(void (*callback)(int, void *), void *udata);
111 void dc_uimisc_handlenotify(struct dc_response *resp);
112 struct dc_transfer *dc_findtransfer(int id);
113 void dc_gettrlistasync(void (*callback)(int, void *), void *udata);
114 wchar_t **dc_lexsexpr(wchar_t *sexpr);
115 void dc_freewcsarr(wchar_t **arr);
116 void dc_getpeerlistasync(struct dc_fnetnode *fn, void (*callback)(struct dc_fnetnode *, int, void *), void *udata);
117 struct dc_fnetpeer *dc_fnetfindpeer(struct dc_fnetnode *fn, wchar_t *id);
119 extern struct dc_fnetnode *dc_fnetnodes;
120 extern struct dc_transfer *dc_transfers;