michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsAppFileLocationProvider_h michael@0: #define nsAppFileLocationProvider_h michael@0: michael@0: #include "nsIDirectoryService.h" michael@0: #include "nsIFile.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: class nsIFile; michael@0: michael@0: //***************************************************************************** michael@0: // class nsAppFileLocationProvider michael@0: //***************************************************************************** michael@0: michael@0: class nsAppFileLocationProvider MOZ_FINAL : public nsIDirectoryServiceProvider2 michael@0: { michael@0: public: michael@0: nsAppFileLocationProvider(); michael@0: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSIDIRECTORYSERVICEPROVIDER michael@0: NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 michael@0: michael@0: private: michael@0: ~nsAppFileLocationProvider() {} michael@0: michael@0: protected: michael@0: NS_METHOD CloneMozBinDirectory(nsIFile **aLocalFile); michael@0: /** michael@0: * Get the product directory. This is a user-specific directory for storing michael@0: * application settings (e.g. the Application Data directory on windows michael@0: * systems). michael@0: * @param aLocal If true, should try to get a directory that is only stored michael@0: * locally (ie not transferred with roaming profiles) michael@0: */ michael@0: NS_METHOD GetProductDirectory(nsIFile **aLocalFile, michael@0: bool aLocal = false); michael@0: NS_METHOD GetDefaultUserProfileRoot(nsIFile **aLocalFile, michael@0: bool aLocal = false); michael@0: michael@0: #if defined(MOZ_WIDGET_COCOA) michael@0: static bool IsOSXLeopard(); michael@0: #endif michael@0: michael@0: nsCOMPtr mMozBinDirectory; michael@0: }; michael@0: michael@0: #endif