|
1 /* |
|
2 * Copyright (c) 2000 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: Implementation of applicationmanagement components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __APPLICATIONMANAGEMENTCOMMON_H__ |
|
20 #define __APPLICATIONMANAGEMENTCOMMON_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <uikon.hrh> |
|
24 #include "ApplicationManagementConst.h" |
|
25 |
|
26 namespace NApplicationManagement |
|
27 { |
|
28 |
|
29 const TUint32 KAppMgmtServerUid = {0x1020781C}; |
|
30 |
|
31 const TUint32 KAMServiceUid = {0x1020781B}; |
|
32 |
|
33 const TUint32 KOmaDMAppUid = {0x1020781C}; |
|
34 const TInt KVersionLength= 7; // 3 for Major, 1 for '.' and 3 for Minor |
|
35 _LIT( KLiteralPeriod, "."); |
|
36 |
|
37 const TInt KAMDefaultValue = 0; |
|
38 const TInt KAMSCMAdapter = 1; |
|
39 const TInt KAMSCOMOAdapter = 2; |
|
40 |
|
41 const int KDCIdMaxLength = 128 ; |
|
42 typedef TBuf8<KDCIdMaxLength> TDeploymentComponentId; |
|
43 |
|
44 const int KDeploymentComponentNameMaxLength = 128 ; |
|
45 typedef TBuf8<KDeploymentComponentNameMaxLength> TDeploymentComponentName; |
|
46 |
|
47 const int KDeploymentComponentVersionMaxLength = 32; |
|
48 typedef TBuf8<KDeploymentComponentVersionMaxLength> TDeploymentComponentVersion; |
|
49 |
|
50 const int KDeploymentComponentDescriptionMaxLength = 512; |
|
51 typedef TBuf8<KDeploymentComponentVersionMaxLength> TDeploymentComponentDescription; |
|
52 |
|
53 const int KDeploymentComponentPkgIdMaxLength = 256; |
|
54 typedef TBuf8<KDeploymentComponentPkgIdMaxLength> TDeploymentComponentPkgId; |
|
55 |
|
56 const int KDeploymentComponentPkgIdRefMaxLength = 256; |
|
57 typedef TBuf8<KDeploymentComponentPkgIdRefMaxLength> TDeploymentComponentPkgIdRef; |
|
58 |
|
59 const int KDeploymentComponentPkgTypeRefMaxLength = 256; |
|
60 typedef TBuf8<KDeploymentComponentPkgTypeRefMaxLength> TDeploymentComponentPkgType; |
|
61 |
|
62 typedef TBuf8<KDeploymentComponentNameMaxLength> TMidletnameName; |
|
63 |
|
64 typedef TBuf8<KDeploymentComponentNameMaxLength> TMidletVendorName; |
|
65 typedef TBuf8<KDeploymentComponentVersionMaxLength> TMidletVersion; |
|
66 |
|
67 typedef TBuf8<KDeploymentComponentNameMaxLength> TPreInstalledAppName; |
|
68 typedef TBuf8<KDeploymentComponentNameMaxLength> TPreInstalledAppVendorName; |
|
69 typedef TBuf8<KDeploymentComponentVersionMaxLength> TPreInstalledVersion; |
|
70 |
|
71 const int KDeploymentComponentURLMaxLength = 32; |
|
72 |
|
73 const int KMaxMimeLength = 256 ; |
|
74 typedef TBuf8<KMaxMimeLength> TMimeType; |
|
75 |
|
76 const int KMaxDCUserIdLength = 256; |
|
77 typedef TBuf8<KMaxDCUserIdLength> TDCUserId; |
|
78 |
|
79 enum TDeploymentComponentState |
|
80 { |
|
81 EDCSError = -1, |
|
82 EDCSNone = 0, |
|
83 EDCSDelivered = 1, |
|
84 EDCSInactive = 2, |
|
85 EDCSActive = 3, |
|
86 EDCSDownload = 4, |
|
87 EDCSDeployed =5, |
|
88 EDCSDelete = 6 |
|
89 }; |
|
90 |
|
91 enum TDeplCompAttrType |
|
92 { |
|
93 EDCNone = 0, |
|
94 EDCId = 1, |
|
95 EDCName = 2, |
|
96 EDCVersion = 4, |
|
97 EDCInstallOptions = 8, |
|
98 EDCMetaData = 16, |
|
99 EDCMetaDataMime = 24, |
|
100 EDCData = 32, |
|
101 EDCDataMime = 48, |
|
102 EDCStatus = 64, |
|
103 EDCDownloadURI = 128, |
|
104 EDCStateValue = 256, |
|
105 EDCConRef = 512, |
|
106 EDCDescriptionRef = 1024, |
|
107 EDCPkgID = 2048, |
|
108 EDCPkgType = 4096 |
|
109 }; |
|
110 |
|
111 enum TDownloadTarget |
|
112 { |
|
113 EDeliver, |
|
114 EInstall, |
|
115 EInstallAndActivate, |
|
116 EUpdate, |
|
117 EUpdateAndActivate |
|
118 }; |
|
119 enum TSCOMOStatusNodeStates |
|
120 { |
|
121 //Download Status Values |
|
122 EIdle = 10, |
|
123 EDownload_DownloadFailed = 20, |
|
124 EDownload_DownloadProgress = 30, |
|
125 EDownload_DownloadComplete = 40, |
|
126 EDownload_InstallProgress = 50, |
|
127 EDownload_InstalledFailedWithData = 60, |
|
128 EDownload_InstalledFailedWithOutData = 70, |
|
129 //Delivered Status Values |
|
130 EDelivered_RemoveFailed = 20, |
|
131 EDelivered_RemoveProgress = 30, |
|
132 EDelivered_InstallProgress = 40, |
|
133 EDelivered_InstalledFailedWithData = 50, |
|
134 EDelivered_InstallFailedwithOutData = 60, |
|
135 //Deployed Status Values |
|
136 EDeployed_RemoveFailed = 20, |
|
137 EDeployed_RemoveProgress = 30, |
|
138 EDeployed_ActivateFailed = 40, |
|
139 EDeployed_ActivateProgress = 50, |
|
140 EDeployed_DeactivateFailed = 60, |
|
141 EDeployed_DeactivateProgress = 70 |
|
142 }; |
|
143 /** |
|
144 * CAMDeliveryDeploymentComponent class to represent delivery items |
|
145 */ |
|
146 |
|
147 struct TDeploymentComponent |
|
148 { |
|
149 // Data |
|
150 TDeploymentComponentId iId ; |
|
151 TDeploymentComponentName iName; |
|
152 TDeploymentComponentVersion iVersion ; |
|
153 TDeploymentComponentDescription iDescription; |
|
154 TDeploymentComponentPkgId iPkgID; |
|
155 TDeploymentComponentPkgIdRef iPkgIDRef; |
|
156 TDeploymentComponentPkgType iPkgType; |
|
157 TDeploymentComponentState iState ; |
|
158 TDeploymentComponentState iOldState ; |
|
159 TDeploymentComponent() : iId( KNullDesC8() ), |
|
160 iName( KNullDesC8() ), |
|
161 iVersion( KNullDesC8() ), |
|
162 iDescription (KNullDesC8), |
|
163 iState( EDCSNone ), |
|
164 iOldState ( EDCSNone ) |
|
165 |
|
166 { |
|
167 |
|
168 } |
|
169 TDeploymentComponent( const TDesC8 &aId, |
|
170 const TDesC8 &aName, |
|
171 const TDesC8 &aVersion, |
|
172 TDeploymentComponentState aState ) |
|
173 : iId( aId ), |
|
174 iName( aName ), |
|
175 iVersion ( aVersion ), |
|
176 iState ( aState ), |
|
177 iOldState( EDCSNone ) |
|
178 { |
|
179 } |
|
180 }; |
|
181 |
|
182 struct TDeploymentComponentIPC |
|
183 { |
|
184 TDeploymentComponent iComponent; |
|
185 TBuf8<256> iMimeType; |
|
186 TDCUserId iUserId; |
|
187 TDeploymentComponentIPC() : iComponent(), |
|
188 iMimeType( KNullDesC8() ), |
|
189 iUserId( KNullDesC8()) |
|
190 |
|
191 { |
|
192 |
|
193 } |
|
194 TDeploymentComponentIPC( const TDeploymentComponent &aComponent, |
|
195 const TDesC8 &aMimeType, |
|
196 const TDCUserId &aUserId) |
|
197 : iComponent( aComponent ), |
|
198 iMimeType( aMimeType ), |
|
199 iUserId( aUserId ) |
|
200 { |
|
201 |
|
202 } |
|
203 }; |
|
204 |
|
205 struct TDeplCompDataIPC |
|
206 { |
|
207 TUint32 iInternalId; |
|
208 TDeplCompAttrType iAttrType; |
|
209 TBuf8<256> iDataMime; |
|
210 }; |
|
211 |
|
212 } |
|
213 #endif |
|
214 |
|
215 // End of File |