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

Unified Diff: trunk/src/ppapi/c/ppb_file_ref.h

Issue 131473002: Revert 243802 "PPAPI: Add new PPB_FileRef.MakeDirectory to suppo..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/ppapi/api/ppb_file_ref.idl ('k') | trunk/src/ppapi/cpp/file_ref.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ppapi/c/ppb_file_ref.h
===================================================================
--- trunk/src/ppapi/c/ppb_file_ref.h (revision 243841)
+++ trunk/src/ppapi/c/ppb_file_ref.h (working copy)
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_file_ref.idl modified Wed Jan 8 12:40:12 2014. */
+/* From ppb_file_ref.idl modified Thu Aug 15 10:50:43 2013. */
#ifndef PPAPI_C_PPB_FILE_REF_H_
#define PPAPI_C_PPB_FILE_REF_H_
@@ -20,7 +20,6 @@
#define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0"
#define PPB_FILEREF_INTERFACE_1_1 "PPB_FileRef;1.1"
-#define PPB_FILEREF_INTERFACE_1_2 "PPB_FileRef;1.2" /* dev */
#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_1
/**
@@ -31,28 +30,6 @@
/**
- * @addtogroup Enums
- * @{
- */
-/**
- * The <code>PP_MakeDirectoryFlags</code> enum contains flags used to control
- * behavior of <code>PPB_FileRef.MakeDirectory()</code>.
- */
-typedef enum {
- PP_MAKEDIRECTORYFLAG_NONE = 0 << 0,
- /** Requests that ancestor directories are created if they do not exist. */
- PP_MAKEDIRECTORYFLAG_WITH_ANCESTORS = 1 << 0,
- /**
- * Requests that the PPB_FileRef.MakeDirectory() call fails if the directory
- * already exists.
- */
- PP_MAKEDIRECTORYFLAG_EXCLUSIVE = 1 << 1
-} PP_MakeDirectoryFlags;
-/**
- * @}
- */
-
-/**
* @addtogroup Interfaces
* @{
*/
@@ -61,7 +38,7 @@
* a file system. This struct contains a <code>PP_FileSystemType</code>
* identifier and a file path string.
*/
-struct PPB_FileRef_1_2 { /* dev */
+struct PPB_FileRef_1_1 {
/**
* Create() creates a weak pointer to a file in the given file system. File
* paths are POSIX style.
@@ -133,22 +110,24 @@
*/
PP_Resource (*GetParent)(PP_Resource file_ref);
/**
- * MakeDirectory() makes a new directory in the file system according to the
- * given <code>make_directory_flags</code>, which is a bit-mask of the
- * <code>PP_MakeDirectoryFlags</code> values. It is not valid to make a
- * directory in the external file system.
+ * MakeDirectory() makes a new directory in the file system as well as any
+ * parent directories if the <code>make_ancestors</code> argument is
+ * <code>PP_TRUE</code>. It is not valid to make a directory in the external
+ * file system.
*
* @param[in] file_ref A <code>PP_Resource</code> corresponding to a file
* reference.
- * @param[in] make_directory_flags A bit-mask of the
- * <code>PP_MakeDirectoryFlags</code> values.
- * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
- * completion of MakeDirectory().
+ * @param[in] make_ancestors A <code>PP_Bool</code> set to
+ * <code>PP_TRUE</code> to make ancestor directories or <code>PP_FALSE</code>
+ * if ancestor directories are not needed.
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * Succeeds if the directory already exists. Fails if ancestor directories
+ * do not exist and <code>make_ancestors</code> was passed as
+ * <code>PP_FALSE</code>.
*/
int32_t (*MakeDirectory)(PP_Resource directory_ref,
- int32_t make_directory_flags,
+ PP_Bool make_ancestors,
struct PP_CompletionCallback callback);
/**
* Touch() Updates time stamps for a file. You must have write access to the
@@ -233,6 +212,8 @@
struct PP_CompletionCallback callback);
};
+typedef struct PPB_FileRef_1_1 PPB_FileRef;
+
struct PPB_FileRef_1_0 {
PP_Resource (*Create)(PP_Resource file_system, const char* path);
PP_Bool (*IsFileRef)(PP_Resource resource);
@@ -253,35 +234,6 @@
PP_Resource new_file_ref,
struct PP_CompletionCallback callback);
};
-
-struct PPB_FileRef_1_1 {
- PP_Resource (*Create)(PP_Resource file_system, const char* path);
- PP_Bool (*IsFileRef)(PP_Resource resource);
- PP_FileSystemType (*GetFileSystemType)(PP_Resource file_ref);
- struct PP_Var (*GetName)(PP_Resource file_ref);
- struct PP_Var (*GetPath)(PP_Resource file_ref);
- PP_Resource (*GetParent)(PP_Resource file_ref);
- int32_t (*MakeDirectory)(PP_Resource directory_ref,
- PP_Bool make_ancestors,
- struct PP_CompletionCallback callback);
- int32_t (*Touch)(PP_Resource file_ref,
- PP_Time last_access_time,
- PP_Time last_modified_time,
- struct PP_CompletionCallback callback);
- int32_t (*Delete)(PP_Resource file_ref,
- struct PP_CompletionCallback callback);
- int32_t (*Rename)(PP_Resource file_ref,
- PP_Resource new_file_ref,
- struct PP_CompletionCallback callback);
- int32_t (*Query)(PP_Resource file_ref,
- struct PP_FileInfo* info,
- struct PP_CompletionCallback callback);
- int32_t (*ReadDirectoryEntries)(PP_Resource file_ref,
- struct PP_ArrayOutput output,
- struct PP_CompletionCallback callback);
-};
-
-typedef struct PPB_FileRef_1_1 PPB_FileRef;
/**
* @}
*/
« no previous file with comments | « trunk/src/ppapi/api/ppb_file_ref.idl ('k') | trunk/src/ppapi/cpp/file_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698