SOAPMemFileInputStream.h

00001 // $Id: SOAPMemFileInputStream.h 21 2010-09-05 04:18:17Z cschwarz1 $
00002 
00003 #ifndef BASE_SOAP_SOAPMEMFILEINPUTSTREAM_H
00004 #define BASE_SOAP_SOAPMEMFILEINPUTSTREAM_H
00005 
00006 #include <xercesc/util/BinInputStream.hpp>
00007 #include "libppbase/base/MemFile.h"
00008 
00009 namespace base_soap {
00011 
00015     class PPBASE_SOAP_EXPORT SOAPMemFileInputStream: public xercesc::BinInputStream {
00016     public:
00018 
00022         SOAPMemFileInputStream(base::MemFile *source, bool own);
00023 
00025         ~SOAPMemFileInputStream();
00026 
00028 
00031     #if XERCESC_V3
00032         XMLFilePos curPos() const;
00033     #else
00034         unsigned int curPos() const;
00035     #endif
00036 
00038 
00043     #if XERCESC_V3
00044         XMLSize_t readBytes(XMLByte *const toFill, const XMLSize_t maxToRead);
00045     #else
00046         unsigned int readBytes(XMLByte *const toFill, const unsigned int maxToRead);
00047     #endif
00048 
00049     #if XERCESC_V3
00050 
00055         const XMLCh* getContentType() const;
00056     #endif
00057 
00058     private:
00059         bool           _own;      
00060         base::MemFile *_source;   
00061     };
00062 }
00063 
00064 #endif