use the redirect function in the example code
[project/uclient.git] / uclient-backend.h
index f72c11f..fdebf26 100644 (file)
@@ -8,13 +8,13 @@ struct uclient_backend {
 
        struct uclient *(*alloc)(void);
        void (*free)(struct uclient *cl);
+       void (*update_url)(struct uclient *cl);
 
        int (*connect)(struct uclient *cl);
        int (*request)(struct uclient *cl);
 
        int (*read)(struct uclient *cl, char *buf, unsigned int len);
        int (*write)(struct uclient *cl, char *buf, unsigned int len);
-       int (*set_write_len)(struct uclient *cl, unsigned int len);
 };
 
 struct uclient_url {
@@ -28,8 +28,9 @@ struct uclient_url {
        const char *auth;
 };
 
-extern const struct uclient_backend uclient_backend_http;
+void uclient_backend_set_error(struct uclient *cl);
 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);
 
 #endif