1 #ifndef __UCLIENT_INTERNAL_H
2 #define __UCLIENT_INTERNAL_H
6 struct uclient_backend {
7 const char * const * prefix;
9 struct uclient *(*alloc)(void);
10 void (*free)(struct uclient *cl);
11 void (*update_url)(struct uclient *cl);
13 int (*connect)(struct uclient *cl);
14 int (*request)(struct uclient *cl);
16 int (*read)(struct uclient *cl, char *buf, unsigned int len);
17 int (*write)(struct uclient *cl, char *buf, unsigned int len);
21 const struct uclient_backend *backend;
31 void uclient_backend_set_error(struct uclient *cl);
32 void uclient_backend_set_eof(struct uclient *cl);
33 void uclient_backend_reset_state(struct uclient *cl);