summaryrefslogtreecommitdiff
path: root/core/fxcrt/extension.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-01 13:54:42 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-01 13:54:42 -0800
commitbea049784abf7c32d0b9758fc77d0e601d5c232b (patch)
tree8cb30eec48538191531ead20100d4e696fa6ebef /core/fxcrt/extension.h
parentaeeb6d19d1fc794de482826ecaf8ec2fd9e92d0e (diff)
downloadpdfium-bea049784abf7c32d0b9758fc77d0e601d5c232b.tar.xz
Make more concrete stream classes private to .cpp files
Review-Url: https://codereview.chromium.org/2545653003
Diffstat (limited to 'core/fxcrt/extension.h')
-rw-r--r--core/fxcrt/extension.h80
1 files changed, 0 insertions, 80 deletions
diff --git a/core/fxcrt/extension.h b/core/fxcrt/extension.h
index ca2fc3c5b7..b62f67772b 100644
--- a/core/fxcrt/extension.h
+++ b/core/fxcrt/extension.h
@@ -34,86 +34,6 @@ class IFXCRT_FileAccess {
virtual bool Truncate(FX_FILESIZE szFile) = 0;
};
-#ifdef PDF_ENABLE_XFA
-class CFX_CRTFileAccess : public IFX_FileAccess {
- public:
- CFX_CRTFileAccess();
- ~CFX_CRTFileAccess() override;
-
- // IFX_FileAccess
- void Release() override;
- IFX_FileAccess* Retain() override;
- void GetPath(CFX_WideString& wsPath) override;
- IFX_SeekableStream* CreateFileStream(uint32_t dwModes) override;
-
- bool Init(const CFX_WideStringC& wsPath);
-
- protected:
- CFX_WideString m_path;
- uint32_t m_RefCount;
-};
-#endif // PDF_ENABLE_XFA
-
-class CFX_CRTFileStream final : public IFX_SeekableStream {
- public:
- explicit CFX_CRTFileStream(std::unique_ptr<IFXCRT_FileAccess> pFA);
- ~CFX_CRTFileStream() override;
-
- // IFX_SeekableStream:
- IFX_SeekableStream* Retain() override;
- void Release() override;
- FX_FILESIZE GetSize() override;
- bool IsEOF() override;
- FX_FILESIZE GetPosition() override;
- bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
- size_t ReadBlock(void* buffer, size_t size) override;
- bool WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override;
- bool Flush() override;
-
- protected:
- std::unique_ptr<IFXCRT_FileAccess> m_pFile;
- uint32_t m_dwCount;
-};
-
-#define FX_MEMSTREAM_BlockSize (64 * 1024)
-#define FX_MEMSTREAM_Consecutive 0x01
-#define FX_MEMSTREAM_TakeOver 0x02
-
-class CFX_MemoryStream final : public IFX_MemoryStream {
- public:
- explicit CFX_MemoryStream(bool bConsecutive);
- CFX_MemoryStream(uint8_t* pBuffer, size_t nSize, bool bTakeOver);
- ~CFX_MemoryStream() override;
-
- // IFX_MemoryStream
- IFX_SeekableStream* Retain() override;
- void Release() override;
- FX_FILESIZE GetSize() override;
- bool IsEOF() override;
- FX_FILESIZE GetPosition() override;
- bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
- size_t ReadBlock(void* buffer, size_t size) override;
- bool WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override;
- bool Flush() override;
- bool IsConsecutive() const override;
- void EstimateSize(size_t nInitSize, size_t nGrowSize) override;
- uint8_t* GetBuffer() const override;
- void AttachBuffer(uint8_t* pBuffer,
- size_t nSize,
- bool bTakeOver = false) override;
- void DetachBuffer() override;
-
- protected:
- CFX_ArrayTemplate<uint8_t*> m_Blocks;
- uint32_t m_dwCount;
- size_t m_nTotalSize;
- size_t m_nCurSize;
- size_t m_nCurPos;
- size_t m_nGrowSize;
- uint32_t m_dwFlags;
- bool ExpandBlocks(size_t size);
-};
-
#ifdef __cplusplus
extern "C" {
#endif