uclient: fix http regression
[project/uclient.git] / uclient-backend.h
index 84d7b87243e050dcc32343ea9001bfd8df474c95..1b808ac8f705369d12006f119122c813839c9009 100644 (file)
@@ -34,11 +34,17 @@ struct uclient_backend {
 
        int (*read)(struct uclient *cl, char *buf, unsigned int len);
        int (*write)(struct uclient *cl, const char *buf, unsigned int len);
+       int (*pending_bytes)(struct uclient *cl, bool write);
 };
 
 void uclient_backend_set_error(struct uclient *cl, int code);
 void uclient_backend_set_eof(struct uclient *cl);
 void uclient_backend_reset_state(struct uclient *cl);
 struct uclient_url *uclient_get_url(const char *url_str, const char *auth_str);
+struct uclient_url *uclient_get_url_location(struct uclient_url *url, const char *location);
+static inline void uclient_backend_read_notify(struct uclient *cl)
+{
+       uloop_timeout_set(&cl->read_notify, 1);
+}
 
 #endif