Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: core/include/fxcrt/fx_stream.h

Issue 1471323004: Inflict PPDF_ENABLE_XFA ifdefs on XFA core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CORE_INCLUDE_FXCRT_FX_STREAM_H_ 7 #ifndef CORE_INCLUDE_FXCRT_FX_STREAM_H_
8 #define CORE_INCLUDE_FXCRT_FX_STREAM_H_ 8 #define CORE_INCLUDE_FXCRT_FX_STREAM_H_
9 9
10 #include "fx_string.h" 10 #include "fx_string.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 size_t size) override = 0; 120 size_t size) override = 0;
121 FX_BOOL WriteBlock(const void* buffer, size_t size) override { 121 FX_BOOL WriteBlock(const void* buffer, size_t size) override {
122 return WriteBlock(buffer, GetSize(), size); 122 return WriteBlock(buffer, GetSize(), size);
123 } 123 }
124 FX_BOOL Flush() override = 0; 124 FX_BOOL Flush() override = 0;
125 }; 125 };
126 126
127 IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes); 127 IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes);
128 IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD dwModes); 128 IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD dwModes);
129 129
130 #ifdef PDF_ENABLE_XFA
130 class IFX_FileAccess { 131 class IFX_FileAccess {
131 public: 132 public:
132 virtual ~IFX_FileAccess() {} 133 virtual ~IFX_FileAccess() {}
133 virtual void Release() = 0; 134 virtual void Release() = 0;
134 virtual IFX_FileAccess* Retain() = 0; 135 virtual IFX_FileAccess* Retain() = 0;
135 virtual void GetPath(CFX_WideString& wsPath) = 0; 136 virtual void GetPath(CFX_WideString& wsPath) = 0;
136 virtual IFX_FileStream* CreateFileStream(FX_DWORD dwModes) = 0; 137 virtual IFX_FileStream* CreateFileStream(FX_DWORD dwModes) = 0;
137 }; 138 };
138 IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath); 139 IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath);
139 140
141 #endif
140 class IFX_MemoryStream : public IFX_FileStream { 142 class IFX_MemoryStream : public IFX_FileStream {
141 public: 143 public:
142 virtual FX_BOOL IsConsecutive() const = 0; 144 virtual FX_BOOL IsConsecutive() const = 0;
143 145
144 virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0; 146 virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0;
145 147
146 virtual uint8_t* GetBuffer() const = 0; 148 virtual uint8_t* GetBuffer() const = 0;
147 149
148 virtual void AttachBuffer(uint8_t* pBuffer, 150 virtual void AttachBuffer(uint8_t* pBuffer,
149 size_t nSize, 151 size_t nSize,
(...skipping 13 matching lines...) Expand all
163 FX_FILESIZE GetPosition() override = 0; 165 FX_FILESIZE GetPosition() override = 0;
164 size_t ReadBlock(void* buffer, size_t size) override = 0; 166 size_t ReadBlock(void* buffer, size_t size) override = 0;
165 167
166 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; 168 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0;
167 virtual const uint8_t* GetBlockBuffer() = 0; 169 virtual const uint8_t* GetBlockBuffer() = 0;
168 virtual size_t GetBlockSize() = 0; 170 virtual size_t GetBlockSize() = 0;
169 virtual FX_FILESIZE GetBlockOffset() = 0; 171 virtual FX_FILESIZE GetBlockOffset() = 0;
170 }; 172 };
171 173
172 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_ 174 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698