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_DEV_PPB_FILE_REF_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ |
6 #define PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/dev/pp_file_info_dev.h" | 8 #include "ppapi/c/dev/pp_file_info_dev.h" |
9 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
12 #include "ppapi/c/pp_var.h" | 12 #include "ppapi/c/pp_var.h" |
13 | 13 |
| 14 struct PP_CompletionCallback; |
| 15 |
14 #define PPB_FILEREF_DEV_INTERFACE "PPB_FileRef(Dev);0.7" | 16 #define PPB_FILEREF_DEV_INTERFACE "PPB_FileRef(Dev);0.7" |
15 | 17 |
16 // A FileRef is a "weak pointer" to a file in a file system. It contains a | 18 // A FileRef is a "weak pointer" to a file in a file system. It contains a |
17 // PP_FileSystemType identifier and a file path string. | 19 // PP_FileSystemType identifier and a file path string. |
18 struct PPB_FileRef_Dev { | 20 struct PPB_FileRef_Dev { |
19 // Creates a weak pointer to a file in the given filesystem. File paths are | 21 // Creates a weak pointer to a file in the given filesystem. File paths are |
20 // POSIX style. Returns 0 if the path is malformed. | 22 // POSIX style. Returns 0 if the path is malformed. |
21 PP_Resource (*Create)(PP_Resource file_system, const char* path); | 23 PP_Resource (*Create)(PP_Resource file_system, const char* path); |
22 | 24 |
23 // Returns PP_TRUE if the given resource is a FileRef. Returns PP_FALSE if the | 25 // Returns PP_TRUE if the given resource is a FileRef. Returns PP_FALSE if the |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Rename a file or directory. file_ref and new_file_ref must both refer to | 71 // Rename a file or directory. file_ref and new_file_ref must both refer to |
70 // files in the same filesystem. It is an error to rename a file or | 72 // files in the same filesystem. It is an error to rename a file or |
71 // directory that is in use. It is not valid to rename a file in the | 73 // directory that is in use. It is not valid to rename a file in the |
72 // external filesystem. | 74 // external filesystem. |
73 int32_t (*Rename)(PP_Resource file_ref, | 75 int32_t (*Rename)(PP_Resource file_ref, |
74 PP_Resource new_file_ref, | 76 PP_Resource new_file_ref, |
75 struct PP_CompletionCallback callback); | 77 struct PP_CompletionCallback callback); |
76 }; | 78 }; |
77 | 79 |
78 #endif /* PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ */ | 80 #endif /* PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ */ |
79 | |
OLD | NEW |