1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_osfileconstants_h__
6 #define mozilla_osfileconstants_h__
8 #include "nsIOSFileConstantsService.h"
9 #include "mozilla/Attributes.h"
14 * Perform initialization of this module.
16 * This function _must_ be called:
17 * - from the main thread;
18 * - before any Chrome Worker is created.
20 * The function is idempotent.
22 nsresult
InitOSFileConstants();
25 * Perform cleanup of this module.
27 * This function _must_ be called:
28 * - from the main thread;
29 * - after all Chrome Workers are dead.
31 * The function is idempotent.
33 void CleanupOSFileConstants();
36 * Define OS-specific constants.
38 * This function creates or uses JS object |OS.Constants| to store
41 bool DefineOSFileConstants(JSContext
*cx
, JS::Handle
<JSObject
*> global
);
44 * XPConnect initializer, for use in the main thread.
46 class OSFileConstantsService MOZ_FINAL
: public nsIOSFileConstantsService
50 NS_DECL_NSIOSFILECONSTANTSSERVICE
51 OSFileConstantsService();
53 ~OSFileConstantsService();
58 #endif // mozilla_osfileconstants_h__