2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-11-06 23:19:44 -08:00
|
|
|
|
|
|
|
#ifndef DirectoryProvider_h__
|
|
|
|
#define DirectoryProvider_h__
|
|
|
|
|
|
|
|
#include "nsIDirectoryService.h"
|
|
|
|
#include "nsComponentManagerUtils.h"
|
|
|
|
#include "nsISimpleEnumerator.h"
|
|
|
|
#include "nsIFile.h"
|
2012-06-19 20:24:24 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2009-11-06 23:19:44 -08:00
|
|
|
|
|
|
|
#define NS_BROWSERDIRECTORYPROVIDER_CONTRACTID \
|
|
|
|
"@mozilla.org/browser/directory-provider;1"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace browser {
|
|
|
|
|
2012-06-19 20:24:24 -07:00
|
|
|
class DirectoryProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
|
2009-11-06 23:19:44 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
|
|
|
|
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
|
|
|
|
|
|
|
|
private:
|
2012-06-19 20:24:24 -07:00
|
|
|
class AppendingEnumerator MOZ_FINAL : public nsISimpleEnumerator
|
2009-11-06 23:19:44 -08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISIMPLEENUMERATOR
|
|
|
|
|
|
|
|
AppendingEnumerator(nsISimpleEnumerator* aBase,
|
|
|
|
char const *const *aAppendList);
|
|
|
|
|
|
|
|
private:
|
|
|
|
nsCOMPtr<nsISimpleEnumerator> mBase;
|
|
|
|
char const *const *const mAppendList;
|
|
|
|
nsCOMPtr<nsIFile> mNext;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace browser
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // DirectoryProvider_h__
|