diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 21:02:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 21:02:32 +0000 |
commit | 4f95dd7ca9883879dc642c2f61cff2edad412b38 (patch) | |
tree | 48daa9a31f86f5029ebe4e33ca5255e3436cd596 /ppapi/api | |
parent | 7b0d86deed914f1dcf5d206259699b5f692c6d3c (diff) | |
download | chromium_src-4f95dd7ca9883879dc642c2f61cff2edad412b38.zip chromium_src-4f95dd7ca9883879dc642c2f61cff2edad412b38.tar.gz chromium_src-4f95dd7ca9883879dc642c2f61cff2edad412b38.tar.bz2 |
Implement a proxy for Pepper FileIO.
This splits apart the old in-process implementation into a new object in shared_impl that does most of the general tracking. This alllows that code to be shared by the proxy.
BUG=http://crbug.com/101154
Review URL: http://codereview.chromium.org/8764003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r-- | ppapi/api/ppb_file_io.idl | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/ppapi/api/ppb_file_io.idl b/ppapi/api/ppb_file_io.idl index 0d2c845..d595bdc 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); |