2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsIDirectoryService.h"
|
2012-06-05 19:08:30 -07:00
|
|
|
#include "nsIFile.h"
|
2012-06-05 16:51:58 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsIFile;
|
|
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
// class nsAppFileLocationProvider
|
|
|
|
//*****************************************************************************
|
|
|
|
|
2012-06-05 16:51:58 -07:00
|
|
|
class nsAppFileLocationProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsAppFileLocationProvider();
|
|
|
|
|
2013-07-18 19:31:26 -07:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
|
|
|
|
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
|
|
|
|
|
|
|
|
private:
|
|
|
|
~nsAppFileLocationProvider() {}
|
|
|
|
|
|
|
|
protected:
|
2012-06-05 19:08:30 -07:00
|
|
|
NS_METHOD CloneMozBinDirectory(nsIFile **aLocalFile);
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Get the product directory. This is a user-specific directory for storing
|
|
|
|
* application settings (e.g. the Application Data directory on windows
|
|
|
|
* systems).
|
|
|
|
* @param aLocal If true, should try to get a directory that is only stored
|
|
|
|
* locally (ie not transferred with roaming profiles)
|
|
|
|
*/
|
2012-06-05 19:08:30 -07:00
|
|
|
NS_METHOD GetProductDirectory(nsIFile **aLocalFile,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aLocal = false);
|
2012-06-05 19:08:30 -07:00
|
|
|
NS_METHOD GetDefaultUserProfileRoot(nsIFile **aLocalFile,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aLocal = false);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-10-14 08:43:35 -07:00
|
|
|
#if defined(MOZ_WIDGET_COCOA)
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool IsOSXLeopard();
|
2011-07-07 12:24:28 -07:00
|
|
|
#endif
|
|
|
|
|
2012-06-05 19:08:30 -07:00
|
|
|
nsCOMPtr<nsIFile> mMozBinDirectory;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|