xpcom/base/nsUUIDGenerator.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef _NSUUIDGENERATOR_H_
     7 #define _NSUUIDGENERATOR_H_
     9 #include "mozilla/Attributes.h"
    10 #include "mozilla/Mutex.h"
    12 #include "nsIUUIDGenerator.h"
    14 class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator {
    15 public:
    16     nsUUIDGenerator();
    18     NS_DECL_THREADSAFE_ISUPPORTS
    20     NS_DECL_NSIUUIDGENERATOR
    22     nsresult Init();
    24 private:
    25     ~nsUUIDGenerator();
    27 protected:
    29     mozilla::Mutex mLock;
    30 #if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
    31     char mState[128];
    32     char *mSavedState;
    33     uint8_t mRBytes;
    34 #endif
    35 };
    37 #define NS_UUID_GENERATOR_CONTRACTID "@mozilla.org/uuid-generator;1"
    38 #define NS_UUID_GENERATOR_CID \
    39 { 0x706d36bb, 0xbf79, 0x4293, \
    40 { 0x81, 0xf2, 0x8f, 0x68, 0x28, 0xc1, 0x8f, 0x9d } }
    42 #endif /* _NSUUIDGENERATOR_H_ */

mercurial