OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_THUNK_PPB_FLASH_FILE_API_H_ |
| 6 #define PPAPI_THUNK_PPB_FLASH_FILE_API_H_ |
| 7 |
| 8 #include "ppapi/c/pp_bool.h" |
| 9 #include "ppapi/c/pp_stdint.h" |
| 10 #include "ppapi/c/private/pp_file_handle.h" |
| 11 #include "ppapi/c/private/ppb_flash_file.h" |
| 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 13 |
| 14 struct PP_FileInfo; |
| 15 |
| 16 namespace ppapi { |
| 17 namespace thunk { |
| 18 |
| 19 class PPAPI_THUNK_EXPORT PPB_Flash_File_API { |
| 20 public: |
| 21 virtual ~PPB_Flash_File_API() {} |
| 22 |
| 23 // FlashFile_ModuleLocal. |
| 24 virtual int32_t OpenFile(PP_Instance instance, |
| 25 const char* path, |
| 26 int32_t mode, |
| 27 PP_FileHandle* file) = 0; |
| 28 virtual int32_t RenameFile(PP_Instance instance, |
| 29 const char* path_from, |
| 30 const char* path_to) = 0; |
| 31 virtual int32_t DeleteFileOrDir(PP_Instance instance, |
| 32 const char* path, |
| 33 PP_Bool recursive) = 0; |
| 34 virtual int32_t CreateDir(PP_Instance instance, const char* path) = 0; |
| 35 virtual int32_t QueryFile(PP_Instance instance, |
| 36 const char* path, |
| 37 PP_FileInfo* info) = 0; |
| 38 virtual int32_t GetDirContents(PP_Instance instance, |
| 39 const char* path, |
| 40 PP_DirContents_Dev** contents) = 0; |
| 41 virtual void FreeDirContents(PP_Instance instance, |
| 42 PP_DirContents_Dev* contents) = 0; |
| 43 virtual int32_t CreateTemporaryFile(PP_Instance instance, |
| 44 PP_FileHandle* file) = 0; |
| 45 |
| 46 // FlashFile_FileRef. |
| 47 virtual int32_t OpenFileRef(PP_Instance instance, |
| 48 PP_Resource file_ref, |
| 49 int32_t mode, |
| 50 PP_FileHandle* file) = 0; |
| 51 virtual int32_t QueryFileRef(PP_Instance instance, |
| 52 PP_Resource file_ref, |
| 53 PP_FileInfo* info) = 0; |
| 54 }; |
| 55 |
| 56 } // namespace thunk |
| 57 } // namespace ppapi |
| 58 |
| 59 #endif // PPAPI_THUNK_PPB_FLASH_FILE_API_H_ |
OLD | NEW |