|
1 /* |
|
2 * Copyright (c) 2002 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: Used by ProvisioningSC to read data from SIM cards |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CWPWIMHANDLER_H |
|
21 #define CWPWIMHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <msvapi.h> |
|
26 // #include <MWPCard.h> |
|
27 #include <ProvSC.h> |
|
28 // FORWARD DECLARATIONS |
|
29 class MWPWimObserver; |
|
30 class CWimOMAProv; |
|
31 |
|
32 /** |
|
33 * |
|
34 * |
|
35 * @since 2.5 |
|
36 */ |
|
37 class CWPWimHandler : public CActive |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CWPWimHandler* NewL( MWPWimObserver& aObserver ); |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CWPWimHandler* NewLC( MWPWimObserver& aObserver ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CWPWimHandler(); |
|
55 |
|
56 public: |
|
57 /** |
|
58 * Reads provisioning file asynchronously |
|
59 * @since 2.5 |
|
60 */ |
|
61 void ReadProvFile( const TOMAType& aFileType ); |
|
62 /** |
|
63 * Gets the length of the provisioning |
|
64 * document |
|
65 * @since 2.5 |
|
66 * @return length |
|
67 */ |
|
68 // TInt DocLength(); |
|
69 /** |
|
70 * Fetches the read provisioning document |
|
71 * @since 2.5 |
|
72 * @return pointer to a copy of the prov doc |
|
73 */ |
|
74 HBufC8* DocL(); |
|
75 |
|
76 protected: |
|
77 // from CActive |
|
78 void RunL(); |
|
79 void DoCancel(); |
|
80 |
|
81 |
|
82 private: |
|
83 |
|
84 /** |
|
85 * C++ default constructor. |
|
86 */ |
|
87 CWPWimHandler( MWPWimObserver& aObserver ); |
|
88 |
|
89 /** |
|
90 * By default Symbian 2nd phase constructor is private. |
|
91 */ |
|
92 void ConstructL(); |
|
93 |
|
94 void Retrieve(); |
|
95 |
|
96 private: |
|
97 |
|
98 enum TOMAPhase |
|
99 { |
|
100 EInitialize, |
|
101 EConnectClientSession, |
|
102 EInitializeWim, |
|
103 EInitializeDone, |
|
104 EGetSize, |
|
105 EGetSizeDone, |
|
106 ERetrieve, |
|
107 ERetrieveDone |
|
108 }; |
|
109 |
|
110 private: // Data |
|
111 |
|
112 CWimOMAProv* iFileLoader; // owns |
|
113 HBufC8* iProvisioningDoc; // owns |
|
114 MWPWimObserver& iObserver; |
|
115 TRequestStatus* iGetStatus; // owns |
|
116 TPtr8 iProvData; |
|
117 TOMAPhase iPhase; |
|
118 TInt iFileSize; |
|
119 TBool iClientInitialized; |
|
120 TOMAType iFileType; |
|
121 }; |
|
122 |
|
123 #endif // CWPWimHandler_H |
|
124 |
|
125 // End of File |