|
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: SWIM launcher. Creates new instance of SwimReader. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "SwimLauncher.h" |
|
22 #include "SwimReaderIF.h" |
|
23 #include "ScardBase.h" |
|
24 #include "WimTrace.h" // for trace logging |
|
25 |
|
26 |
|
27 // ============================= LOCAL FUNCTIONS =============================== |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // NewServiceL |
|
31 // New CSwimReaderLauncher |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 EXPORT_C CSwimReaderLauncher* NewServiceL() |
|
35 { |
|
36 _WIMTRACE(_L("WIM|SwimReader|CSwimReaderLauncher::NewServiceL|Begin")); |
|
37 return new( ELeave ) CSwimReaderLauncher; |
|
38 } |
|
39 |
|
40 |
|
41 // ============================ MEMBER FUNCTIONS =============================== |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CSwimReaderLauncher::CSwimReaderLauncher |
|
45 // C++ default constructor can NOT contain any code, that |
|
46 // might leave. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 CSwimReaderLauncher::CSwimReaderLauncher() |
|
50 { |
|
51 _WIMTRACE(_L("WIM|SwimReader|CSwimReaderLauncher::CSwimReaderLauncher|Begin")); |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CSwimReaderLauncher::ConstructL |
|
56 // Symbian 2nd phase constructor can leave. |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 void CSwimReaderLauncher::ConstructL( MScardReaderService* aService ) |
|
60 { |
|
61 _WIMTRACE(_L("WIM|SwimReader|CSwimReaderLauncher::ConstructL|Begin")); |
|
62 iService = aService; |
|
63 } |
|
64 |
|
65 // Detructor |
|
66 CSwimReaderLauncher::~CSwimReaderLauncher() |
|
67 { |
|
68 _WIMTRACE(_L("WIM|SwimReader|CSwimReaderLauncher::~CSwimReaderLauncher|Begin")); |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CSwimReaderLauncher::CreateReaderL |
|
73 // Create reader |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 MScardReader* CSwimReaderLauncher::CreateReaderL( TReaderID aReaderID ) |
|
77 { |
|
78 _WIMTRACE(_L("WIM|SwimReader|CSwimReaderLauncher::CreateReaderL|Begin")); |
|
79 iReader = CSwimReaderIF::NewL( iService->NotifyObserver(), |
|
80 aReaderID, this ); |
|
81 return iReader; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CSwimReaderLauncher::DeleteReader |
|
86 // Delete reader |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 void CSwimReaderLauncher::DeleteReader( TReaderID /*aReaderID*/ ) |
|
90 { |
|
91 _WIMTRACE(_L("WIM|SwimReader|CSwimReaderLauncher::DeleteReaderL|Begin")); |
|
92 delete iReader; |
|
93 iReader = NULL; |
|
94 } |
|
95 |
|
96 // End of File |