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

Unified Diff: ppapi/api/ppb_file_io.idl

Issue 8764003: Implement a proxy for Pepper FileIO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Homestarmy Created 9 years 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 | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/c/ppb_file_io.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/ppb_file_io.idl
diff --git a/ppapi/api/ppb_file_io.idl b/ppapi/api/ppb_file_io.idl
index 0d2c845bfd2a10c8c91784782f2d8ef32ba88099..d595bdc6a97b81787d9bb1ea4dec7c5b11aade68 100644
--- a/ppapi/api/ppb_file_io.idl
+++ b/ppapi/api/ppb_file_io.idl
@@ -99,8 +99,9 @@ interface PPB_FileIO {
[in] PP_CompletionCallback callback);
/**
- * Query() queries info about the file opened by this FileIO object. This
- * function will fail if the FileIO object has not been opened.
+ * Query() queries info about the file opened by this FileIO object. The
+ * FileIO object must be opened, and there must be no other operations
+ * pending.
*
* @param[in] file_io A <code>PP_Resource</code> corresponding to a
* FileIO.
@@ -110,6 +111,8 @@ interface PPB_FileIO {
* completion of Query().
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending.
*/
int32_t Query([in] PP_Resource file_io,
[out] PP_FileInfo info,
@@ -117,7 +120,9 @@ interface PPB_FileIO {
/**
* Touch() Updates time stamps for the file opened by this FileIO object.
- * This function will fail if the FileIO object has not been opened.
+ * This function will fail if the FileIO object has not been opened. The
+ * FileIO object must be opened, and there must be no other operations
+ * pending.
*
* @param[in] file_io A <code>PP_Resource</code> corresponding to a file
* FileIO.
@@ -127,6 +132,8 @@ interface PPB_FileIO {
* completion of Touch().
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending.
*/
int32_t Touch([in] PP_Resource file_io,
[in] PP_Time last_access_time,
@@ -150,7 +157,8 @@ interface PPB_FileIO {
* @return An The number of bytes read an error code from
* <code>pp_errors.h</code>. If the return value is 0, then end-of-file was
* reached. It is valid to call Read() multiple times with a completion
- * callback to queue up parallel reads from the file at different offsets.
+ * callback to queue up parallel reads from the file, but pending reads
+ * cannot be interleaved with other operations.
*/
int32_t Read([in] PP_Resource file_io,
[in] int64_t offset,
@@ -174,7 +182,8 @@ interface PPB_FileIO {
* @return An The number of bytes written or an error code from
* <code>pp_errors.h</code>. If the return value is 0, then end-of-file was
* reached. It is valid to call Write() multiple times with a completion
- * callback to queue up parallel writes to the file at different offsets.
+ * callback to queue up parallel writes to the file, but pending writes
+ * cannot be interleaved with other operations.
*/
int32_t Write([in] PP_Resource file_io,
[in] int64_t offset,
@@ -183,8 +192,9 @@ interface PPB_FileIO {
[in] PP_CompletionCallback callback);
/**
* SetLength() sets the length of the file. If the file size is extended,
- * then the extended area of the file is zero-filled. The FileIO object must
- * have been opened with write access.
+ * then the extended area of the file is zero-filled. The FileIO object must
+ * have been opened with write access and there must be no other operations
+ * pending.
*
* @param[in] file_io A <code>PP_Resource</code> corresponding to a file
* FileIO.
@@ -193,13 +203,17 @@ interface PPB_FileIO {
* completion of SetLength().
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending.
*/
int32_t SetLength([in] PP_Resource file_io,
[in] int64_t length,
[in] PP_CompletionCallback callback);
/**
- * Flush() flushes changes to disk. This call can be very expensive!
+ * Flush() flushes changes to disk. This call can be very expensive! The
+ * FileIO object must have been opened with write access and there must be no
+ * other operations pending.
*
* @param[in] file_io A <code>PP_Resource</code> corresponding to a file
* FileIO.
@@ -207,6 +221,8 @@ interface PPB_FileIO {
* completion of Flush().
*
* @return An int32_t containing an error code from <code>pp_errors.h</code>.
+ * PP_ERROR_FAILED will be returned if the file isn't opened, and
+ * PP_ERROR_INPROGRESS will be returned if there is another operation pending.
*/
int32_t Flush([in] PP_Resource file_io,
[in] PP_CompletionCallback callback);
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/c/ppb_file_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698