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_PPB_FILE_REF_H_ | 5 #ifndef PPAPI_C_PPB_FILE_REF_H_ |
6 #define PPAPI_C_PPB_FILE_REF_H_ | 6 #define PPAPI_C_PPB_FILE_REF_H_ |
7 | 7 |
8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_file_info.h" | 9 #include "ppapi/c/pp_file_info.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; | 14 struct PP_CompletionCallback; |
15 | 15 |
16 #define PPB_FILEREF_INTERFACE_0_8 "PPB_FileRef;0.8" | 16 #define PPB_FILEREF_INTERFACE_0_9 "PPB_FileRef;0.9" |
17 #define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_0_8 | 17 #define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_0_9 |
18 | 18 |
19 // A FileRef is a "weak pointer" to a file in a file system. It contains a | 19 // A FileRef is a "weak pointer" to a file in a file system. It contains a |
20 // PP_FileSystemType identifier and a file path string. | 20 // PP_FileSystemType identifier and a file path string. |
21 struct PPB_FileRef { | 21 struct PPB_FileRef { |
22 // Creates a weak pointer to a file in the given filesystem. File paths are | 22 // Creates a weak pointer to a file in the given filesystem. File paths are |
23 // POSIX style. Returns 0 if the path is malformed. | 23 // POSIX style. Returns 0 if the path is malformed. |
24 PP_Resource (*Create)(PP_Resource file_system, const char* path); | 24 PP_Resource (*Create)(PP_Resource file_system, const char* path); |
25 | 25 |
26 // Returns PP_TRUE if the given resource is a FileRef. Returns PP_FALSE if the | 26 // Returns PP_TRUE if the given resource is a FileRef. Returns PP_FALSE if the |
27 // resource is invalid or some type other than a FileRef. | 27 // resource is invalid or some type other than a FileRef. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Rename a file or directory. file_ref and new_file_ref must both refer to | 72 // Rename a file or directory. file_ref and new_file_ref must both refer to |
73 // files in the same filesystem. It is an error to rename a file or | 73 // files in the same filesystem. It is an error to rename a file or |
74 // directory that is in use. It is not valid to rename a file in the | 74 // directory that is in use. It is not valid to rename a file in the |
75 // external filesystem. | 75 // external filesystem. |
76 int32_t (*Rename)(PP_Resource file_ref, | 76 int32_t (*Rename)(PP_Resource file_ref, |
77 PP_Resource new_file_ref, | 77 PP_Resource new_file_ref, |
78 struct PP_CompletionCallback callback); | 78 struct PP_CompletionCallback callback); |
79 }; | 79 }; |
80 | 80 |
81 #endif /* PPAPI_C_PPB_FILE_REF_H_ */ | 81 #endif /* PPAPI_C_PPB_FILE_REF_H_ */ |
| 82 |
OLD | NEW |