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

Side by Side Diff: ppapi/c/dev/ppb_file_ref_dev.h

Issue 6543028: Implement the filesystem proxy. This allows the FileRef tests to pass in the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2010 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 #define PPB_FILEREF_DEV_INTERFACE "PPB_FileRef(Dev);0.6" 14 #define PPB_FILEREF_DEV_INTERFACE "PPB_FileRef(Dev);0.6"
15 15
16 // A FileRef is a "weak pointer" to a file in a file system. It contains a 16 // 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. 17 // PP_FileSystemType identifier and a file path string.
18 struct PPB_FileRef_Dev { 18 struct PPB_FileRef_Dev {
19 // Creates a weak pointer to a file in the given filesystem. File paths are 19 // Creates a weak pointer to a file in the given filesystem. File paths are
20 // POSIX style. Returns 0 if the path is malformed. 20 // POSIX style. Returns 0 if the path is malformed.
21 PP_Resource (*Create)(PP_Resource file_system, const char* path); 21 PP_Resource (*Create)(PP_Resource file_system, const char* path);
22 22
23 // Returns PP_TRUE if the given resource is a FileRef. Returns PP_FALSE if the 23 // Returns PP_TRUE if the given resource is a FileRef. Returns PP_FALSE if the
24 // resource is invalid or some type other than a FileRef. 24 // resource is invalid or some type other than a FileRef.
25 PP_Bool (*IsFileRef)(PP_Resource resource); 25 PP_Bool (*IsFileRef)(PP_Resource resource);
26 26
27 // Returns the file system identifier of this file. 27 // Returns the file system identifier of this file, or PP_FILESYSTEMTYPE_NONE
28 // if the file ref is invalid.
28 PP_FileSystemType_Dev (*GetFileSystemType)(PP_Resource file_ref); 29 PP_FileSystemType_Dev (*GetFileSystemType)(PP_Resource file_ref);
29 30
30 // Returns the name of the file. The value returned by this function does not 31 // Returns the name of the file. The value returned by this function does not
31 // include any path component (such as the name of the parent directory, for 32 // include any path component (such as the name of the parent directory, for
32 // example). It is just the name of the file. To get the full file path, use 33 // example). It is just the name of the file. To get the full file path, use
33 // the GetPath() function. 34 // the GetPath() function.
34 struct PP_Var (*GetName)(PP_Resource file_ref); 35 struct PP_Var (*GetName)(PP_Resource file_ref);
35 36
36 // Returns the absolute path of the file. This method fails if the file 37 // Returns the absolute path of the file. This method fails if the file
37 // system type is PP_FileSystemType_External. 38 // system type is PP_FileSystemType_External.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // files in the same filesystem. It is an error to rename a file or 70 // files in the same filesystem. It is an error to rename a file or
70 // directory that is in use. It is not valid to rename a file in the 71 // directory that is in use. It is not valid to rename a file in the
71 // external filesystem. 72 // external filesystem.
72 int32_t (*Rename)(PP_Resource file_ref, 73 int32_t (*Rename)(PP_Resource file_ref,
73 PP_Resource new_file_ref, 74 PP_Resource new_file_ref,
74 struct PP_CompletionCallback callback); 75 struct PP_CompletionCallback callback);
75 }; 76 };
76 77
77 #endif /* PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ */ 78 #endif /* PPAPI_C_DEV_PPB_FILE_REF_DEV_H_ */
78 79
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698