Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: ppapi/c/ppb_file_system.h

Issue 7242002: Sang's initial CL for moving the file interface out of dev. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5 #ifndef PPAPI_C_PPB_FILE_SYSTEM_H_
6 #define PPAPI_C_PPB_FILE_SYSTEM_H_
7
8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_file_info.h"
10 #include "ppapi/c/pp_instance.h"
11 #include "ppapi/c/pp_resource.h"
12 #include "ppapi/c/pp_stdint.h"
13 #include "ppapi/c/pp_time.h"
14
15 struct PP_CompletionCallback;
16
17 #define PPB_FILESYSTEM_INTERFACE_0_6 "PPB_FileSystem;0.6"
18 #define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_0_6
19
20 struct PPB_FileSystem {
21 /** Creates a filesystem object of the given type. */
22 PP_Resource (*Create)(PP_Instance instance, PP_FileSystemType type);
23
24 /** Returns PP_TRUE if the given resource is a FileSystem. */
25 PP_Bool (*IsFileSystem)(PP_Resource resource);
26
27 /**
28 * Opens the file system. A file system must be opened before running any
29 * other operation on it.
30 *
31 * TODO(brettw) clarify whether this must have completed before a file can
32 * be opened in it. Clarify what it means to be "completed."
33 */
34 int32_t (*Open)(PP_Resource file_system,
35 int64_t expected_size,
36 struct PP_CompletionCallback callback);
37
38 /**
39 * Returns the type of the given file system.
40 *
41 * Returns PP_FILESYSTEMTYPE_INVALID if the given resource is not a valid
42 * filesystem. It is valid to call this function even before Open completes.
43 */
44 PP_FileSystemType (*GetType)(PP_Resource file_system);
45 };
46
47 #endif /* PPAPI_C_PPB_FILE_SYSTEM_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698