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

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

Issue 1264423003: FPDF_Creator can only create file through embedder-supplied callback. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 months 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
« no previous file with comments | « core/include/fxcrt/fx_basic.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 virtual FX_BOOL Flush() = 0; 72 virtual FX_BOOL Flush() = 0;
73 73
74 virtual FX_BOOL WriteBlock(const void* pData, 74 virtual FX_BOOL WriteBlock(const void* pData,
75 FX_FILESIZE offset, 75 FX_FILESIZE offset,
76 size_t size) = 0; 76 size_t size) = 0;
77 virtual FX_BOOL WriteBlock(const void* pData, size_t size) { 77 virtual FX_BOOL WriteBlock(const void* pData, size_t size) {
78 return WriteBlock(pData, GetSize(), size); 78 return WriteBlock(pData, GetSize(), size);
79 } 79 }
80 }; 80 };
81 IFX_FileWrite* FX_CreateFileWrite(const FX_CHAR* filename);
82 IFX_FileWrite* FX_CreateFileWrite(const FX_WCHAR* filename);
83 class IFX_StreamRead { 81 class IFX_StreamRead {
84 public: 82 public:
85 virtual ~IFX_StreamRead() {} 83 virtual ~IFX_StreamRead() {}
86 84
87 virtual void Release() = 0; 85 virtual void Release() = 0;
88 86
89 virtual FX_BOOL IsEOF() = 0; 87 virtual FX_BOOL IsEOF() = 0;
90 88
91 virtual FX_FILESIZE GetPosition() = 0; 89 virtual FX_FILESIZE GetPosition() = 0;
92 90
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; 170 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0;
173 171
174 virtual const uint8_t* GetBlockBuffer() = 0; 172 virtual const uint8_t* GetBlockBuffer() = 0;
175 173
176 virtual size_t GetBlockSize() = 0; 174 virtual size_t GetBlockSize() = 0;
177 175
178 virtual FX_FILESIZE GetBlockOffset() = 0; 176 virtual FX_FILESIZE GetBlockOffset() = 0;
179 }; 177 };
180 178
181 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_ 179 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_basic.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698