| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * This file defines the API to create a file i/o object. | 8 * This file defines the API to create a file i/o object. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 label Chrome { | 11 label Chrome { |
| 12 M13 = 0.5, | |
| 13 M14 = 1.0 | 12 M14 = 1.0 |
| 14 }; | 13 }; |
| 15 | 14 |
| 16 /** | 15 /** |
| 17 * The PP_FileOpenFlags enum contains file open constants. | 16 * The PP_FileOpenFlags enum contains file open constants. |
| 18 */ | 17 */ |
| 19 [assert_size(4)] | 18 [assert_size(4)] |
| 20 enum PP_FileOpenFlags { | 19 enum PP_FileOpenFlags { |
| 21 /** Requests read access to a file. */ | 20 /** Requests read access to a file. */ |
| 22 PP_FILEOPENFLAG_READ = 1 << 0, | 21 PP_FILEOPENFLAG_READ = 1 << 0, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 47 * file already exists, then the FileIO::Open() call will fail. | 46 * file already exists, then the FileIO::Open() call will fail. |
| 48 */ | 47 */ |
| 49 PP_FILEOPENFLAG_EXCLUSIVE = 1 << 4 | 48 PP_FILEOPENFLAG_EXCLUSIVE = 1 << 4 |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 | 51 |
| 53 /** | 52 /** |
| 54 * The <code>PPB_FileIO</code> struct is used to operate on a regular file | 53 * The <code>PPB_FileIO</code> struct is used to operate on a regular file |
| 55 * (PP_FileType_Regular). | 54 * (PP_FileType_Regular). |
| 56 */ | 55 */ |
| 57 [version=0.5] | |
| 58 interface PPB_FileIO { | 56 interface PPB_FileIO { |
| 59 /** | 57 /** |
| 60 * Create() creates a new FileIO object. | 58 * Create() creates a new FileIO object. |
| 61 * | 59 * |
| 62 * @param[in] instance A <code>PP_Instance</code> indentifying the instance | 60 * @param[in] instance A <code>PP_Instance</code> indentifying the instance |
| 63 * with the file. | 61 * with the file. |
| 64 * | 62 * |
| 65 * @return A <code>PP_Resource</code> corresponding to a FileIO if | 63 * @return A <code>PP_Resource</code> corresponding to a FileIO if |
| 66 * successful or 0 if the module is invalid. | 64 * successful or 0 if the module is invalid. |
| 67 */ | 65 */ |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 * <strong>Note:</strong> If the FileIO object is destroyed, and it is still | 219 * <strong>Note:</strong> If the FileIO object is destroyed, and it is still |
| 222 * open, then it will be implicitly closed, so you are not required to call | 220 * open, then it will be implicitly closed, so you are not required to call |
| 223 * Close(). | 221 * Close(). |
| 224 * | 222 * |
| 225 * @param[in] file_io A <code>PP_Resource</code> corresponding to a file | 223 * @param[in] file_io A <code>PP_Resource</code> corresponding to a file |
| 226 * FileIO. | 224 * FileIO. |
| 227 */ | 225 */ |
| 228 void Close([in] PP_Resource file_io); | 226 void Close([in] PP_Resource file_io); |
| 229 }; | 227 }; |
| 230 | 228 |
| OLD | NEW |