| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef XFA_FGAS_CRT_FGAS_STREAM_H_ | 7 #ifndef XFA_FGAS_CRT_FGAS_STREAM_H_ |
| 8 #define XFA_FGAS_CRT_FGAS_STREAM_H_ | 8 #define XFA_FGAS_CRT_FGAS_STREAM_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/fx_stream.h" | 10 #include "core/fxcrt/fx_stream.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 class IFX_Stream { | 29 class IFX_Stream { |
| 30 public: | 30 public: |
| 31 static IFX_Stream* CreateStream(IFX_SeekableReadStream* pFileRead, | 31 static IFX_Stream* CreateStream(IFX_SeekableReadStream* pFileRead, |
| 32 uint32_t dwAccess); | 32 uint32_t dwAccess); |
| 33 static IFX_Stream* CreateStream(IFX_SeekableWriteStream* pFileWrite, | 33 static IFX_Stream* CreateStream(IFX_SeekableWriteStream* pFileWrite, |
| 34 uint32_t dwAccess); | 34 uint32_t dwAccess); |
| 35 static IFX_Stream* CreateStream(uint8_t* pData, | 35 static IFX_Stream* CreateStream(uint8_t* pData, |
| 36 int32_t length, | 36 int32_t length, |
| 37 uint32_t dwAccess); | 37 uint32_t dwAccess); |
| 38 static IFX_Stream* CreateTextStream(IFX_Stream* pBaseStream, | 38 static IFX_Stream* CreateTextStream(IFX_Stream* pBaseStream, |
| 39 FX_BOOL bDeleteOnRelease); | 39 bool bDeleteOnRelease); |
| 40 virtual ~IFX_Stream() {} | 40 virtual ~IFX_Stream() {} |
| 41 virtual void Release() = 0; | 41 virtual void Release() = 0; |
| 42 virtual IFX_Stream* Retain() = 0; | 42 virtual IFX_Stream* Retain() = 0; |
| 43 | 43 |
| 44 virtual IFX_Stream* CreateSharedStream(uint32_t dwAccess, | 44 virtual IFX_Stream* CreateSharedStream(uint32_t dwAccess, |
| 45 int32_t iOffset, | 45 int32_t iOffset, |
| 46 int32_t iLength) = 0; | 46 int32_t iLength) = 0; |
| 47 | 47 |
| 48 virtual uint32_t GetAccessModes() const = 0; | 48 virtual uint32_t GetAccessModes() const = 0; |
| 49 virtual int32_t GetLength() const = 0; | 49 virtual int32_t GetLength() const = 0; |
| 50 virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0; | 50 virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0; |
| 51 virtual int32_t GetPosition() = 0; | 51 virtual int32_t GetPosition() = 0; |
| 52 virtual FX_BOOL IsEOF() const = 0; | 52 virtual bool IsEOF() const = 0; |
| 53 virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0; | 53 virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0; |
| 54 virtual int32_t ReadString(FX_WCHAR* pStr, | 54 virtual int32_t ReadString(FX_WCHAR* pStr, |
| 55 int32_t iMaxLength, | 55 int32_t iMaxLength, |
| 56 FX_BOOL& bEOS) = 0; | 56 bool& bEOS) = 0; |
| 57 virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0; | 57 virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0; |
| 58 virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0; | 58 virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0; |
| 59 virtual void Flush() = 0; | 59 virtual void Flush() = 0; |
| 60 virtual FX_BOOL SetLength(int32_t iLength) = 0; | 60 virtual bool SetLength(int32_t iLength) = 0; |
| 61 virtual int32_t GetBOM(uint8_t bom[4]) const = 0; | 61 virtual int32_t GetBOM(uint8_t bom[4]) const = 0; |
| 62 virtual uint16_t GetCodePage() const = 0; | 62 virtual uint16_t GetCodePage() const = 0; |
| 63 virtual uint16_t SetCodePage(uint16_t wCodePage) = 0; | 63 virtual uint16_t SetCodePage(uint16_t wCodePage) = 0; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 IFX_SeekableReadStream* FX_CreateFileRead(IFX_Stream* pBaseStream, | 66 IFX_SeekableReadStream* FX_CreateFileRead(IFX_Stream* pBaseStream, |
| 67 bool bReleaseStream); | 67 bool bReleaseStream); |
| 68 | 68 |
| 69 #endif // XFA_FGAS_CRT_FGAS_STREAM_H_ | 69 #endif // XFA_FGAS_CRT_FGAS_STREAM_H_ |
| OLD | NEW |