Bumping gaia.json for 3 gaia revision(s) a=gaia-bump
[gecko.git] / dom / system / OSFileConstants.h
blobbcd1dddf422019d44747090c54b5dfe4030f6ff8
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"
11 namespace mozilla {
13 /**
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();
24 /**
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();
35 /**
36 * Define OS-specific constants.
38 * This function creates or uses JS object |OS.Constants| to store
39 * all its constants.
41 bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global);
43 /**
44 * XPConnect initializer, for use in the main thread.
46 class OSFileConstantsService MOZ_FINAL : public nsIOSFileConstantsService
48 public:
49 NS_DECL_ISUPPORTS
50 NS_DECL_NSIOSFILECONSTANTSSERVICE
51 OSFileConstantsService();
52 private:
53 ~OSFileConstantsService();
58 #endif // mozilla_osfileconstants_h__