browser/components/dirprovider/DirectoryProvider.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:f9166a779228
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifndef DirectoryProvider_h__
6 #define DirectoryProvider_h__
7
8 #include "nsIDirectoryService.h"
9 #include "nsComponentManagerUtils.h"
10 #include "nsISimpleEnumerator.h"
11 #include "nsIFile.h"
12 #include "mozilla/Attributes.h"
13
14 #define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \
15 "@mozilla.org/browser/directory-provider;1"
16
17 namespace mozilla {
18 namespace browser {
19
20 class DirectoryProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
21 {
22 public:
23 NS_DECL_ISUPPORTS
24 NS_DECL_NSIDIRECTORYSERVICEPROVIDER
25 NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
26
27 private:
28 class AppendingEnumerator MOZ_FINAL : public nsISimpleEnumerator
29 {
30 public:
31 NS_DECL_ISUPPORTS
32 NS_DECL_NSISIMPLEENUMERATOR
33
34 AppendingEnumerator(nsISimpleEnumerator* aBase,
35 char const *const *aAppendList);
36
37 private:
38 nsCOMPtr<nsISimpleEnumerator> mBase;
39 char const *const *const mAppendList;
40 nsCOMPtr<nsIFile> mNext;
41 };
42 };
43
44 } // namespace browser
45 } // namespace mozilla
46
47 #endif // DirectoryProvider_h__

mercurial