dom/system/OSFileConstants.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.

     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.
    15  *
    16  * This function _must_ be called:
    17  * - from the main thread;
    18  * - before any Chrome Worker is created.
    19  *
    20  * The function is idempotent.
    21  */
    22 nsresult InitOSFileConstants();
    24 /**
    25  * Perform cleanup of this module.
    26  *
    27  * This function _must_ be called:
    28  * - from the main thread;
    29  * - after all Chrome Workers are dead.
    30  *
    31  * The function is idempotent.
    32  */
    33 void CleanupOSFileConstants();
    35 /**
    36  * Define OS-specific constants.
    37  *
    38  * This function creates or uses JS object |OS.Constants| to store
    39  * all its constants.
    40  */
    41 bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global);
    43 /**
    44  * XPConnect initializer, for use in the main thread.
    45  */
    46 class OSFileConstantsService MOZ_FINAL : public nsIOSFileConstantsService
    47 {
    48  public:
    49   NS_DECL_ISUPPORTS
    50   NS_DECL_NSIOSFILECONSTANTSSERVICE
    51   OSFileConstantsService();
    52 private:
    53   ~OSFileConstantsService();
    54 };
    56 }
    58 #endif // mozilla_osfileconstants_h__

mercurial