2014-05-05 21:30:43 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04: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/. */
|
2000-07-16 18:20:33 +04:00
|
|
|
|
2013-11-19 06:34:00 +04:00
|
|
|
#ifndef nsAppFileLocationProvider_h
|
|
|
|
#define nsAppFileLocationProvider_h
|
|
|
|
|
2000-07-16 18:20:33 +04:00
|
|
|
#include "nsIDirectoryService.h"
|
2020-04-07 22:09:47 +03:00
|
|
|
#include "nsCOMPtr.h"
|
2012-06-06 03:51:58 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-07-16 18:20:33 +04:00
|
|
|
|
|
|
|
class nsIFile;
|
|
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
// class nsAppFileLocationProvider
|
2014-05-05 21:30:43 +04:00
|
|
|
//*****************************************************************************
|
2000-07-16 18:20:33 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsAppFileLocationProvider final : public nsIDirectoryServiceProvider2 {
|
2000-07-16 18:20:33 +04:00
|
|
|
public:
|
2014-05-05 21:30:43 +04:00
|
|
|
nsAppFileLocationProvider();
|
2000-07-16 18:20:33 +04:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
|
|
NS_DECL_NSIDIRECTORYSERVICEPROVIDER
|
|
|
|
NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
|
2000-07-16 18:20:33 +04:00
|
|
|
|
2004-01-15 09:14:18 +03:00
|
|
|
private:
|
2020-02-12 14:13:33 +03:00
|
|
|
~nsAppFileLocationProvider() = default;
|
2000-07-16 18:20:33 +04:00
|
|
|
|
2004-01-15 09:14:18 +03:00
|
|
|
protected:
|
2016-08-15 07:30:32 +03:00
|
|
|
nsresult CloneMozBinDirectory(nsIFile** aLocalFile);
|
2014-05-05 21:30:43 +04: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)
|
|
|
|
*/
|
2016-08-15 07:30:32 +03:00
|
|
|
nsresult GetProductDirectory(nsIFile** aLocalFile, bool aLocal = false);
|
|
|
|
nsresult GetDefaultUserProfileRoot(nsIFile** aLocalFile, bool aLocal = false);
|
2001-09-19 11:43:41 +04:00
|
|
|
|
2014-05-05 21:30:43 +04:00
|
|
|
nsCOMPtr<nsIFile> mMozBinDirectory;
|
2000-07-16 18:20:33 +04:00
|
|
|
};
|
2013-11-19 06:34:00 +04:00
|
|
|
|
|
|
|
#endif
|