00001
#ifndef XCT_XSOAP3_HTTP_CHANNEL_H
00002
#define XCT_XSOAP3_HTTP_CHANNEL_H
00003
00004
00005
#include <map>
00006
#include <xct/socket/Socket.hpp>
00007
#include <xct/socket/SocketStream.hpp>
00008
00009
#include "CommunicationChannel.hpp"
00010
00011
namespace xsoap {
00012
00014 class HttpClientChannel :
00015
public CommunicationChannel
00016 {
00017
public:
00018
enum statesEnum {
00019 PROTOCOL,
00020 HOST,
00021 PORT,
00022 LOCATION
00023 };
00024
00025
enum httpHeaders {
00026 HTTP_SIGNATURE,
00027 HTTP_RETURN_CODE,
00028 HTTP_END_HEADERS
00029 };
00030
00031
HttpClientChannel(std::string location);
00032 ~
HttpClientChannel(
void);
00033
00034
HttpClientChannel& operator<<(
const std::string& str);
00035
void send(
const std::string& str);
00036
void receive(std::string&);
00037
void flush();
00038
void setRequestProperty(std::string key, std::string val);
00039 std::string readLine(std::string buffer,
int *index);
00040
00041
void shutDown();
00042
00043
00044
private:
00045
00046 xct::socket::Socket *socket;
00047
00048 std::string m_buf;
00049 std::string m_host;
00050 std::string m_port;
00051 std::string m_path;
00052
typedef std::map<std::string,std::string> mss;
00053 mss m_properties;
00054 };
00055
00056 }
00057
00058
#endif
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073