Bumping manifests a=b2g-bump
[gecko.git] / xpcom / io / nsDirectoryService.h
blob3ca94816b769c86b60233773a5f9e624fadf2c86
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsDirectoryService_h___
8 #define nsDirectoryService_h___
10 #include "nsIDirectoryService.h"
11 #include "nsInterfaceHashtable.h"
12 #include "nsIFile.h"
13 #include "nsIAtom.h"
14 #include "nsTArray.h"
15 #include "mozilla/Attributes.h"
17 #define NS_XPCOM_INIT_CURRENT_PROCESS_DIR "MozBinD" // Can be used to set NS_XPCOM_CURRENT_PROCESS_DIR
18 // CANNOT be used to GET a location
19 #define NS_DIRECTORY_SERVICE_CID {0xf00152d0,0xb40b,0x11d3,{0x8c, 0x9c, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}}
21 class nsDirectoryService MOZ_FINAL
22 : public nsIDirectoryService
23 , public nsIProperties
24 , public nsIDirectoryServiceProvider2
26 public:
27 NS_DECL_THREADSAFE_ISUPPORTS
29 NS_DECL_NSIPROPERTIES
31 NS_DECL_NSIDIRECTORYSERVICE
33 NS_DECL_NSIDIRECTORYSERVICEPROVIDER
35 NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
37 nsDirectoryService();
39 static void RealInit();
40 void RegisterCategoryProviders();
42 static nsresult
43 Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
45 static nsDirectoryService* gService;
47 private:
48 ~nsDirectoryService();
50 nsresult GetCurrentProcessDirectory(nsIFile** aFile);
52 nsInterfaceHashtable<nsCStringHashKey, nsIFile> mHashtable;
53 nsTArray<nsCOMPtr<nsIDirectoryServiceProvider>> mProviders;
55 public:
57 #define DIR_ATOM(name_, value_) static nsIAtom* name_;
58 #include "nsDirectoryServiceAtomList.h"
59 #undef DIR_ATOM
64 #endif