| 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 #ifndef PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ |
| 6 #define PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_file_info.h" | 8 #include "ppapi/c/pp_file_info.h" |
| 9 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
| 10 #include "ppapi/c/pp_macros.h" | 10 #include "ppapi/c/pp_macros.h" |
| 11 #include "ppapi/c/pp_module.h" | 11 #include "ppapi/c/pp_module.h" |
| 12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
| 13 | 13 |
| 14 struct PP_CompletionCallback; | 14 struct PP_CompletionCallback; |
| 15 | 15 |
| 16 struct PP_DirectoryEntry_Dev { | 16 struct PP_DirectoryEntry_Dev { |
| 17 PP_Resource file_ref; | 17 PP_Resource file_ref; |
| 18 PP_FileType file_type; | 18 PP_FileType file_type; |
| 19 }; | 19 }; |
| 20 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DirectoryEntry_Dev, 8); | 20 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_DirectoryEntry_Dev, 8); |
| 21 | 21 |
| 22 #define PPB_DIRECTORYREADER_DEV_INTERFACE_0_5 "PPB_DirectoryReader(Dev);0.5" | 22 #define PPB_DIRECTORYREADER_DEV_INTERFACE_0_5 "PPB_DirectoryReader(Dev);0.5" |
| 23 #define PPB_DIRECTORYREADER_DEV_INTERFACE PPB_DIRECTORYREADER_DEV_INTERFACE_0_5 | 23 #define PPB_DIRECTORYREADER_DEV_INTERFACE PPB_DIRECTORYREADER_DEV_INTERFACE_0_5 |
| 24 | 24 |
| 25 struct PPB_DirectoryReader_Dev { | 25 struct PPB_DirectoryReader_Dev_0_5 { |
| 26 // Creates a DirectoryReader for the given directory. Upon success, the | 26 // Creates a DirectoryReader for the given directory. Upon success, the |
| 27 // corresponding directory is classified as "in use" by the resulting | 27 // corresponding directory is classified as "in use" by the resulting |
| 28 // DirectoryReader object until such time as the DirectoryReader object is | 28 // DirectoryReader object until such time as the DirectoryReader object is |
| 29 // destroyed. | 29 // destroyed. |
| 30 PP_Resource (*Create)(PP_Resource directory_ref); | 30 PP_Resource (*Create)(PP_Resource directory_ref); |
| 31 | 31 |
| 32 // Returns PP_TRUE if the given resource is a DirectoryReader. Returns | 32 // Returns PP_TRUE if the given resource is a DirectoryReader. Returns |
| 33 // PP_FALSE if the resource is invalid or some type other than a | 33 // PP_FALSE if the resource is invalid or some type other than a |
| 34 // DirectoryReader. | 34 // DirectoryReader. |
| 35 PP_Bool (*IsDirectoryReader)(PP_Resource resource); | 35 PP_Bool (*IsDirectoryReader)(PP_Resource resource); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 48 // entry->file_ref) { | 48 // entry->file_ref) { |
| 49 // ProcessDirectoryEntry(entry); | 49 // ProcessDirectoryEntry(entry); |
| 50 // } | 50 // } |
| 51 // core_funcs->ReleaseResource(reader); | 51 // core_funcs->ReleaseResource(reader); |
| 52 // | 52 // |
| 53 int32_t (*GetNextEntry)(PP_Resource directory_reader, | 53 int32_t (*GetNextEntry)(PP_Resource directory_reader, |
| 54 struct PP_DirectoryEntry_Dev* entry, | 54 struct PP_DirectoryEntry_Dev* entry, |
| 55 struct PP_CompletionCallback callback); | 55 struct PP_CompletionCallback callback); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 typedef struct PPB_DirectoryReader_Dev_0_5 PPB_DirectoryReader_Dev; |
| 59 |
| 58 #endif /* PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ */ | 60 #endif /* PPAPI_C_DEV_PPB_DIRECTORY_READER_DEV_H_ */ |
| OLD | NEW |