|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #ifndef __NS_PK11TOKENDB_H__ |
|
8 #define __NS_PK11TOKENDB_H__ |
|
9 |
|
10 #include "nsCOMPtr.h" |
|
11 #include "nsString.h" |
|
12 #include "nsISupports.h" |
|
13 #include "nsIPK11TokenDB.h" |
|
14 #include "nsIPK11Token.h" |
|
15 #include "nsNSSHelper.h" |
|
16 #include "pk11func.h" |
|
17 #include "nsNSSShutDown.h" |
|
18 |
|
19 class nsPK11Token : public nsIPK11Token, |
|
20 public nsNSSShutDownObject |
|
21 { |
|
22 public: |
|
23 NS_DECL_ISUPPORTS |
|
24 NS_DECL_NSIPK11TOKEN |
|
25 |
|
26 nsPK11Token(PK11SlotInfo *slot); |
|
27 virtual ~nsPK11Token(); |
|
28 /* additional members */ |
|
29 |
|
30 private: |
|
31 friend class nsPK11TokenDB; |
|
32 void refreshTokenInfo(); |
|
33 |
|
34 nsString mTokenName; |
|
35 nsString mTokenLabel, mTokenManID, mTokenHWVersion, mTokenFWVersion; |
|
36 nsString mTokenSerialNum; |
|
37 PK11SlotInfo *mSlot; |
|
38 int mSeries; |
|
39 nsCOMPtr<nsIInterfaceRequestor> mUIContext; |
|
40 virtual void virtualDestroyNSSReference(); |
|
41 void destructorSafeDestroyNSSReference(); |
|
42 }; |
|
43 |
|
44 class nsPK11TokenDB : public nsIPK11TokenDB |
|
45 { |
|
46 public: |
|
47 NS_DECL_ISUPPORTS |
|
48 NS_DECL_NSIPK11TOKENDB |
|
49 |
|
50 nsPK11TokenDB(); |
|
51 virtual ~nsPK11TokenDB(); |
|
52 /* additional members */ |
|
53 }; |
|
54 |
|
55 #define NS_PK11TOKENDB_CID \ |
|
56 { 0xb084a2ce, 0x1dd1, 0x11b2, \ |
|
57 { 0xbf, 0x10, 0x83, 0x24, 0xf8, 0xe0, 0x65, 0xcc }} |
|
58 |
|
59 #endif |