fetch: add support for --user and --password
[project/uclient.git] / uclient-backend.h
index fb1a788..a5cf4f3 100644 (file)
@@ -29,22 +29,12 @@ struct uclient_backend {
 
        int (*connect)(struct uclient *cl);
        int (*request)(struct uclient *cl);
 
        int (*connect)(struct uclient *cl);
        int (*request)(struct uclient *cl);
+       void (*disconnect)(struct uclient *cl);
 
        int (*read)(struct uclient *cl, char *buf, unsigned int len);
        int (*write)(struct uclient *cl, char *buf, unsigned int len);
 };
 
 
        int (*read)(struct uclient *cl, char *buf, unsigned int len);
        int (*write)(struct uclient *cl, char *buf, unsigned int len);
 };
 
-struct uclient_url {
-       const struct uclient_backend *backend;
-       int prefix;
-
-       const char *host;
-       const char *port;
-       const char *location;
-
-       const char *auth;
-};
-
 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);
 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);