SOAPMemFileInputSource.h

00001 // $Id: SOAPMemFileInputSource.h 21 2010-09-05 04:18:17Z cschwarz1 $
00002 
00003 #ifndef BASE_SOAP_SOAPMEMFILEINPUTSOURCE_H
00004 #define BASE_SOAP_SOAPMEMFILEINPUTSOURCE_H
00005 
00006 #if XERCESC_V3
00007     #include <xercesc/sax/InputSource.hpp>
00008 #else
00009     #include <xercesc/dom/DOMInputSource.hpp>
00010 #endif
00011 #include <xercesc/util/BinInputStream.hpp>
00012 #include "libppbase/base/MemFile.h"
00013 
00014 namespace base_soap {
00016 
00020     class PPBASE_SOAP_EXPORT SOAPMemFileInputSource:
00021     #if XERCESC_V3
00022         public xercesc::InputSource
00023     #else
00024         public xercesc::DOMInputSource
00025     #endif
00026     {
00027     public:
00029 
00033         SOAPMemFileInputSource(base::MemFile *source, bool own);
00034 
00036         ~SOAPMemFileInputSource();
00037 
00038     #ifndef XERCESC_V3
00039 
00040 
00044         const XMLCh *getBaseURI() const;
00045 
00047 
00051         const XMLCh *getEncoding() const;
00052 
00054 
00057         bool getIssueFatalErrorIfNotFound() const;
00058 
00060 
00063         const XMLCh *getPublicId() const;
00064 
00066 
00070         const XMLCh *getSystemId() const;
00071     #endif
00072 
00074 
00079         xercesc::BinInputStream *makeStream() const;
00080 
00081     #ifndef XERCESC_V3
00082 
00083 
00086         void release();
00087 
00089 
00093         void setBaseURI(const XMLCh *const baseURI);
00094 
00096 
00101         void setEncoding(const XMLCh *const encodingStr);
00102 
00104 
00109         void setIssueFatalErrorIfNotFound(const bool flag);
00110 
00112 
00116         void setPublicId(const XMLCh *const publicId);
00117 
00119 
00124         void setSystemId(const XMLCh *const systemId);
00125     #endif
00126 
00127     private:
00128     #ifndef XERCESC_V3
00129         XMLCh                *_baseuri;      
00130         XMLCh                *_encoding;     
00131         bool                  _issuefatal;   
00132         XMLCh                *_publicid;     
00133         XMLCh                *_systemid;     
00134     #endif
00135         bool                  _own;          
00136         base::MemFile        *_source;       
00137     };
00138 }
00139 
00140 #endif