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

Unified Diff: ppapi/c/ppb_file_ref.h

Issue 12817009: Add Query() support to FileRef (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback type, PP_FileInfo initialization Created 7 years, 9 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
Index: ppapi/c/ppb_file_ref.h
diff --git a/ppapi/c/ppb_file_ref.h b/ppapi/c/ppb_file_ref.h
index d359a7b70b1a0e6ce62298b7bc4b8ce35972f249..910fd80fedbff3d1bc45fa10afb94d0e9d984edf 100644
--- a/ppapi/c/ppb_file_ref.h
+++ b/ppapi/c/ppb_file_ref.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_file_ref.idl modified Wed Oct 5 14:06:02 2011. */
+/* From ppb_file_ref.idl modified Thu Mar 7 12:02:53 2013. */
#ifndef PPAPI_C_PPB_FILE_REF_H_
#define PPAPI_C_PPB_FILE_REF_H_
@@ -18,7 +18,8 @@
#include "ppapi/c/pp_var.h"
#define PPB_FILEREF_INTERFACE_1_0 "PPB_FileRef;1.0"
-#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_0
+#define PPB_FILEREF_INTERFACE_1_1 "PPB_FileRef;1.1"
+#define PPB_FILEREF_INTERFACE PPB_FILEREF_INTERFACE_1_1
/**
* @file
@@ -36,7 +37,7 @@
* a file system. This struct contains a <code>PP_FileSystemType</code>
* identifier and a file path string.
*/
-struct PPB_FileRef_1_0 {
+struct PPB_FileRef_1_1 {
/**
* Create() creates a weak pointer to a file in the given file system. File
* paths are POSIX style.
@@ -177,9 +178,46 @@ struct PPB_FileRef_1_0 {
int32_t (*Rename)(PP_Resource file_ref,
PP_Resource new_file_ref,
struct PP_CompletionCallback callback);
+ /*
+ * Query() queries info about a file or directory. You must have access to
+ * read this file or directory if it exists in the external filesystem.
+ *
+ * @param[in] file_ref A <code>PP_Resource</code> corresponding to a file
+ * reference.
+ * @param[out] info A pointer to a <code>PP_FileInfo</code> which will be
+ * populated with information about the file or directory.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Query().
+ *
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ */
+ int32_t (*Query)(PP_Resource file_ref,
+ struct PP_FileInfo* info,
+ struct PP_CompletionCallback callback);
};
-typedef struct PPB_FileRef_1_0 PPB_FileRef;
+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);
+ 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);
+};
/**
* @}
*/
« no previous file with comments | « ppapi/api/ppb_file_ref.idl ('k') | ppapi/cpp/file_ref.h » ('j') | ppapi/cpp/file_ref.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698