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 _FXCRT_PLATFORMS_ | 7 #ifndef _FXCRT_PLATFORMS_ |
8 #define _FXCRT_PLATFORMS_ | 8 #define _FXCRT_PLATFORMS_ |
9 #include "extension.h" | 9 #include "extension.h" |
10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ |
11 void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_ByteString &bsMode); | 11 void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_ByteString &bsMode); |
12 void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_WideString &wsMode); | 12 void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_WideString &wsMode); |
13 class CFXCRT_FileAccess_CRT : public IFXCRT_FileAccess, public CFX_Object | 13 class CFXCRT_FileAccess_CRT : public IFXCRT_FileAccess |
14 { | 14 { |
15 public: | 15 public: |
16 CFXCRT_FileAccess_CRT(); | 16 CFXCRT_FileAccess_CRT(); |
17 virtual ~CFXCRT_FileAccess_CRT(); | 17 virtual ~CFXCRT_FileAccess_CRT(); |
18 virtual FX_BOOL Open(FX_BSTR fileName, FX_DWORD dwMode); | 18 virtual FX_BOOL Open(FX_BSTR fileName, FX_DWORD dwMode); |
19 virtual FX_BOOL Open(FX_WSTR fileName, FX_DWORD dwMode); | 19 virtual FX_BOOL Open(FX_WSTR fileName, FX_DWORD dwMode); |
20 virtual void Close(); | 20 virtual void Close(); |
21 virtual void Release(); | 21 virtual void Release(); |
22 virtual FX_FILESIZE GetSize() const; | 22 virtual FX_FILESIZE GetSize() const; |
23 virtual FX_FILESIZE GetPosition() const; | 23 virtual FX_FILESIZE GetPosition() const; |
24 virtual FX_FILESIZE SetPosition(FX_FILESIZE pos); | 24 virtual FX_FILESIZE SetPosition(FX_FILESIZE pos); |
25 virtual size_t Read(void* pBuffer, size_t szBuffer); | 25 virtual size_t Read(void* pBuffer, size_t szBuffer); |
26 virtual size_t Write(const void* pBuffer, size_t szBuffer); | 26 virtual size_t Write(const void* pBuffer, size_t szBuffer); |
27 virtual size_t ReadPos(void* pBuffer, size_t szBuffer, FX_FILES
IZE pos); | 27 virtual size_t ReadPos(void* pBuffer, size_t szBuffer, FX_FILES
IZE pos); |
28 virtual size_t WritePos(const void* pBuffer, size_t szBuffer, F
X_FILESIZE pos); | 28 virtual size_t WritePos(const void* pBuffer, size_t szBuffer, F
X_FILESIZE pos); |
29 virtual FX_BOOL Flush(); | 29 virtual FX_BOOL Flush(); |
30 virtual FX_BOOL Truncate(FX_FILESIZE szFile); | 30 virtual FX_BOOL Truncate(FX_FILESIZE szFile); |
31 protected: | 31 protected: |
32 FXSYS_FILE* m_hFile; | 32 FXSYS_FILE* m_hFile; |
33 }; | 33 }; |
34 #endif | 34 #endif |
35 #endif | 35 #endif |
OLD | NEW |