|
1 /* |
|
2 * Copyright (c) 2009 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 #ifndef CWIMJAVAPROVISIONING_H |
|
19 #define CWIMJAVAPROVISIONING_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "Wimi.h" //WIMI functions and definitions |
|
23 #include "JavaUtils.h" //Java Provisioning Smart Card API types |
|
24 |
|
25 // CONSTANTS |
|
26 const TUint8 KWimProvACIFFileOID[] = {0x01, 0x03, 0x06, 0x01, 0x04, 0x01, 0x2A, 0x02, 0x6E, 0x03, 0x01, 0x01, 0x01 }; |
|
27 const TInt KWimProvACIFFileOidLength = 13; |
|
28 |
|
29 const TUint8 KWimProvACIFFileOIDTaged[] = {0x06, 0x0C, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x2A, 0x02, 0x6E, 0x03, 0x01, 0x01, 0x01 }; |
|
30 |
|
31 const TInt KWimProvACIFFileOidLengthTaged = 14; |
|
32 |
|
33 const TInt KWimJavaOidLengthTaged = 16; |
|
34 |
|
35 const TInt KJavaFilePathMaxLength = 8; |
|
36 |
|
37 // FORWARD DECLARATION |
|
38 class CWimUtilityFuncs; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * Class for handling Java Provisioning files. |
|
44 * |
|
45 * @since Series60 3.2 |
|
46 */ |
|
47 class CWimJavaProvisioning : public CBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static CWimJavaProvisioning* NewL(); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~CWimJavaProvisioning(); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Write size of ACIF file to client memory |
|
65 * @param aMessage Client message |
|
66 * @return void |
|
67 */ |
|
68 void ACIFFileSizeL( const RMessage2& aMessage ); |
|
69 |
|
70 void ACFFileSizeL( const RMessage2& aMessage ); |
|
71 /** |
|
72 * Write content of ACIF file to client memory |
|
73 * @param aMessage Client message |
|
74 * @return void |
|
75 */ |
|
76 void ACIFFileContentL( const RMessage2& aMessage ); |
|
77 |
|
78 void ACFFileContentL( const RMessage2& aMessage ); |
|
79 |
|
80 void LabelAndPath( const RMessage2& aMessage ); |
|
81 |
|
82 |
|
83 private: |
|
84 |
|
85 /** |
|
86 * C++ default constructor. |
|
87 */ |
|
88 CWimJavaProvisioning(); |
|
89 |
|
90 /** |
|
91 * By default Symbian 2nd phase constructor is private. |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 /** |
|
96 * Initialize path and size member variables with values got from WIMI. |
|
97 * @return void |
|
98 */ |
|
99 void InitializePathsAndSizes(); |
|
100 |
|
101 void InitializeSize(); |
|
102 /** |
|
103 * Parse size of ACIF file if not given in DODF-JavaProv file |
|
104 * @return void |
|
105 */ |
|
106 void ParseACIFFileSize(); |
|
107 |
|
108 |
|
109 private: // Data |
|
110 // Reference to WIM. Not owned. |
|
111 WIMI_Ref_t* iWimRef; |
|
112 |
|
113 // Path of bootstrap file. Length is 0 if not exists. |
|
114 TBuf8<KJavaFilePathMaxLength> iPathACIF; |
|
115 |
|
116 TBuf8<KJavaFilePathMaxLength> iPathACF; |
|
117 // Size of ACIF file |
|
118 TInt iACIFFileSize; |
|
119 |
|
120 TInt iACFFileSize; |
|
121 // Flag to tell if provisiong file infos are initialized |
|
122 TBool iFileInfosInitialized; |
|
123 |
|
124 // Pointer to CWimUtilityFuncs. Owned. |
|
125 CWimUtilityFuncs* iWimUtilityFuncs; |
|
126 }; |
|
127 |
|
128 #endif // CWIMJAVAPROVISIONING_H |
|
129 |
|
130 // End of File |