|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSTSPINAPDU_H |
|
20 #define CSTSPINAPDU_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "cstscmdapdu.h" |
|
24 |
|
25 namespace java |
|
26 { |
|
27 namespace satsa |
|
28 { |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * Detailed command APDU class for PIN related apdus. |
|
33 * |
|
34 * @since 3.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS(CSTSPinApdu): public CSTSCmdApdu |
|
37 { |
|
38 public: // data types |
|
39 enum TSTSPinApduType |
|
40 { |
|
41 ESTSVerifyPin = 0, |
|
42 ESTSChangePin = 1, |
|
43 ESTSDisablePin = 2, |
|
44 ESTSEnablePin = 3, |
|
45 ESTSUnblockPin = 4 |
|
46 }; |
|
47 |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * @param aType Type of PIN method |
|
53 * @param aP2 Value of P2. |
|
54 * @param aStandard Type of APDU standard |
|
55 */ |
|
56 static CSTSPinApdu* NewLC(TSTSPinApduType aType, |
|
57 TUint8 aP2, |
|
58 CSTSApdu::TSTSApduStandard aStandard); |
|
59 |
|
60 static CSTSPinApdu* NewL(TSTSPinApduType aType, |
|
61 TUint8 aP2, |
|
62 CSTSApdu::TSTSApduStandard aStandard); |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 virtual ~CSTSPinApdu(); |
|
68 |
|
69 private: // New functions |
|
70 |
|
71 /** |
|
72 * C++ default constructor. |
|
73 */ |
|
74 CSTSPinApdu(); |
|
75 |
|
76 /** |
|
77 * By default Symbian 2nd phase constructor is private. |
|
78 */ |
|
79 void ConstructL(TSTSPinApduType aType, |
|
80 TUint8 aP2, |
|
81 CSTSApdu::TSTSApduStandard aStandard); |
|
82 |
|
83 /** |
|
84 * Sets INS byte to APDU data bytes depending of type |
|
85 * @since 3.0 |
|
86 * @param aType Type of PIN method |
|
87 */ |
|
88 void SetPinINS(TSTSPinApduType aType); |
|
89 |
|
90 }; |
|
91 |
|
92 } // namespace satsa |
|
93 } // namespace java |
|
94 #endif // CSTSPINAPDU_H |
|
95 // End of File |