xpcom/io/nsAppFileLocationProvider.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:72a62c5c728d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #ifndef nsAppFileLocationProvider_h
7 #define nsAppFileLocationProvider_h
8
9 #include "nsIDirectoryService.h"
10 #include "nsIFile.h"
11 #include "mozilla/Attributes.h"
12
13 class nsIFile;
14
15 //*****************************************************************************
16 // class nsAppFileLocationProvider
17 //*****************************************************************************
18
19 class nsAppFileLocationProvider MOZ_FINAL : public nsIDirectoryServiceProvider2
20 {
21 public:
22 nsAppFileLocationProvider();
23
24 NS_DECL_THREADSAFE_ISUPPORTS
25 NS_DECL_NSIDIRECTORYSERVICEPROVIDER
26 NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
27
28 private:
29 ~nsAppFileLocationProvider() {}
30
31 protected:
32 NS_METHOD CloneMozBinDirectory(nsIFile **aLocalFile);
33 /**
34 * Get the product directory. This is a user-specific directory for storing
35 * application settings (e.g. the Application Data directory on windows
36 * systems).
37 * @param aLocal If true, should try to get a directory that is only stored
38 * locally (ie not transferred with roaming profiles)
39 */
40 NS_METHOD GetProductDirectory(nsIFile **aLocalFile,
41 bool aLocal = false);
42 NS_METHOD GetDefaultUserProfileRoot(nsIFile **aLocalFile,
43 bool aLocal = false);
44
45 #if defined(MOZ_WIDGET_COCOA)
46 static bool IsOSXLeopard();
47 #endif
48
49 nsCOMPtr<nsIFile> mMozBinDirectory;
50 };
51
52 #endif

mercurial