OLD | NEW |
---|---|
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 | 5 |
6 /* From ppb_file_ref.idl modified Thu Mar 7 12:02:53 2013. */ | 6 /* From ppb_file_ref.idl modified Thu May 2 15:33:16 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_FILE_REF_H_ | 8 #ifndef PPAPI_C_PPB_FILE_REF_H_ |
9 #define PPAPI_C_PPB_FILE_REF_H_ | 9 #define PPAPI_C_PPB_FILE_REF_H_ |
10 | 10 |
11 #include "ppapi/c/pp_array_output.h" | |
11 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/pp_file_info.h" | 14 #include "ppapi/c/pp_file_info.h" |
14 #include "ppapi/c/pp_macros.h" | 15 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
17 #include "ppapi/c/pp_time.h" | 18 #include "ppapi/c/pp_time.h" |
18 #include "ppapi/c/pp_var.h" | 19 #include "ppapi/c/pp_var.h" |
19 | 20 |
20 #define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0" | 21 #define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 * @param[in] new_file_ref A <code>PP_Resource</code> corresponding to a new | 172 * @param[in] new_file_ref A <code>PP_Resource</code> corresponding to a new |
172 * file reference. | 173 * file reference. |
173 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 174 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
174 * completion of Rename(). | 175 * completion of Rename(). |
175 * | 176 * |
176 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 177 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
177 */ | 178 */ |
178 int32_t (*Rename)(PP_Resource file_ref, | 179 int32_t (*Rename)(PP_Resource file_ref, |
179 PP_Resource new_file_ref, | 180 PP_Resource new_file_ref, |
180 struct PP_CompletionCallback callback); | 181 struct PP_CompletionCallback callback); |
181 /* | 182 /** |
182 * Query() queries info about a file or directory. You must have access to | 183 * Query() queries info about a file or directory. You must have access to |
183 * read this file or directory if it exists in the external filesystem. | 184 * read this file or directory if it exists in the external filesystem. |
184 * | 185 * |
185 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file | 186 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file |
186 * reference. | 187 * reference. |
187 * @param[out] info A pointer to a <code>PP_FileInfo</code> which will be | 188 * @param[out] info A pointer to a <code>PP_FileInfo</code> which will be |
188 * populated with information about the file or directory. | 189 * populated with information about the file or directory. |
189 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 190 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
190 * completion of Query(). | 191 * completion of Query(). |
191 * | 192 * |
192 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 193 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
193 */ | 194 */ |
194 int32_t (*Query)(PP_Resource file_ref, | 195 int32_t (*Query)(PP_Resource file_ref, |
195 struct PP_FileInfo* info, | 196 struct PP_FileInfo* info, |
196 struct PP_CompletionCallback callback); | 197 struct PP_CompletionCallback callback); |
198 /** | |
199 * READS all entries in a directory. | |
dmichael (off chromium)
2013/05/02 23:20:43
why all-caps?
hamaji
2013/05/02 23:36:34
Done.
| |
200 * | |
201 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a directory | |
202 * reference. | |
203 * @param[in] output An output array which will receive | |
204 * <code>PP_DirectoryEntry</code> objects on success. | |
205 * @param[in] callback A <code>PP_CompletionCallback</code> to run on | |
206 * completion. | |
207 * | |
208 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
209 */ | |
210 int32_t (*ReadDirectoryEntries)(PP_Resource file_ref, | |
211 struct PP_ArrayOutput output, | |
212 struct PP_CompletionCallback callback); | |
197 }; | 213 }; |
198 | 214 |
199 typedef struct PPB_FileRef_1_1 PPB_FileRef; | 215 typedef struct PPB_FileRef_1_1 PPB_FileRef; |
200 | 216 |
201 struct PPB_FileRef_1_0 { | 217 struct PPB_FileRef_1_0 { |
202 PP_Resource (*Create)(PP_Resource file_system, const char* path); | 218 PP_Resource (*Create)(PP_Resource file_system, const char* path); |
203 PP_Bool (*IsFileRef)(PP_Resource resource); | 219 PP_Bool (*IsFileRef)(PP_Resource resource); |
204 PP_FileSystemType (*GetFileSystemType)(PP_Resource file_ref); | 220 PP_FileSystemType (*GetFileSystemType)(PP_Resource file_ref); |
205 struct PP_Var (*GetName)(PP_Resource file_ref); | 221 struct PP_Var (*GetName)(PP_Resource file_ref); |
206 struct PP_Var (*GetPath)(PP_Resource file_ref); | 222 struct PP_Var (*GetPath)(PP_Resource file_ref); |
(...skipping 10 matching lines...) Expand all Loading... | |
217 int32_t (*Rename)(PP_Resource file_ref, | 233 int32_t (*Rename)(PP_Resource file_ref, |
218 PP_Resource new_file_ref, | 234 PP_Resource new_file_ref, |
219 struct PP_CompletionCallback callback); | 235 struct PP_CompletionCallback callback); |
220 }; | 236 }; |
221 /** | 237 /** |
222 * @} | 238 * @} |
223 */ | 239 */ |
224 | 240 |
225 #endif /* PPAPI_C_PPB_FILE_REF_H_ */ | 241 #endif /* PPAPI_C_PPB_FILE_REF_H_ */ |
226 | 242 |
OLD | NEW |