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.
5 #ifndef PPAPI_THUNK_PPB_FLASH_FILE_API_H_
6 #define PPAPI_THUNK_PPB_FLASH_FILE_API_H_
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/shared_impl/singleton_resource_id.h"
13 #include "ppapi/thunk/ppapi_thunk_export.h"
20 class PPAPI_THUNK_EXPORT PPB_Flash_File_API
{
22 virtual ~PPB_Flash_File_API() {}
24 // FlashFile_ModuleLocal.
25 virtual int32_t OpenFile(PP_Instance instance
,
28 PP_FileHandle
* file
) = 0;
29 virtual int32_t RenameFile(PP_Instance instance
,
30 const char* path_from
,
31 const char* path_to
) = 0;
32 virtual int32_t DeleteFileOrDir(PP_Instance instance
,
34 PP_Bool recursive
) = 0;
35 virtual int32_t CreateDir(PP_Instance instance
, const char* path
) = 0;
36 virtual int32_t QueryFile(PP_Instance instance
,
38 PP_FileInfo
* info
) = 0;
39 virtual int32_t GetDirContents(PP_Instance instance
,
41 PP_DirContents_Dev
** contents
) = 0;
42 virtual void FreeDirContents(PP_Instance instance
,
43 PP_DirContents_Dev
* contents
) = 0;
44 virtual int32_t CreateTemporaryFile(PP_Instance instance
,
45 PP_FileHandle
* file
) = 0;
48 virtual int32_t OpenFileRef(PP_Instance instance
,
51 PP_FileHandle
* file
) = 0;
52 virtual int32_t QueryFileRef(PP_Instance instance
,
54 PP_FileInfo
* info
) = 0;
56 static const SingletonResourceID kSingletonResourceID
=
57 FLASH_FILE_SINGLETON_ID
;
63 #endif // PPAPI_THUNK_PPB_FLASH_FILE_API_H_