xpcom/base/nsSystemInfo.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/base/nsSystemInfo.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +/* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef _NSSYSTEMINFO_H_
    1.10 +#define _NSSYSTEMINFO_H_
    1.11 +
    1.12 +#include "nsHashPropertyBag.h"
    1.13 +
    1.14 +class nsSystemInfo : public nsHashPropertyBag {
    1.15 +public:
    1.16 +    nsSystemInfo();
    1.17 +
    1.18 +    nsresult Init();
    1.19 +
    1.20 +    // Slot for NS_InitXPCOM2 to pass information to nsSystemInfo::Init.
    1.21 +    // See comments above the variable definition and in NS_InitXPCOM2.
    1.22 +    static uint32_t gUserUmask;
    1.23 +
    1.24 +protected:
    1.25 +    void SetInt32Property(const nsAString &aPropertyName,
    1.26 +                          const int32_t aValue);
    1.27 +    void SetUint32Property(const nsAString &aPropertyName,
    1.28 +                           const uint32_t aValue);
    1.29 +    void SetUint64Property(const nsAString &aPropertyName,
    1.30 +                           const uint64_t aValue);
    1.31 +
    1.32 +private:
    1.33 +    ~nsSystemInfo();
    1.34 +};
    1.35 +
    1.36 +#define NS_SYSTEMINFO_CONTRACTID "@mozilla.org/system-info;1"
    1.37 +#define NS_SYSTEMINFO_CID \
    1.38 +{ 0xd962398a, 0x99e5, 0x49b2, \
    1.39 +{ 0x85, 0x7a, 0xc1, 0x59, 0x04, 0x9c, 0x7f, 0x6c } }
    1.40 +
    1.41 +#endif /* _NSSYSTEMINFO_H_ */

mercurial