diff options
author | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 20:18:59 +0000 |
---|---|---|
committer | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 20:18:59 +0000 |
commit | 126f4fbdf4245f4b98b85afc3d9d769d024e55e8 (patch) | |
tree | a305c4fa18b66be5e5429c1abfde328269fb6d4f /ppapi/c/ppb_file_system.h | |
parent | 4522aace33817d513e3906ea0e2b668d90709840 (diff) | |
download | chromium_src-126f4fbdf4245f4b98b85afc3d9d769d024e55e8.zip chromium_src-126f4fbdf4245f4b98b85afc3d9d769d024e55e8.tar.gz chromium_src-126f4fbdf4245f4b98b85afc3d9d769d024e55e8.tar.bz2 |
This CL is oringialy http://codereview.chromium.org/7210027
I moved to write access repository.
Review URL: http://codereview.chromium.org/7261004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/ppb_file_system.h')
-rw-r--r-- | ppapi/c/ppb_file_system.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ppapi/c/ppb_file_system.h b/ppapi/c/ppb_file_system.h new file mode 100644 index 0000000..692aa9c --- /dev/null +++ b/ppapi/c/ppb_file_system.h @@ -0,0 +1,47 @@ +/* Copyright (c) 2011 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef PPAPI_C_PPB_FILE_SYSTEM_H_ +#define PPAPI_C_PPB_FILE_SYSTEM_H_ + +#include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_file_info.h" +#include "ppapi/c/pp_instance.h" +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_time.h" + +struct PP_CompletionCallback; + +#define PPB_FILESYSTEM_INTERFACE_0_6 "PPB_FileSystem;0.6" +#define PPB_FILESYSTEM_INTERFACE PPB_FILESYSTEM_INTERFACE_0_6 + +struct PPB_FileSystem { + /** Creates a filesystem object of the given type. */ + PP_Resource (*Create)(PP_Instance instance, PP_FileSystemType type); + + /** Returns PP_TRUE if the given resource is a FileSystem. */ + PP_Bool (*IsFileSystem)(PP_Resource resource); + + /** + * Opens the file system. A file system must be opened before running any + * other operation on it. + * + * TODO(brettw) clarify whether this must have completed before a file can + * be opened in it. Clarify what it means to be "completed." + */ + int32_t (*Open)(PP_Resource file_system, + int64_t expected_size, + struct PP_CompletionCallback callback); + + /** + * Returns the type of the given file system. + * + * Returns PP_FILESYSTEMTYPE_INVALID if the given resource is not a valid + * filesystem. It is valid to call this function even before Open completes. + */ + PP_FileSystemType (*GetType)(PP_Resource file_system); +}; + +#endif /* PPAPI_C_PPB_FILE_SYSTEM_H_ */ |