OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ | 5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ |
6 #define PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ | 6 #define PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ |
7 | 7 |
8 #ifdef _WIN32 | 8 #ifdef _WIN32 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const char* path, | 81 const char* path, |
82 struct PP_DirContents_Dev** contents); | 82 struct PP_DirContents_Dev** contents); |
83 | 83 |
84 // Frees the data allocated by GetDirContents. | 84 // Frees the data allocated by GetDirContents. |
85 void (*FreeDirContents)(PP_Instance instance, | 85 void (*FreeDirContents)(PP_Instance instance, |
86 struct PP_DirContents_Dev* contents); | 86 struct PP_DirContents_Dev* contents); |
87 }; | 87 }; |
88 | 88 |
89 // PPB_Flash_File_FileRef ------------------------------------------------------ | 89 // PPB_Flash_File_FileRef ------------------------------------------------------ |
90 | 90 |
91 #define PPB_FLASH_FILE_FILEREF_INTERFACE "PPB_Flash_File_FileRef;1" | 91 #define PPB_FLASH_FILE_FILEREF_INTERFACE "PPB_Flash_File_FileRef;2" |
92 | 92 |
93 // This interface provides (for Flash) synchronous access to files whose paths | 93 // This interface provides (for Flash) synchronous access to files whose paths |
94 // are given by a Pepper FileRef. Such FileRefs are typically obtained via the | 94 // are given by a Pepper FileRef. Such FileRefs are typically obtained via the |
95 // Pepper file chooser. | 95 // Pepper file chooser. |
96 struct PPB_Flash_File_FileRef { | 96 struct PPB_Flash_File_FileRef { |
97 // The functions below correspond exactly to the ones in the module-local file | 97 // The functions below correspond exactly to their module-local counterparts |
98 // interface (except in taking FileRefs instead of paths, of course). | 98 // (except in taking FileRefs instead of paths, of course). We omit the |
| 99 // functionality which we do not provide for FileRefs. |
99 int32_t (*OpenFile)(PP_Resource file_ref_id, | 100 int32_t (*OpenFile)(PP_Resource file_ref_id, |
100 int32_t mode, | 101 int32_t mode, |
101 PP_FileHandle* file); | 102 PP_FileHandle* file); |
102 int32_t (*RenameFile)(PP_Resource from_file_ref_id, | |
103 PP_Resource to_file_ref_id); | |
104 int32_t (*DeleteFileOrDir)(PP_Resource file_ref_id, | |
105 PP_Bool recursive); | |
106 int32_t (*CreateDir)(PP_Resource file_ref_id); | |
107 int32_t (*QueryFile)(PP_Resource file_ref_id, | 103 int32_t (*QueryFile)(PP_Resource file_ref_id, |
108 struct PP_FileInfo_Dev* info); | 104 struct PP_FileInfo_Dev* info); |
109 int32_t (*GetDirContents)(PP_Resource file_ref_id, | |
110 struct PP_DirContents_Dev** contents); | |
111 void (*FreeDirContents)(PP_Instance instance, | |
112 struct PP_DirContents_Dev* contents); | |
113 }; | 105 }; |
114 | 106 |
115 #endif // PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ | 107 #endif // PPAPI_C_PRIVATE_PPB_FLASH_FILE_H_ |
OLD | NEW |