OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /** |
| 7 * This file defines the <code>PPB_DirectoryReader</code> interface. |
| 8 */ |
| 9 |
| 10 label Chrome { |
| 11 M28 = 1.0 |
| 12 }; |
| 13 |
| 14 /** |
| 15 * The <code>PP_DirectoryEntry</code> struct represents information about a |
| 16 * directory entry. |
| 17 */ |
| 18 [assert_size(8)] |
| 19 struct PP_DirectoryEntry { |
| 20 PP_Resource file_ref; |
| 21 PP_FileType file_type; |
| 22 }; |
| 23 |
| 24 /** |
| 25 * The <code>PPB_DirectoryReader</code> interface provides a function to read |
| 26 * entries in a directory. |
| 27 */ |
| 28 interface PPB_DirectoryReader { |
| 29 /** |
| 30 * Creates a DirectoryReader for the given directory. Upon success, the |
| 31 * corresponding directory is classified as "in use" by the resulting |
| 32 * DirectoryReader object until such time as the DirectoryReader object is |
| 33 * destroyed. |
| 34 */ |
| 35 PP_Resource Create([in] PP_Resource directory_ref); |
| 36 |
| 37 /** |
| 38 * Returns PP_TRUE if the given resource is a DirectoryReader. Returns |
| 39 * PP_FALSE if the resource is invalid or some type other than a |
| 40 * DirectoryReader. |
| 41 */ |
| 42 PP_Bool IsDirectoryReader([in] PP_Resource resource); |
| 43 |
| 44 /** |
| 45 * Reads all entries in the directory. |
| 46 * |
| 47 * @param[in] directory_reader A <code>PP_Resource</code> |
| 48 * corresponding to a directory reader resource. |
| 49 * @param[in] output An output array which will receive |
| 50 * <code>PP_DirectoryEntry</code> objects on success. |
| 51 * @param[in] callback A <code>PP_CompletionCallback</code> to run on |
| 52 * completion. |
| 53 * |
| 54 * @return An error code from <code>pp_errors.h</code>. |
| 55 */ |
| 56 int32_t ReadEntries([in] PP_Resource directory_reader, |
| 57 [in] PP_ArrayOutput output, |
| 58 [in] PP_CompletionCallback callback); |
| 59 }; |
OLD | NEW |