00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00044 #ifndef INCL_WIN32_TRANSPORT_AGENT
00045 #define INCL_WIN32_TRANSPORT_AGENT
00046
00048 #include "base/fscapi.h"
00049 #include "http/URL.h"
00050 #include "http/Proxy.h"
00051 #include "http/TransportAgent.h"
00052
00053
00054 #define MAX_AUTH_ATTEMPT 5 // Max number of attempts sending http requests.
00055
00056 #define ERR_HTTP_NOT_FOUND ERR_TRANSPORT_BASE+60
00057 #define ERR_HTTP_INFLATE ERR_TRANSPORT_BASE+70
00058 #define ERR_HTTP_DEFLATE ERR_TRANSPORT_BASE+71
00059
00060
00061
00062
00063
00064
00065
00066
00067 class Win32TransportAgent : public TransportAgent {
00068
00069
00070 public:
00071 Win32TransportAgent();
00072 Win32TransportAgent(URL& url, Proxy& proxy,
00073 unsigned int responseTimeout = DEFAULT_MAX_TIMEOUT,
00074 unsigned int maxmsgsize = DEFAULT_MAX_MSG_SIZE);
00075 ~Win32TransportAgent();
00076
00077
00078
00079
00080
00081 char* sendMessage(const char* msg);
00082
00083 private:
00084 BOOL isToDeflate;
00085 BOOL isFirstMessage;
00086 BOOL isToInflate;
00087
00088 char* createHttpErrorMessage(DWORD errorCode);
00089 };
00090
00092 #endif