|
1 /* |
|
2 * Copyright (c) 2003 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: For describing required smart card reader connections. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSCARDCONNECTIONREQUIREMENT_H |
|
21 #define CSCARDCONNECTIONREQUIREMENT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "ScardDefs.h" |
|
25 |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * This class contains requirements for new connections. |
|
31 * |
|
32 * @lib Scard.lib |
|
33 * @since Series60 2.1 |
|
34 */ |
|
35 class TScardConnectionRequirement // : public CBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 IMPORT_C TScardConnectionRequirement(); |
|
43 |
|
44 public: // New functions |
|
45 |
|
46 /** |
|
47 * Set Explixit reader name |
|
48 * @param aExplicitName Explicit reader name |
|
49 * @return void |
|
50 */ |
|
51 IMPORT_C void SetExplicitL( TScardReaderName& aExplicitName ); |
|
52 |
|
53 /** |
|
54 * Set excluded reader name |
|
55 * @param aExcludedName Excluded Reader name |
|
56 * @return void |
|
57 */ |
|
58 IMPORT_C void SetExcludedL( TScardReaderName& aExcludedName ); |
|
59 |
|
60 /** |
|
61 * Set ATR bytes |
|
62 * @param aATR ATR bytes |
|
63 * @return void |
|
64 */ |
|
65 IMPORT_C void SetATRL( TScardATR& aATR ); |
|
66 |
|
67 /** |
|
68 * Set AID bytes |
|
69 * @param aAIDBytes AID bytes |
|
70 * @return void |
|
71 */ |
|
72 IMPORT_C void SetAIDBytesL( TDesC8& aAIDBytes ); |
|
73 |
|
74 /** |
|
75 * Clear excplicit reader name |
|
76 * @return void |
|
77 */ |
|
78 IMPORT_C void ClearExplicitL(); |
|
79 |
|
80 /** |
|
81 * Clear Excluded reader name |
|
82 * @return void |
|
83 */ |
|
84 IMPORT_C void ClearExcludedL(); |
|
85 |
|
86 /** |
|
87 * Clear ATR bytes |
|
88 * @return void |
|
89 */ |
|
90 IMPORT_C void ClearATRL(); |
|
91 |
|
92 /** |
|
93 * Clear AID bytes |
|
94 * @return void |
|
95 */ |
|
96 IMPORT_C void ClearAIDBytesL(); |
|
97 |
|
98 /** |
|
99 * Set new readers only flag |
|
100 * @param aNewOnly Flag to tell if only new readers are supported |
|
101 * @return void |
|
102 */ |
|
103 IMPORT_C void NewReadersOnly( const TBool aNewOnly ); |
|
104 |
|
105 /** |
|
106 * Set new card only flag |
|
107 * @param aNewOnly Flag to tell if only new cards are supported |
|
108 * @return void |
|
109 */ |
|
110 IMPORT_C void NewCardsOnly( const TBool aNewOnly ); |
|
111 |
|
112 private: |
|
113 |
|
114 /** |
|
115 * Prohibit copy constructor if not deriving from CBase. |
|
116 */ |
|
117 TScardConnectionRequirement( TScardConnectionRequirement& ); |
|
118 /** |
|
119 * Prohibit assigment operator if not deriving from CBase. |
|
120 */ |
|
121 TScardConnectionRequirement& operator=( |
|
122 const TScardConnectionRequirement& aRequirement ); |
|
123 |
|
124 private: // Data |
|
125 // If we want only one singular reader. Owned. |
|
126 TScardReaderName* iExplicitReader; |
|
127 // This is the reader we do NOT want. Owned. |
|
128 TScardReaderName* iExcludedReader; |
|
129 // The reader should have a SC with these ATR bytes. Owned. |
|
130 TScardATR* iATRBytes; |
|
131 // The reader should have a SC with an appl match these AID bytes.Owned. |
|
132 TDesC8* iAIDBytes; |
|
133 // Count of parameters |
|
134 TInt iParameterCount; |
|
135 // New card only |
|
136 TBool iNewCards; |
|
137 // New readers only |
|
138 TBool iNewReaders; |
|
139 |
|
140 public: // Friend classes |
|
141 friend class CScardComm; |
|
142 |
|
143 }; |
|
144 |
|
145 #endif // CSCARDCONNECTIONREQUIREMENT_H |
|
146 |
|
147 // End of File |