2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef _NSUUIDGENERATOR_H_
|
|
|
|
#define _NSUUIDGENERATOR_H_
|
|
|
|
|
2011-12-17 19:47:45 -08: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-03-31 21:29:02 -07:00
|
|
|
#include "mozilla/Mutex.h"
|
2011-12-17 19:47:45 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIUUIDGenerator.h"
|
|
|
|
|
2011-12-17 19:47:45 -08:00
|
|
|
class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator {
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
|
|
|
nsUUIDGenerator();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
NS_DECL_NSIUUIDGENERATOR
|
|
|
|
|
|
|
|
nsresult Init();
|
|
|
|
|
|
|
|
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-03-31 21:29:02 -07:00
|
|
|
mozilla::Mutex mLock;
|
2011-05-01 11:59:24 -07:00
|
|
|
#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
|
2007-03-22 10:30:00 -07:00
|
|
|
char mState[128];
|
|
|
|
char *mSavedState;
|
|
|
|
PRUint8 mRBytes;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NS_UUID_GENERATOR_CONTRACTID "@mozilla.org/uuid-generator;1"
|
|
|
|
#define NS_UUID_GENERATOR_CLASSNAME "UUID Generator"
|
|
|
|
#define NS_UUID_GENERATOR_CID \
|
|
|
|
{ 0x706d36bb, 0xbf79, 0x4293, \
|
|
|
|
{ 0x81, 0xf2, 0x8f, 0x68, 0x28, 0xc1, 0x8f, 0x9d } }
|
|
|
|
|
|
|
|
#endif /* _NSUUIDGENERATOR_H_ */
|