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 Wed May 1 10:06:13 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 /* Reads all entries in a directory. |
| 199 * |
| 200 * @param[in] file_ref A <code>PP_Resource</code> corresponding to a directory |
| 201 * reference. |
| 202 * @param[in] output An output array which will receive |
| 203 * <code>PP_DirectoryEntry</code> objects on success. |
| 204 * @param[in] callback A <code>PP_CompletionCallback</code> to run on |
| 205 * completion. |
| 206 * |
| 207 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 208 */ |
| 209 int32_t (*ReadEntries)(PP_Resource file_ref, |
| 210 struct PP_ArrayOutput output, |
| 211 struct PP_CompletionCallback callback); |
197 }; | 212 }; |
198 | 213 |
199 typedef struct PPB_FileRef_1_1 PPB_FileRef; | 214 typedef struct PPB_FileRef_1_1 PPB_FileRef; |
200 | 215 |
201 struct PPB_FileRef_1_0 { | 216 struct PPB_FileRef_1_0 { |
202 PP_Resource (*Create)(PP_Resource file_system, const char* path); | 217 PP_Resource (*Create)(PP_Resource file_system, const char* path); |
203 PP_Bool (*IsFileRef)(PP_Resource resource); | 218 PP_Bool (*IsFileRef)(PP_Resource resource); |
204 PP_FileSystemType (*GetFileSystemType)(PP_Resource file_ref); | 219 PP_FileSystemType (*GetFileSystemType)(PP_Resource file_ref); |
205 struct PP_Var (*GetName)(PP_Resource file_ref); | 220 struct PP_Var (*GetName)(PP_Resource file_ref); |
206 struct PP_Var (*GetPath)(PP_Resource file_ref); | 221 struct PP_Var (*GetPath)(PP_Resource file_ref); |
(...skipping 10 matching lines...) Expand all Loading... |
217 int32_t (*Rename)(PP_Resource file_ref, | 232 int32_t (*Rename)(PP_Resource file_ref, |
218 PP_Resource new_file_ref, | 233 PP_Resource new_file_ref, |
219 struct PP_CompletionCallback callback); | 234 struct PP_CompletionCallback callback); |
220 }; | 235 }; |
221 /** | 236 /** |
222 * @} | 237 * @} |
223 */ | 238 */ |
224 | 239 |
225 #endif /* PPAPI_C_PPB_FILE_REF_H_ */ | 240 #endif /* PPAPI_C_PPB_FILE_REF_H_ */ |
226 | 241 |
OLD | NEW |