OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 /* From dev/ppb_directory_reader_dev.idl modified Fri Feb 15 16:46:46 2013. */ | 6 /* From ppb_directory_reader.idl modified Wed Apr 24 10:32:14 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ | 8 #ifndef PPAPI_C_PPB_DIRECTORY_READER_H_ |
9 #define PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ | 9 #define PPAPI_C_PPB_DIRECTORY_READER_H_ |
10 | 10 |
11 #include "ppapi/c/pp_array_output.h" | 11 #include "ppapi/c/pp_array_output.h" |
12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
13 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.h" |
14 #include "ppapi/c/pp_file_info.h" | 14 #include "ppapi/c/pp_file_info.h" |
15 #include "ppapi/c/pp_macros.h" | 15 #include "ppapi/c/pp_macros.h" |
16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
17 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
18 | 18 |
19 #define PPB_DIRECTORYREADER_DEV_INTERFACE_0_6 "PPB_DirectoryReader(Dev);0.6" | 19 #define PPB_DIRECTORYREADER_INTERFACE_1_0 "PPB_DirectoryReader;1.0" |
20 #define PPB_DIRECTORYREADER_DEV_INTERFACE PPB_DIRECTORYREADER_DEV_INTERFACE_0_6 | 20 #define PPB_DIRECTORYREADER_INTERFACE PPB_DIRECTORYREADER_INTERFACE_1_0 |
21 | 21 |
22 /** | 22 /** |
23 * @file | 23 * @file |
24 * | 24 * This file defines the <code>PPB_DirectoryReader</code> interface. |
25 * This file defines the <code>PPB_DirectoryReader_Dev</code> interface. | |
26 */ | 25 */ |
27 | 26 |
28 | 27 |
29 /** | 28 /** |
30 * @addtogroup Structs | 29 * @addtogroup Structs |
31 * @{ | 30 * @{ |
32 */ | 31 */ |
33 struct PP_DirectoryEntry_Dev { | 32 /** |
| 33 * The <code>PP_DirectoryEntry</code> struct represents information about a |
| 34 * directory entry. |
| 35 */ |
| 36 struct PP_DirectoryEntry { |
34 PP_Resource file_ref; | 37 PP_Resource file_ref; |
35 PP_FileType file_type; | 38 PP_FileType file_type; |
36 }; | 39 }; |
37 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DirectoryEntry_Dev, 8); | 40 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DirectoryEntry, 8); |
38 /** | 41 /** |
39 * @} | 42 * @} |
40 */ | 43 */ |
41 | 44 |
42 /** | 45 /** |
43 * @addtogroup Interfaces | 46 * @addtogroup Interfaces |
44 * @{ | 47 * @{ |
45 */ | 48 */ |
46 struct PPB_DirectoryReader_Dev_0_6 { | 49 /** |
47 /* Creates a DirectoryReader for the given directory. Upon success, the | 50 * The <code>PPB_DirectoryReader</code> interface provides a function to read |
| 51 * entries in a directory. |
| 52 */ |
| 53 struct PPB_DirectoryReader_1_0 { |
| 54 /** |
| 55 * Creates a DirectoryReader for the given directory. Upon success, the |
48 * corresponding directory is classified as "in use" by the resulting | 56 * corresponding directory is classified as "in use" by the resulting |
49 * DirectoryReader object until such time as the DirectoryReader object is | 57 * DirectoryReader object until such time as the DirectoryReader object is |
50 * destroyed. */ | 58 * destroyed. |
| 59 */ |
51 PP_Resource (*Create)(PP_Resource directory_ref); | 60 PP_Resource (*Create)(PP_Resource directory_ref); |
52 /* Returns PP_TRUE if the given resource is a DirectoryReader. Returns | 61 /** |
| 62 * Returns PP_TRUE if the given resource is a DirectoryReader. Returns |
53 * PP_FALSE if the resource is invalid or some type other than a | 63 * PP_FALSE if the resource is invalid or some type other than a |
54 * DirectoryReader. */ | 64 * DirectoryReader. |
| 65 */ |
55 PP_Bool (*IsDirectoryReader)(PP_Resource resource); | 66 PP_Bool (*IsDirectoryReader)(PP_Resource resource); |
56 /* Reads all entries in the directory. | 67 /** |
| 68 * Reads all entries in the directory. |
57 * | 69 * |
58 * @param[in] directory_reader A <code>PP_Resource</code> | 70 * @param[in] directory_reader A <code>PP_Resource</code> |
59 * corresponding to a directory reader resource. | 71 * corresponding to a directory reader resource. |
60 * @param[in] output An output array which will receive | 72 * @param[in] output An output array which will receive |
61 * <code>PP_DirectoryEntry_Dev</code> objects on success. | 73 * <code>PP_DirectoryEntry</code> objects on success. |
62 * @param[in] callback A <code>PP_CompletionCallback</code> to run on | 74 * @param[in] callback A <code>PP_CompletionCallback</code> to run on |
63 * completion. | 75 * completion. |
64 * | 76 * |
65 * @return An error code from <code>pp_errors.h</code>. | 77 * @return An error code from <code>pp_errors.h</code>. |
66 */ | 78 */ |
67 int32_t (*ReadEntries)(PP_Resource directory_reader, | 79 int32_t (*ReadEntries)(PP_Resource directory_reader, |
68 struct PP_ArrayOutput output, | 80 struct PP_ArrayOutput output, |
69 struct PP_CompletionCallback callback); | 81 struct PP_CompletionCallback callback); |
70 }; | 82 }; |
71 | 83 |
72 typedef struct PPB_DirectoryReader_Dev_0_6 PPB_DirectoryReader_Dev; | 84 typedef struct PPB_DirectoryReader_1_0 PPB_DirectoryReader; |
73 /** | 85 /** |
74 * @} | 86 * @} |
75 */ | 87 */ |
76 | 88 |
77 #endif /* PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ */ | 89 #endif /* PPAPI_C_PPB_DIRECTORY_READER_H_ */ |
78 | 90 |
OLD | NEW |