Fix iOS build for XCode 4.6.
[chromium-blink-merge.git] / ppapi / api / dev / ppb_directory_reader_dev.idl
blob659ed0988f570753689fb88d62b071af62dfeeed
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 */
6 /*
7 * This file defines the <code>PPB_DirectoryReader_Dev</code> interface.
8 */
10 label Chrome {
11 M13 = 0.5
14 [assert_size(8)]
15 struct PP_DirectoryEntry_Dev {
16 PP_Resource file_ref;
17 PP_FileType file_type;
20 interface PPB_DirectoryReader_Dev {
21 // Creates a DirectoryReader for the given directory. Upon success, the
22 // corresponding directory is classified as "in use" by the resulting
23 // DirectoryReader object until such time as the DirectoryReader object is
24 // destroyed.
25 PP_Resource Create([in] PP_Resource directory_ref);
27 // Returns PP_TRUE if the given resource is a DirectoryReader. Returns
28 // PP_FALSE if the resource is invalid or some type other than a
29 // DirectoryReader.
30 PP_Bool IsDirectoryReader([in] PP_Resource resource);
32 // Reads the next entry in the directory. Returns PP_OK and sets
33 // entry->file_ref to 0 to indicate reaching the end of the directory. If
34 // entry->file_ref is non-zero when passed to GetNextEntry, it will be
35 // released before the next file_ref is stored.
37 // EXAMPLE USAGE:
39 // PP_Resource reader = reader_funcs->Create(dir_ref);
40 // PP_DirectoryEntry entry = {0};
41 // while ((reader_funcs->GetNextEntry(reader, &entry,
42 // PP_BlockUntilComplete()) == PP_OK) &&
43 // entry->file_ref) {
44 // ProcessDirectoryEntry(entry);
45 // }
46 // core_funcs->ReleaseResource(reader);
48 int32_t GetNextEntry([in] PP_Resource directory_reader,
49 [out] PP_DirectoryEntry_Dev entry,
50 [in] PP_CompletionCallback callback);