michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __NS_PK11TOKENDB_H__ michael@0: #define __NS_PK11TOKENDB_H__ michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: #include "nsISupports.h" michael@0: #include "nsIPK11TokenDB.h" michael@0: #include "nsIPK11Token.h" michael@0: #include "nsNSSHelper.h" michael@0: #include "pk11func.h" michael@0: #include "nsNSSShutDown.h" michael@0: michael@0: class nsPK11Token : public nsIPK11Token, michael@0: public nsNSSShutDownObject michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPK11TOKEN michael@0: michael@0: nsPK11Token(PK11SlotInfo *slot); michael@0: virtual ~nsPK11Token(); michael@0: /* additional members */ michael@0: michael@0: private: michael@0: friend class nsPK11TokenDB; michael@0: void refreshTokenInfo(); michael@0: michael@0: nsString mTokenName; michael@0: nsString mTokenLabel, mTokenManID, mTokenHWVersion, mTokenFWVersion; michael@0: nsString mTokenSerialNum; michael@0: PK11SlotInfo *mSlot; michael@0: int mSeries; michael@0: nsCOMPtr mUIContext; michael@0: virtual void virtualDestroyNSSReference(); michael@0: void destructorSafeDestroyNSSReference(); michael@0: }; michael@0: michael@0: class nsPK11TokenDB : public nsIPK11TokenDB michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPK11TOKENDB michael@0: michael@0: nsPK11TokenDB(); michael@0: virtual ~nsPK11TokenDB(); michael@0: /* additional members */ michael@0: }; michael@0: michael@0: #define NS_PK11TOKENDB_CID \ michael@0: { 0xb084a2ce, 0x1dd1, 0x11b2, \ michael@0: { 0xbf, 0x10, 0x83, 0x24, 0xf8, 0xe0, 0x65, 0xcc }} michael@0: michael@0: #endif