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

Unified Diff: ppapi/cpp/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/cpp/file_ref.h
diff --git a/ppapi/cpp/file_ref.h b/ppapi/cpp/file_ref.h
index 05cdc3691b02fe9790693bc6faa0a92c3f95172f..1e90ed245a101e9cf2aa8cfea9599bd570b47b55 100644
--- a/ppapi/cpp/file_ref.h
+++ b/ppapi/cpp/file_ref.h
@@ -5,6 +5,7 @@
#ifndef PPAPI_CPP_FILE_REF_H_
#define PPAPI_CPP_FILE_REF_H_
+#include "ppapi/c/pp_file_info.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/ppb_file_ref.h"
#include "ppapi/cpp/resource.h"
@@ -16,8 +17,9 @@
namespace pp {
-class CompletionCallback;
class FileSystem;
+class CompletionCallback;
+template<typename T> class CompletionCallbackWithOutput;
/// The <code>FileRef</code> class represents a "weak pointer" to a file in
/// a file system.
@@ -143,6 +145,16 @@ class FileRef : public Resource {
///
/// @return An int32_t containing an error code from <code>pp_errors.h</code>.
int32_t Rename(const FileRef& new_file_ref, const CompletionCallback& cc);
+
+ ///
+ /// 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] callback A <code>CompletionCallbackWithOutput</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(const CompletionCallbackWithOutput<PP_FileInfo>& callback);
};
} // namespace pp
« no previous file with comments | « ppapi/c/ppb_file_ref.h ('k') | ppapi/cpp/file_ref.cc » ('j') | ppapi/cpp/file_ref.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698