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_PKCS11SLOT_H__ michael@0: #define __NS_PKCS11SLOT_H__ michael@0: michael@0: #include "nsISupports.h" michael@0: #include "nsIPKCS11Slot.h" michael@0: #include "nsIPKCS11Module.h" michael@0: #include "nsIPKCS11ModuleDB.h" michael@0: #include "nsICryptoFIPSInfo.h" michael@0: #include "nsString.h" michael@0: #include "pk11func.h" michael@0: #include "nsNSSShutDown.h" michael@0: michael@0: class nsPKCS11Slot : public nsIPKCS11Slot, michael@0: public nsNSSShutDownObject michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPKCS11SLOT michael@0: michael@0: nsPKCS11Slot(PK11SlotInfo *slot); michael@0: virtual ~nsPKCS11Slot(); michael@0: michael@0: private: michael@0: michael@0: PK11SlotInfo *mSlot; michael@0: nsString mSlotDesc, mSlotManID, mSlotHWVersion, mSlotFWVersion; michael@0: int mSeries; michael@0: michael@0: virtual void virtualDestroyNSSReference(); michael@0: void destructorSafeDestroyNSSReference(); michael@0: void refreshSlotInfo(); michael@0: }; michael@0: michael@0: class nsPKCS11Module : public nsIPKCS11Module, michael@0: public nsNSSShutDownObject michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPKCS11MODULE michael@0: michael@0: nsPKCS11Module(SECMODModule *module); michael@0: virtual ~nsPKCS11Module(); michael@0: michael@0: private: michael@0: SECMODModule *mModule; michael@0: michael@0: virtual void virtualDestroyNSSReference(); michael@0: void destructorSafeDestroyNSSReference(); michael@0: }; michael@0: michael@0: class nsPKCS11ModuleDB : public nsIPKCS11ModuleDB, michael@0: public nsICryptoFIPSInfo michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPKCS11MODULEDB michael@0: NS_DECL_NSICRYPTOFIPSINFO michael@0: michael@0: nsPKCS11ModuleDB(); michael@0: virtual ~nsPKCS11ModuleDB(); michael@0: /* additional members */ michael@0: }; michael@0: michael@0: #define NS_PKCS11MODULEDB_CID \ michael@0: { 0xff9fbcd7, 0x9517, 0x4334, \ michael@0: { 0xb9, 0x7a, 0xce, 0xed, 0x78, 0x90, 0x99, 0x74 }} michael@0: michael@0: #endif