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 _FX_STREAM_H_ | 7 #ifndef _FX_STREAM_H_ |
8 #define _FX_STREAM_H_ | 8 #define _FX_STREAM_H_ |
9 #ifndef _FX_MEMORY_H_ | 9 #ifndef _FX_MEMORY_H_ |
10 #include "fx_memory.h" | 10 #include "fx_memory.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include <unistd.h> | 23 #include <unistd.h> |
24 #include <sys/stat.h> | 24 #include <sys/stat.h> |
25 #ifndef O_BINARY | 25 #ifndef O_BINARY |
26 #define O_BINARY 0 | 26 #define O_BINARY 0 |
27 #endif | 27 #endif |
28 #ifndef O_LARGEFILE | 28 #ifndef O_LARGEFILE |
29 #define O_LARGEFILE 0 | 29 #define O_LARGEFILE 0 |
30 #endif | 30 #endif |
31 #define FX_FILESIZE off_t | 31 #define FX_FILESIZE off_t |
32 #endif | 32 #endif |
33 typedef base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE; | |
34 #define FX_GETBYTEOFFSET32(a) 0 | 33 #define FX_GETBYTEOFFSET32(a) 0 |
35 #define FX_GETBYTEOFFSET40(a) 0 | 34 #define FX_GETBYTEOFFSET40(a) 0 |
36 #define FX_GETBYTEOFFSET48(a) 0 | 35 #define FX_GETBYTEOFFSET48(a) 0 |
37 #define FX_GETBYTEOFFSET56(a) 0 | 36 #define FX_GETBYTEOFFSET56(a) 0 |
38 #define FX_GETBYTEOFFSET24(a) ((FX_BYTE)(a>>24)) | 37 #define FX_GETBYTEOFFSET24(a) ((FX_BYTE)(a>>24)) |
39 #define FX_GETBYTEOFFSET16(a) ((FX_BYTE)(a>>16)) | 38 #define FX_GETBYTEOFFSET16(a) ((FX_BYTE)(a>>16)) |
40 #define FX_GETBYTEOFFSET8(a) ((FX_BYTE)(a>>8)) | 39 #define FX_GETBYTEOFFSET8(a) ((FX_BYTE)(a>>8)) |
41 #define FX_GETBYTEOFFSET0(a) ((FX_BYTE)(a)) | 40 #define FX_GETBYTEOFFSET0(a) ((FX_BYTE)(a)) |
42 #define FX_FILEMODE_Write 0 | 41 #define FX_FILEMODE_Write 0 |
43 #define FX_FILEMODE_ReadOnly 1 | 42 #define FX_FILEMODE_ReadOnly 1 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 191 |
193 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE)
= 0; | 192 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE)
= 0; |
194 | 193 |
195 virtual FX_LPCBYTE GetBlockBuffer() = 0; | 194 virtual FX_LPCBYTE GetBlockBuffer() = 0; |
196 | 195 |
197 virtual size_t GetBlockSize() = 0; | 196 virtual size_t GetBlockSize() = 0; |
198 | 197 |
199 virtual FX_FILESIZE GetBlockOffset() = 0; | 198 virtual FX_FILESIZE GetBlockOffset() = 0; |
200 }; | 199 }; |
201 #endif | 200 #endif |
OLD | NEW |