1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/dirprovider/DirectoryProvider.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef DirectoryProvider_h__ 1.9 +#define DirectoryProvider_h__ 1.10 + 1.11 +#include "nsIDirectoryService.h" 1.12 +#include "nsComponentManagerUtils.h" 1.13 +#include "nsISimpleEnumerator.h" 1.14 +#include "nsIFile.h" 1.15 +#include "mozilla/Attributes.h" 1.16 + 1.17 +#define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \ 1.18 + "@mozilla.org/browser/directory-provider;1" 1.19 + 1.20 +namespace mozilla { 1.21 +namespace browser { 1.22 + 1.23 +class DirectoryProvider MOZ_FINAL : public nsIDirectoryServiceProvider2 1.24 +{ 1.25 +public: 1.26 + NS_DECL_ISUPPORTS 1.27 + NS_DECL_NSIDIRECTORYSERVICEPROVIDER 1.28 + NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 1.29 + 1.30 +private: 1.31 + class AppendingEnumerator MOZ_FINAL : public nsISimpleEnumerator 1.32 + { 1.33 + public: 1.34 + NS_DECL_ISUPPORTS 1.35 + NS_DECL_NSISIMPLEENUMERATOR 1.36 + 1.37 + AppendingEnumerator(nsISimpleEnumerator* aBase, 1.38 + char const *const *aAppendList); 1.39 + 1.40 + private: 1.41 + nsCOMPtr<nsISimpleEnumerator> mBase; 1.42 + char const *const *const mAppendList; 1.43 + nsCOMPtr<nsIFile> mNext; 1.44 + }; 1.45 +}; 1.46 + 1.47 +} // namespace browser 1.48 +} // namespace mozilla 1.49 + 1.50 +#endif // DirectoryProvider_h__