|
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: Timer for connections to smartcard. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSCARDCONNECTIONTIMER_H |
|
21 #define CSCARDCONNECTIONTIMER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "ScardBase.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CScardConnector; |
|
28 |
|
29 /** |
|
30 * Timer class, which is used while establishing connection to smart card. |
|
31 * |
|
32 * @lib Scard.lib |
|
33 * @since Series60 2.1 |
|
34 */ |
|
35 class CScardConnectionTimer : public CActive |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aConnector Pointer to connector object |
|
42 * @param aTimeOut Timeout |
|
43 */ |
|
44 static CScardConnectionTimer* NewL( CScardConnector* aConnector, |
|
45 TInt32 aTimeOut ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CScardConnectionTimer(); |
|
51 |
|
52 public: // Functions from base classes |
|
53 |
|
54 /** |
|
55 * From CActive RunL. |
|
56 */ |
|
57 void RunL(); |
|
58 |
|
59 /** |
|
60 * From CActive DoCancel. |
|
61 */ |
|
62 void DoCancel(); |
|
63 |
|
64 private: |
|
65 |
|
66 /** |
|
67 * C++ default constructor. |
|
68 * @param aConnector Pointer to connector object |
|
69 * @param aTimeOut Timeout |
|
70 */ |
|
71 CScardConnectionTimer( CScardConnector* aConnector, |
|
72 TInt32 aTimeOut ); |
|
73 |
|
74 /** |
|
75 * By default Symbian 2nd phase constructor is private. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 private: // Data |
|
80 // Timeout |
|
81 TInt32 iTimeOut; |
|
82 |
|
83 // Pointer to timer. Owned. |
|
84 RTimer* iTimer; |
|
85 |
|
86 // Pointer to connector. Not owned. |
|
87 CScardConnector* iConnector; |
|
88 }; |
|
89 |
|
90 #endif // CSCARDCONNECTIONTIMER_H |
|
91 |
|
92 // End of File |