2 * $Logfile: /Freespace2/code/Inetfile/Chttpget.h $
7 * HTTP Client class (get only)
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 3 8/22/99 1:19p Dave
15 * Fixed up http proxy code. Cleaned up scoring code. Reverse the order in
16 * which d3d cards are detected.
18 * 5 8/20/99 3:01p Kevin
19 * Added support for Proxies (I hope!)
21 * 4 7/31/98 12:19p Nate
22 * Fixed http abort problem.
24 * 3 7/31/98 11:57a Kevin
25 * Added new functions for getting state
27 * 2 6/01/98 10:10a Kevin
28 * Added DLL connection interface and auto update DLL
30 * 1 5/27/98 9:54a Kevin
32 * 1 5/25/98 5:31p Kevin
37 #ifndef _CHTTPGET_HEADER_
38 #define _CHTTPGET_HEADER_
40 #define HTTP_STATE_INTERNAL_ERROR 0
41 #define HTTP_STATE_SOCKET_ERROR 1
42 #define HTTP_STATE_URL_PARSING_ERROR 2
43 #define HTTP_STATE_CONNECTING 3
44 #define HTTP_STATE_HOST_NOT_FOUND 4
45 #define HTTP_STATE_CANT_CONNECT 5
46 #define HTTP_STATE_CONNECTED 6
47 #define HTTP_STATE_FILE_NOT_FOUND 10
48 #define HTTP_STATE_RECEIVING 11
49 #define HTTP_STATE_FILE_RECEIVED 12
50 #define HTTP_STATE_UNKNOWN_ERROR 13
51 #define HTTP_STATE_RECV_FAILED 14
52 #define HTTP_STATE_CANT_WRITE_FILE 15
53 #define HTTP_STATE_STARTUP 16
55 #define MAX_URL_LEN 300
60 ChttpGet(char *URL,char *localfile);
61 ChttpGet(char *URL,char *localfile,char *proxyip,unsigned short proxyport);
63 void GetFile(char *URL,char *localfile);
65 unsigned int GetBytesIn();
66 unsigned int GetTotalBytes();
74 unsigned int ReadDataChannel();
75 unsigned int m_iBytesIn;
76 unsigned int m_iBytesTotal;
80 char m_URL[MAX_URL_LEN];
81 unsigned short m_ProxyPort;
83 char m_szUserName[100];
84 char m_szPassword[100];
87 char m_szFilename[100];
95 char recv_buffer[1000];