2001-02-06 23:01:33 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-31 09:33:35 +00: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/. */
|
2001-02-06 23:01:33 +00:00
|
|
|
|
|
|
|
#ifndef __NS_PK11TOKENDB_H__
|
|
|
|
#define __NS_PK11TOKENDB_H__
|
|
|
|
|
2001-05-15 20:40:28 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
2001-02-06 23:01:33 +00:00
|
|
|
#include "nsISupports.h"
|
|
|
|
#include "nsIPK11TokenDB.h"
|
2002-09-17 18:51:22 +00:00
|
|
|
#include "nsIPK11Token.h"
|
2001-05-15 20:40:28 +00:00
|
|
|
#include "nsNSSHelper.h"
|
|
|
|
#include "pk11func.h"
|
2003-01-18 14:03:00 +00:00
|
|
|
#include "nsNSSShutDown.h"
|
2001-05-15 20:40:28 +00:00
|
|
|
|
2003-01-18 14:03:00 +00:00
|
|
|
class nsPK11Token : public nsIPK11Token,
|
|
|
|
public nsNSSShutDownObject
|
2001-05-15 20:40:28 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIPK11TOKEN
|
|
|
|
|
2014-08-31 23:26:27 +00:00
|
|
|
explicit nsPK11Token(PK11SlotInfo *slot);
|
2001-05-15 20:40:28 +00:00
|
|
|
/* additional members */
|
|
|
|
|
2014-06-23 22:40:03 +00:00
|
|
|
protected:
|
|
|
|
virtual ~nsPK11Token();
|
|
|
|
|
2001-05-15 20:40:28 +00:00
|
|
|
private:
|
|
|
|
friend class nsPK11TokenDB;
|
2005-06-02 01:17:35 +00:00
|
|
|
void refreshTokenInfo();
|
2001-05-15 20:40:28 +00:00
|
|
|
|
|
|
|
nsString mTokenName;
|
|
|
|
nsString mTokenLabel, mTokenManID, mTokenHWVersion, mTokenFWVersion;
|
|
|
|
nsString mTokenSerialNum;
|
|
|
|
PK11SlotInfo *mSlot;
|
2005-06-02 01:17:35 +00:00
|
|
|
int mSeries;
|
2001-05-15 20:40:28 +00:00
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mUIContext;
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void virtualDestroyNSSReference() override;
|
2003-01-18 14:03:00 +00:00
|
|
|
void destructorSafeDestroyNSSReference();
|
2001-05-15 20:40:28 +00:00
|
|
|
};
|
2001-02-06 23:01:33 +00:00
|
|
|
|
|
|
|
class nsPK11TokenDB : public nsIPK11TokenDB
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIPK11TOKENDB
|
|
|
|
|
|
|
|
nsPK11TokenDB();
|
2014-06-23 22:40:03 +00:00
|
|
|
|
|
|
|
protected:
|
2001-02-06 23:01:33 +00:00
|
|
|
virtual ~nsPK11TokenDB();
|
|
|
|
/* additional members */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NS_PK11TOKENDB_CID \
|
|
|
|
{ 0xb084a2ce, 0x1dd1, 0x11b2, \
|
|
|
|
{ 0xbf, 0x10, 0x83, 0x24, 0xf8, 0xe0, 0x65, 0xcc }}
|
|
|
|
|
|
|
|
#endif
|