security/manager/ssl/src/nsPK11TokenDB.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/src/nsPK11TokenDB.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef __NS_PK11TOKENDB_H__
    1.11 +#define __NS_PK11TOKENDB_H__
    1.12 +
    1.13 +#include "nsCOMPtr.h"
    1.14 +#include "nsString.h"
    1.15 +#include "nsISupports.h"
    1.16 +#include "nsIPK11TokenDB.h"
    1.17 +#include "nsIPK11Token.h"
    1.18 +#include "nsNSSHelper.h"
    1.19 +#include "pk11func.h"
    1.20 +#include "nsNSSShutDown.h"
    1.21 +
    1.22 +class nsPK11Token : public nsIPK11Token,
    1.23 +                    public nsNSSShutDownObject
    1.24 +{
    1.25 +public:
    1.26 +  NS_DECL_ISUPPORTS
    1.27 +  NS_DECL_NSIPK11TOKEN
    1.28 +
    1.29 +  nsPK11Token(PK11SlotInfo *slot);
    1.30 +  virtual ~nsPK11Token();
    1.31 +  /* additional members */
    1.32 +
    1.33 +private:
    1.34 +  friend class nsPK11TokenDB;
    1.35 +  void refreshTokenInfo();
    1.36 +
    1.37 +  nsString mTokenName;
    1.38 +  nsString mTokenLabel, mTokenManID, mTokenHWVersion, mTokenFWVersion;
    1.39 +  nsString mTokenSerialNum;
    1.40 +  PK11SlotInfo *mSlot;
    1.41 +  int mSeries;
    1.42 +  nsCOMPtr<nsIInterfaceRequestor> mUIContext;
    1.43 +  virtual void virtualDestroyNSSReference();
    1.44 +  void destructorSafeDestroyNSSReference();
    1.45 +};
    1.46 +
    1.47 +class nsPK11TokenDB : public nsIPK11TokenDB
    1.48 +{
    1.49 +public:
    1.50 +  NS_DECL_ISUPPORTS
    1.51 +  NS_DECL_NSIPK11TOKENDB
    1.52 +
    1.53 +  nsPK11TokenDB();
    1.54 +  virtual ~nsPK11TokenDB();
    1.55 +  /* additional members */
    1.56 +};
    1.57 +
    1.58 +#define NS_PK11TOKENDB_CID \
    1.59 +{ 0xb084a2ce, 0x1dd1, 0x11b2, \
    1.60 +  { 0xbf, 0x10, 0x83, 0x24, 0xf8, 0xe0, 0x65, 0xcc }}
    1.61 +
    1.62 +#endif

mercurial