/src/mozilla-central/xpcom/threads/nsEnvironment.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #ifndef nsEnvironment_h__ |
8 | | #define nsEnvironment_h__ |
9 | | |
10 | | #include "mozilla/Attributes.h" |
11 | | #include "mozilla/Mutex.h" |
12 | | #include "nsIEnvironment.h" |
13 | | |
14 | | #define NS_ENVIRONMENT_CID \ |
15 | | { 0X3D68F92UL, 0X9513, 0X4E25, \ |
16 | | { 0X9B, 0XE9, 0X7C, 0XB2, 0X39, 0X87, 0X41, 0X72 } } |
17 | | #define NS_ENVIRONMENT_CONTRACTID "@mozilla.org/process/environment;1" |
18 | | |
19 | | class nsEnvironment final : public nsIEnvironment |
20 | | { |
21 | | public: |
22 | | NS_DECL_THREADSAFE_ISUPPORTS |
23 | | NS_DECL_NSIENVIRONMENT |
24 | | |
25 | | static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult); |
26 | | |
27 | | private: |
28 | | nsEnvironment() : mLock("nsEnvironment.mLock") |
29 | 0 | { |
30 | 0 | } |
31 | | ~nsEnvironment(); |
32 | | |
33 | | mozilla::Mutex mLock; |
34 | | }; |
35 | | |
36 | | #endif /* !nsEnvironment_h__ */ |