FileSystemRootDirectoryReader.h (1318B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef mozilla_dom_FileSystemRootDirectoryReader_h 8 #define mozilla_dom_FileSystemRootDirectoryReader_h 9 10 #include "FileSystemDirectoryReader.h" 11 12 namespace mozilla::dom { 13 14 class FileSystemRootDirectoryReader final : public FileSystemDirectoryReader { 15 public: 16 NS_DECL_ISUPPORTS_INHERITED 17 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileSystemRootDirectoryReader, 18 FileSystemDirectoryReader) 19 20 explicit FileSystemRootDirectoryReader( 21 FileSystemDirectoryEntry* aParentEntry, FileSystem* aFileSystem, 22 const Sequence<RefPtr<FileSystemEntry>>& aEntries); 23 24 virtual void ReadEntries( 25 FileSystemEntriesCallback& aSuccessCallback, 26 const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback, 27 ErrorResult& aRv) override; 28 29 private: 30 ~FileSystemRootDirectoryReader(); 31 32 Sequence<RefPtr<FileSystemEntry>> mEntries; 33 bool mAlreadyRead; 34 }; 35 36 } // namespace mozilla::dom 37 38 #endif // mozilla_dom_FileSystemRootDirectoryReader_h