/* * Author: Lubomir Host 'rajo' * $Log: http.h,v $ * Revision 1.8 2002/05/09 16:10:49 host8 * * Test of cvs commit (loginfo.sh changed). * * New implementation of HTTP protocol, doesn't work yet. * * Revision 1.7 2001/11/19 20:15:07 host8 * Http protocol probably works fine. * * Revision 1.6 2001/11/12 20:19:10 host8 * http_connect() probably works fine. * Some problems with http_requests for www.mtnsms.com. * * Revision 1.5 2001/11/12 16:08:00 host8 * Big improvements in http. connect() doesn't work correctly yet. * * Revision 1.4 2001/10/30 17:24:02 host8 * New implementation of http request. * * Revision 1.3 2001/10/25 20:05:28 host8 * First implementation of login with password. * * Revision 1.2 2001/09/28 15:39:21 host8 * Added keyword substitution * */ #ifndef _HTTP_H #define _HTTP_H //#define USER_AGENT "User-Agent: Lynx/2.8.4dev.7 libwww-FM/2.14\r\n" //#define USER_AGENT "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DigExt)\r\n" #define USER_AGENT "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Linux) Opera 5.0 [en]\r\n" #define HTTP_GET 0 #define HTTP_POST 1 /* typedef struct WWW_STRUCT { int method; char *host; char *referer; char *cookie; char *user_agent; } WWW; extern WWW www; */ typedef struct COOKIE_STRUCT { char *domain; char *text; } COOKIE; typedef struct HTTP_REQUEST_STRUCT { FILE *frw; int method; u_short port; char *ret_val; char *host; char *file; char *referer; } HTTP_REQUEST; extern HTTP_REQUEST **requests; extern COOKIE **cookies; extern int http_request_by_request(HTTP_REQUEST *r); extern int http_request(int method, char *file, char *host, char *fmt, ...); extern char *get_last_hostname(void); extern void http_init(void); extern void free_requests(HTTP_REQUEST **req); extern void http_clean_referer(HTTP_REQUEST **req); #endif /* #ifndef _HTTP_H */