00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef HTTP_CLIENT_H
00016 #define HTTP_CLIENT_H
00017
00018 struct http_client;
00019
00020 enum http_client_event {
00021 HTTP_CLIENT_FAILED,
00022 HTTP_CLIENT_TIMEOUT,
00023 HTTP_CLIENT_OK,
00024 HTTP_CLIENT_INVALID_REPLY,
00025 };
00026
00027 char * http_client_url_parse(const char *url, struct sockaddr_in *dst,
00028 char **path);
00029 struct http_client * http_client_addr(struct sockaddr_in *dst,
00030 struct wpabuf *req, size_t max_response,
00031 void (*cb)(void *ctx,
00032 struct http_client *c,
00033 enum http_client_event event),
00034 void *cb_ctx);
00035 struct http_client * http_client_url(const char *url,
00036 struct wpabuf *req, size_t max_response,
00037 void (*cb)(void *ctx,
00038 struct http_client *c,
00039 enum http_client_event event),
00040 void *cb_ctx);
00041 void http_client_free(struct http_client *c);
00042 struct wpabuf * http_client_get_body(struct http_client *c);
00043 char * http_client_get_hdr_line(struct http_client *c, const char *tag);
00044 char * http_link_update(char *url, const char *base);
00045
00046 #endif