2005-11-22 00:01:45 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2005-11-22 00:01:45 +03:00
|
|
|
|
|
|
|
#ifndef _NSUUIDGENERATOR_H_
|
|
|
|
#define _NSUUIDGENERATOR_H_
|
|
|
|
|
2011-12-18 07:47:45 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg
Bug 645263, part 0: Count sync primitive ctor/dtors. r=dbaron
Bug 645263, part 1: Migrate content/media to mozilla:: sync primitives. r=doublec
Bug 645263, part 2: Migrate modules/plugin to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 3: Migrate nsComponentManagerImpl to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 4: Migrate everything else to mozilla:: sync primitives. r=dbaron
Bug 645263, part 5: Remove nsAutoLock.*. sr=bsmedberg
Bug 645263, part 6: Make editor test be nicer to deadlock detector. r=ehsan
Bug 645263, part 7: Disable tracemalloc backtraces for xpcshell tests. r=dbaron
Bug 646259: Fix nsCacheService to use a CondVar for notifying. r=cjones
2011-04-01 08:29:02 +04:00
|
|
|
#include "mozilla/Mutex.h"
|
2011-12-18 07:47:45 +04:00
|
|
|
|
2005-11-22 00:01:45 +03:00
|
|
|
#include "nsIUUIDGenerator.h"
|
|
|
|
|
2011-12-18 07:47:45 +04:00
|
|
|
class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator {
|
2005-11-22 00:01:45 +03:00
|
|
|
public:
|
|
|
|
nsUUIDGenerator();
|
|
|
|
|
2013-07-19 06:31:26 +04:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2005-11-22 00:01:45 +03:00
|
|
|
|
|
|
|
NS_DECL_NSIUUIDGENERATOR
|
|
|
|
|
|
|
|
nsresult Init();
|
|
|
|
|
2006-05-15 02:41:47 +04:00
|
|
|
private:
|
|
|
|
~nsUUIDGenerator();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg
Bug 645263, part 0: Count sync primitive ctor/dtors. r=dbaron
Bug 645263, part 1: Migrate content/media to mozilla:: sync primitives. r=doublec
Bug 645263, part 2: Migrate modules/plugin to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 3: Migrate nsComponentManagerImpl to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 4: Migrate everything else to mozilla:: sync primitives. r=dbaron
Bug 645263, part 5: Remove nsAutoLock.*. sr=bsmedberg
Bug 645263, part 6: Make editor test be nicer to deadlock detector. r=ehsan
Bug 645263, part 7: Disable tracemalloc backtraces for xpcshell tests. r=dbaron
Bug 646259: Fix nsCacheService to use a CondVar for notifying. r=cjones
2011-04-01 08:29:02 +04:00
|
|
|
mozilla::Mutex mLock;
|
2011-05-01 22:59:24 +04:00
|
|
|
#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
|
2007-01-27 08:11:35 +03:00
|
|
|
char mState[128];
|
2006-08-15 04:52:21 +04:00
|
|
|
char *mSavedState;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint8_t mRBytes;
|
2006-05-15 02:41:47 +04:00
|
|
|
#endif
|
2005-11-22 00:01:45 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#define NS_UUID_GENERATOR_CONTRACTID "@mozilla.org/uuid-generator;1"
|
|
|
|
#define NS_UUID_GENERATOR_CID \
|
|
|
|
{ 0x706d36bb, 0xbf79, 0x4293, \
|
|
|
|
{ 0x81, 0xf2, 0x8f, 0x68, 0x28, 0xc1, 0x8f, 0x9d } }
|
|
|
|
|
|
|
|
#endif /* _NSUUIDGENERATOR_H_ */
|