diff options
author | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 06:13:30 +0000 |
---|---|---|
committer | nhiroki@chromium.org <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 06:13:30 +0000 |
commit | 5445a1e82312f687d45681dce5b38c3dec72983c (patch) | |
tree | 85b482a01ef8e6f0cf9c95b12295986434aa4b60 /ppapi/api | |
parent | cbc8a45c3bb4009b3843bd15bf46e2aff9286d04 (diff) | |
download | chromium_src-5445a1e82312f687d45681dce5b38c3dec72983c.zip chromium_src-5445a1e82312f687d45681dce5b38c3dec72983c.tar.gz chromium_src-5445a1e82312f687d45681dce5b38c3dec72983c.tar.bz2 |
[Retry] Implement ReadEntries API for PPB_DirectoryReader
The ReadEntries API returns all file entries in the given directory at once.
This CL includes:
- Implementing the ReadEntries API.
- Removing the GetNextEntry API.
- Modifying the nacl_io library since the library uses the GetNextEntry API.
Original review: https://codereview.chromium.org/12090071/
BUG=113086
TEST=browser_tests --gtest_filter=\*DirectoryReader\*
TBR=yzshen1,dmichael
Review URL: https://chromiumcodereview.appspot.com/12378062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r-- | ppapi/api/dev/ppb_directory_reader_dev.idl | 29 | ||||
-rw-r--r-- | ppapi/api/pp_macros.idl | 1 |
2 files changed, 12 insertions, 18 deletions
diff --git a/ppapi/api/dev/ppb_directory_reader_dev.idl b/ppapi/api/dev/ppb_directory_reader_dev.idl index 659ed09..5ba6065 100644 --- a/ppapi/api/dev/ppb_directory_reader_dev.idl +++ b/ppapi/api/dev/ppb_directory_reader_dev.idl @@ -8,7 +8,7 @@ */ label Chrome { - M13 = 0.5 + M27 = 0.6 }; [assert_size(8)] @@ -29,23 +29,18 @@ interface PPB_DirectoryReader_Dev { // DirectoryReader. PP_Bool IsDirectoryReader([in] PP_Resource resource); - // Reads the next entry in the directory. Returns PP_OK and sets - // entry->file_ref to 0 to indicate reaching the end of the directory. If - // entry->file_ref is non-zero when passed to GetNextEntry, it will be - // released before the next file_ref is stored. + // Reads all entries in the directory. // - // EXAMPLE USAGE: + // @param[in] directory_reader A <code>PP_Resource</code> + // corresponding to a directory reader resource. + // @param[in] output An output array which will receive + // <code>PP_DirectoryEntry_Dev</code> objects on success. + // @param[in] callback A <code>PP_CompletionCallback</code> to run on + // completion. // - // PP_Resource reader = reader_funcs->Create(dir_ref); - // PP_DirectoryEntry entry = {0}; - // while ((reader_funcs->GetNextEntry(reader, &entry, - // PP_BlockUntilComplete()) == PP_OK) && - // entry->file_ref) { - // ProcessDirectoryEntry(entry); - // } - // core_funcs->ReleaseResource(reader); + // @return An error code from <code>pp_errors.h</code>. // - int32_t GetNextEntry([in] PP_Resource directory_reader, - [out] PP_DirectoryEntry_Dev entry, - [in] PP_CompletionCallback callback); + int32_t ReadEntries([in] PP_Resource directory_reader, + [in] PP_ArrayOutput output, + [in] PP_CompletionCallback callback); }; diff --git a/ppapi/api/pp_macros.idl b/ppapi/api/pp_macros.idl index edb4684..999da67 100644 --- a/ppapi/api/pp_macros.idl +++ b/ppapi/api/pp_macros.idl @@ -108,4 +108,3 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE) */ #endinl - |