00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _SOCKETS_HttpTransaction_H
00034 #define _SOCKETS_HttpTransaction_H
00035
00036 #include "Utility.h"
00037
00038
00039 #ifdef SOCKETS_NAMESPACE
00040 namespace SOCKETS_NAMESPACE {
00041 #endif
00042
00043
00044 class HttpTransaction
00045 {
00046 public:
00047 HttpTransaction();
00048 virtual ~HttpTransaction();
00049
00051 void SetHeader(const std::string& key, const std::string& value);
00052 void SetHeader(const std::string& key, long value);
00053 const std::string& Header(const std::string& key) const;
00054
00055 void SetAccept(const std::string& value);
00056 const std::string& Accept() const;
00057
00058 void SetAcceptCharset(const std::string& value);
00059 const std::string& AcceptCharset() const;
00060
00061 void SetAcceptEncoding(const std::string& value);
00062 const std::string& AcceptEncoding() const;
00063
00064 void SetAcceptLanguage(const std::string& value);
00065 const std::string& AcceptLanguage() const;
00066
00067 void SetConnection(const std::string& value);
00068 const std::string& Connection() const;
00069
00070 void SetContentType(const std::string& value);
00071 const std::string& ContentType() const;
00072
00073 void SetContentLength(long value);
00074 long ContentLength() const;
00075
00076 void SetHost(const std::string& value);
00077 const std::string& Host() const;
00078 const std::string HostOnly() const;
00079
00080 void SetPragma(const std::string& value);
00081 const std::string& Pragma() const;
00082
00083 void SetReferer(const std::string& value);
00084 const std::string& Referer() const;
00085
00086 void SetUserAgent(const std::string& value);
00087 const std::string& UserAgent() const;
00088
00089 const Utility::ncmap<std::string>& Headers() const;
00090
00091 virtual void Reset();
00092
00093 private:
00094 Utility::ncmap<std::string> m_header;
00095 std::string m_null;
00096
00097 };
00098
00099
00100 #ifdef SOCKETS_NAMESPACE
00101 }
00102 #endif
00103
00104 #endif // _SOCKETS_HttpTransaction_H
00105