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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_osfileconstants_h__
8 #define mozilla_osfileconstants_h__
10 #include "nsIObserver.h"
11 #include "nsIOSFileConstantsService.h"
12 #include "mozilla/Attributes.h"
17 * XPConnect initializer, for use in the main thread.
18 * This class is thread-safe but it must be first be initialized on the
21 class OSFileConstantsService final
: public nsIOSFileConstantsService
,
24 NS_DECL_THREADSAFE_ISUPPORTS
25 NS_DECL_NSIOSFILECONSTANTSSERVICE
28 static already_AddRefed
<OSFileConstantsService
> GetOrCreate();
30 bool DefineOSFileConstants(JSContext
* aCx
, JS::Handle
<JSObject
*> aGlobal
);
33 nsresult
InitOSFileConstants();
35 OSFileConstantsService();
36 ~OSFileConstantsService();
41 UniquePtr
<Paths
> mPaths
;
44 * (Unix) the umask, which goes in OS.Constants.Sys but
45 * can only be looked up (via the system-info service)
51 } // namespace mozilla
53 #endif // mozilla_osfileconstants_h__