1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/base/nsUUIDGenerator.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 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 _NSUUIDGENERATOR_H_ 1.10 +#define _NSUUIDGENERATOR_H_ 1.11 + 1.12 +#include "mozilla/Attributes.h" 1.13 +#include "mozilla/Mutex.h" 1.14 + 1.15 +#include "nsIUUIDGenerator.h" 1.16 + 1.17 +class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator { 1.18 +public: 1.19 + nsUUIDGenerator(); 1.20 + 1.21 + NS_DECL_THREADSAFE_ISUPPORTS 1.22 + 1.23 + NS_DECL_NSIUUIDGENERATOR 1.24 + 1.25 + nsresult Init(); 1.26 + 1.27 +private: 1.28 + ~nsUUIDGenerator(); 1.29 + 1.30 +protected: 1.31 + 1.32 + mozilla::Mutex mLock; 1.33 +#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID) 1.34 + char mState[128]; 1.35 + char *mSavedState; 1.36 + uint8_t mRBytes; 1.37 +#endif 1.38 +}; 1.39 + 1.40 +#define NS_UUID_GENERATOR_CONTRACTID "@mozilla.org/uuid-generator;1" 1.41 +#define NS_UUID_GENERATOR_CID \ 1.42 +{ 0x706d36bb, 0xbf79, 0x4293, \ 1.43 +{ 0x81, 0xf2, 0x8f, 0x68, 0x28, 0xc1, 0x8f, 0x9d } } 1.44 + 1.45 +#endif /* _NSUUIDGENERATOR_H_ */