Line data Source code
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_FileSystemRootDirectoryEntry_h
8 : #define mozilla_dom_FileSystemRootDirectoryEntry_h
9 :
10 : #include "mozilla/dom/FileSystemDirectoryEntry.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : class FileSystemRootDirectoryEntry final : public FileSystemDirectoryEntry
16 : {
17 : public:
18 : NS_DECL_ISUPPORTS_INHERITED
19 0 : NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileSystemRootDirectoryEntry, FileSystemDirectoryEntry)
20 :
21 : FileSystemRootDirectoryEntry(nsIGlobalObject* aGlobalObject,
22 : const Sequence<RefPtr<FileSystemEntry>>& aEntries,
23 : FileSystem* aFileSystem);
24 :
25 : virtual void
26 : GetName(nsAString& aName, ErrorResult& aRv) const override;
27 :
28 : virtual void
29 : GetFullPath(nsAString& aFullPath, ErrorResult& aRv) const override;
30 :
31 : virtual already_AddRefed<FileSystemDirectoryReader>
32 : CreateReader() override;
33 :
34 : private:
35 : ~FileSystemRootDirectoryEntry();
36 :
37 : virtual void
38 : GetInternal(const nsAString& aPath, const FileSystemFlags& aFlag,
39 : const Optional<OwningNonNull<FileSystemEntryCallback>>& aSuccessCallback,
40 : const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback,
41 : GetInternalType aType) override;
42 :
43 : void
44 : Error(const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback,
45 : nsresult aError) const;
46 :
47 : Sequence<RefPtr<FileSystemEntry>> mEntries;
48 : };
49 :
50 : } // namespace dom
51 : } // namespace mozilla
52 :
53 : #endif // mozilla_dom_FileSystemRootDirectoryEntry_h
|