00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #if !defined(XMLNETACCESSOR_HPP)
00022 #define XMLNETACCESSOR_HPP
00023 
00024 #include <xercesc/util/XMLURL.hpp>
00025 #include <xercesc/util/XMLException.hpp>
00026 
00027 XERCES_CPP_NAMESPACE_BEGIN
00028 
00029 class BinInputStream;
00030 
00031 
00032 class  XMLNetHTTPInfo
00033 {
00034 public:
00035     XMLNetHTTPInfo();
00036 
00037     typedef enum {
00038         GET,
00039         PUT,
00040         POST
00041     } HTTPMethod;
00042 
00043     
00044     
00045     
00046     
00047     
00048     
00049     
00050     
00051     
00052     
00053     
00054     
00055     
00056     
00057     
00058     
00059     
00060     
00061     
00062     
00063     HTTPMethod      fHTTPMethod;
00064     const char*     fHeaders;
00065     int             fHeadersLen;
00066     const char*     fPayload;
00067     int             fPayloadLen;
00068 };
00069 
00070 inline XMLNetHTTPInfo::XMLNetHTTPInfo()
00071 :fHTTPMethod(XMLNetHTTPInfo::GET),
00072  fHeaders(0),
00073  fHeadersLen(0),
00074  fPayload(0),
00075  fPayloadLen(0)
00076 {
00077 }
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 class  XMLNetAccessor : public XMemory
00094 {
00095 public :
00096     
00097     
00098     
00099     virtual ~XMLNetAccessor()
00100     {
00101     }
00102 
00103 
00104     
00105     
00106     
00107     virtual const XMLCh* getId() const = 0;
00108 
00109     virtual BinInputStream* makeNew
00110     (
00111         const   XMLURL&                 urlSrc,
00112         const   XMLNetHTTPInfo*         httpInfo=0
00113     ) = 0;
00114 
00115 
00116 protected :
00117     
00118     
00119     
00120     XMLNetAccessor()
00121     {
00122     }
00123 
00124 
00125 private :
00126     
00127     
00128     
00129     XMLNetAccessor(const XMLNetAccessor&);
00130     XMLNetAccessor& operator=(const XMLNetAccessor&);
00131 };
00132 
00133 MakeXMLException(NetAccessorException, )
00134 
00135 XERCES_CPP_NAMESPACE_END
00136 
00137 #endif