Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2010 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_SYSTEM_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_FILE_SYSTEM_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_FILE_SYSTEM_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_FILE_SYSTEM_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_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
| 12 #include "ppapi/c/pp_time.h" | 13 #include "ppapi/c/pp_time.h" |
| 13 | 14 |
| 14 struct PP_CompletionCallback; | 15 struct PP_CompletionCallback; |
| 15 | 16 |
| 16 #define PPB_FILESYSTEM_DEV_INTERFACE "PPB_FileSystem(Dev);0.3" | 17 #define PPB_FILESYSTEM_DEV_INTERFACE "PPB_FileSystem(Dev);0.4" |
| 17 | 18 |
| 18 struct PPB_FileSystem_Dev { | 19 struct PPB_FileSystem_Dev { |
| 19 // Creates a weak pointer to the filesystem of the given type. | 20 /** Creates a filesystem object of the given type. */ |
| 20 PP_Resource (*Create)(PP_Instance instance, PP_FileSystemType_Dev type); | 21 PP_Resource (*Create)(PP_Instance instance, PP_FileSystemType_Dev type); |
| 21 | 22 |
| 22 // Opens the file system. A file system must be opened before running any | 23 /** Returns PP_TRUE if the given resource is a FileSystem. */ |
| 23 // other operation on it. | 24 PP_Bool (*IsFileSystem)(PP_Resource resource); |
| 25 | |
| 26 /** | |
| 27 * Opens the file system. A file system must be opened before running any | |
| 28 * other operation on it. | |
| 29 * | |
| 30 * TODO(brettw) clarify whether this must have completed before a file can | |
|
vtl
2011/02/21 19:06:00
I wonder what "completed" means -- the callback ha
brettw
2011/02/21 19:19:10
I also wonder that. I added this to the TODO.
| |
| 31 * be opened in it. | |
| 32 */ | |
| 24 int32_t (*Open)(PP_Resource file_system, | 33 int32_t (*Open)(PP_Resource file_system, |
| 25 int64_t expected_size, | 34 int64_t expected_size, |
| 26 struct PP_CompletionCallback callback); | 35 struct PP_CompletionCallback callback); |
| 36 | |
| 37 /** | |
| 38 * Returns the type of the given file system. | |
| 39 * | |
| 40 * Returns PP_FILESYSTEMTYPE_NONE if the given resource is not a valid | |
| 41 * filesystem. It is valid to call this function even before Open completes. | |
| 42 */ | |
| 43 PP_FileSystemType_Dev (*GetType)(PP_Resource file_system); | |
| 27 }; | 44 }; |
| 28 | 45 |
| 29 #endif /* PPAPI_C_DEV_PPB_FILE_SYSTEM_DEV_H_ */ | 46 #endif /* PPAPI_C_DEV_PPB_FILE_SYSTEM_DEV_H_ */ |
| 30 | 47 |
| OLD | NEW |