xpcom/io/nsDirectoryService.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsDirectoryService_h___
michael@0 7 #define nsDirectoryService_h___
michael@0 8
michael@0 9 #include "nsIDirectoryService.h"
michael@0 10 #include "nsInterfaceHashtable.h"
michael@0 11 #include "nsIFile.h"
michael@0 12 #include "nsIAtom.h"
michael@0 13 #include "nsTArray.h"
michael@0 14 #include "mozilla/Attributes.h"
michael@0 15
michael@0 16 #define NS_XPCOM_INIT_CURRENT_PROCESS_DIR "MozBinD" // Can be used to set NS_XPCOM_CURRENT_PROCESS_DIR
michael@0 17 // CANNOT be used to GET a location
michael@0 18 #define NS_DIRECTORY_SERVICE_CID {0xf00152d0,0xb40b,0x11d3,{0x8c, 0x9c, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}}
michael@0 19
michael@0 20 class nsDirectoryService MOZ_FINAL : public nsIDirectoryService,
michael@0 21 public nsIProperties,
michael@0 22 public nsIDirectoryServiceProvider2
michael@0 23 {
michael@0 24 public:
michael@0 25
michael@0 26 // nsISupports interface
michael@0 27 NS_DECL_THREADSAFE_ISUPPORTS
michael@0 28
michael@0 29 NS_DECL_NSIPROPERTIES
michael@0 30
michael@0 31 NS_DECL_NSIDIRECTORYSERVICE
michael@0 32
michael@0 33 NS_DECL_NSIDIRECTORYSERVICEPROVIDER
michael@0 34
michael@0 35 NS_DECL_NSIDIRECTORYSERVICEPROVIDER2
michael@0 36
michael@0 37 nsDirectoryService();
michael@0 38 ~nsDirectoryService();
michael@0 39
michael@0 40 static void RealInit();
michael@0 41 void RegisterCategoryProviders();
michael@0 42
michael@0 43 static nsresult
michael@0 44 Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
michael@0 45
michael@0 46 static nsDirectoryService* gService;
michael@0 47
michael@0 48 private:
michael@0 49 nsresult GetCurrentProcessDirectory(nsIFile** aFile);
michael@0 50
michael@0 51 nsInterfaceHashtable<nsCStringHashKey, nsIFile> mHashtable;
michael@0 52 nsTArray<nsCOMPtr<nsIDirectoryServiceProvider> > mProviders;
michael@0 53
michael@0 54 public:
michael@0 55
michael@0 56 #define DIR_ATOM(name_, value_) static nsIAtom* name_;
michael@0 57 #include "nsDirectoryServiceAtomList.h"
michael@0 58 #undef DIR_ATOM
michael@0 59
michael@0 60 };
michael@0 61
michael@0 62
michael@0 63 #endif
michael@0 64

mercurial