http_client.h
00001
00017 #ifndef HTTP_CLIENT_H
00018 #define HTTP_CLIENT_H
00019
00020 struct http_client;
00021
00022 enum http_client_event {
00023 HTTP_CLIENT_FAILED,
00024 HTTP_CLIENT_TIMEOUT,
00025 HTTP_CLIENT_OK,
00026 HTTP_CLIENT_INVALID_REPLY,
00027 };
00028
00029 char * http_client_url_parse(const char *url, struct sockaddr_in *dst,
00030 char **path);
00031 struct http_client * http_client_addr(struct sockaddr_in *dst,
00032 struct wpabuf *req, size_t max_response,
00033 void (*cb)(void *ctx,
00034 struct http_client *c,
00035 enum http_client_event event),
00036 void *cb_ctx);
00037 struct http_client * http_client_url(const char *url,
00038 struct wpabuf *req, size_t max_response,
00039 void (*cb)(void *ctx,
00040 struct http_client *c,
00041 enum http_client_event event),
00042 void *cb_ctx);
00043 void http_client_free(struct http_client *c);
00044 struct wpabuf * http_client_get_body(struct http_client *c);
00045 char * http_link_update(char *url, const char *base);
00046
00047 #endif
00048