1 /* |
|
2 * Copyright (c) 2005-2006 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 fotaserver component |
|
15 * This is part of fotaapplication. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __FOTAIPCTYPES_H_ |
|
22 #define __FOTAIPCTYPES_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <SyncMLDef.h> |
|
27 #include "fotaengine.h" |
|
28 |
|
29 // DATA TYPES |
|
30 typedef TBuf16<200> TPkgIdList; |
|
31 |
|
32 /** |
|
33 * Inter process parameters for fotaserver |
|
34 * |
|
35 * @lib fotaengine.lib |
|
36 * @since S60 v3.1 |
|
37 */ |
|
38 class TDownloadIPCParams |
|
39 { |
|
40 |
|
41 public: |
|
42 TDownloadIPCParams (); |
|
43 |
|
44 |
|
45 /** |
|
46 * Copy constructor. |
|
47 * |
|
48 * @since S60 v3.1 |
|
49 * @param p Copy of another ipc |
|
50 * @return None |
|
51 */ |
|
52 TDownloadIPCParams (const TDownloadIPCParams& p ); |
|
53 |
|
54 |
|
55 /** |
|
56 * Package id |
|
57 */ |
|
58 TInt iPkgId; |
|
59 |
|
60 /** |
|
61 * Profile id |
|
62 */ |
|
63 TSmlProfileId iProfileId; |
|
64 |
|
65 |
|
66 /** |
|
67 * Package name |
|
68 */ |
|
69 TBuf8<KFotaMaxPkgNameLength> iPkgName; |
|
70 |
|
71 |
|
72 /** |
|
73 * Package version |
|
74 */ |
|
75 TBuf8<KFotaMaxPkgVersionLength> iPkgVersion; |
|
76 |
|
77 |
|
78 /** |
|
79 * Should DM server be notified via generic alert. |
|
80 * This is not saved to database! |
|
81 */ |
|
82 TBool iSendAlert; |
|
83 |
|
84 |
|
85 /** |
|
86 * IAP Id used |
|
87 */ |
|
88 TInt iIapId; |
|
89 |
|
90 /** |
|
91 * Total size of the package |
|
92 */ |
|
93 TUint iPkgSize; |
|
94 |
|
95 |
|
96 /** |
|
97 * DM Session type |
|
98 */ |
|
99 TInt iSessionType; |
|
100 |
|
101 |
|
102 /** |
|
103 * Should update happen later? |
|
104 */ |
|
105 TBool iUpdateLtr; |
|
106 }; |
|
107 |
|
108 |
|
109 /** |
|
110 * Extended inter process parameters for fotaserver |
|
111 * |
|
112 * @lib fotaengine.lib |
|
113 * @since S60 v3.1 |
|
114 */ |
|
115 class TPackageState : public TDownloadIPCParams |
|
116 { |
|
117 |
|
118 public: |
|
119 |
|
120 |
|
121 /** |
|
122 * Constructor |
|
123 * |
|
124 * @since S60 v3.1 |
|
125 * @param aState State |
|
126 * @param aResult Result |
|
127 * @return None |
|
128 */ |
|
129 TPackageState( RFotaEngineSession::TState aState, TInt aResult); |
|
130 |
|
131 |
|
132 /** |
|
133 * Constructor |
|
134 * |
|
135 * @since S60 v3.1 |
|
136 * @param aState State |
|
137 * @return None |
|
138 */ |
|
139 TPackageState( RFotaEngineSession::TState aState); |
|
140 |
|
141 |
|
142 /** |
|
143 * Constructor |
|
144 * |
|
145 * @since S60 v3.1 |
|
146 * @param p Ipc params |
|
147 * @return None |
|
148 */ |
|
149 TPackageState( TDownloadIPCParams p); |
|
150 |
|
151 TPackageState(); |
|
152 |
|
153 /** |
|
154 * Externalizes class to a stream |
|
155 * |
|
156 * @since S60 v3.1 |
|
157 * @param aStream Target stream |
|
158 * @return None |
|
159 */ |
|
160 void ExternalizeL (RWriteStream& aStream); |
|
161 |
|
162 |
|
163 /** |
|
164 * Externalizes class from a stream |
|
165 * |
|
166 * @since S60 v3.1 |
|
167 * @param aStream Source stream |
|
168 * @return None |
|
169 */ |
|
170 void InternalizeL(RReadStream& /*aStream*/); |
|
171 |
|
172 |
|
173 /** |
|
174 * Assignment operator |
|
175 * |
|
176 * @since S60 v3.1 |
|
177 * @param a Source |
|
178 * @return None |
|
179 */ |
|
180 TPackageState& operator=(const TDownloadIPCParams& a); |
|
181 |
|
182 |
|
183 /** |
|
184 * Assignment operator |
|
185 * |
|
186 * @since S60 v3.1 |
|
187 * @param a Source |
|
188 * @return None |
|
189 */ |
|
190 TPackageState& operator=(const TPackageState& a); |
|
191 |
|
192 |
|
193 public: |
|
194 |
|
195 /** |
|
196 * State (see FUMO specification) |
|
197 */ |
|
198 RFotaEngineSession::TState iState; |
|
199 |
|
200 |
|
201 /** |
|
202 * Result code (FUMO) |
|
203 */ |
|
204 TInt iResult; |
|
205 |
|
206 /** |
|
207 * Counter for generic alert raporting. If raporting fails, try again in |
|
208 * successive boots until counter runs to 0 |
|
209 */ |
|
210 TInt iSmlTryCount; |
|
211 |
|
212 private : |
|
213 /* |
|
214 * Method to set the iSmlTryCount depending on Cenrep settings |
|
215 */ |
|
216 void SetSmlTryCount(); |
|
217 }; |
|
218 |
|
219 |
|
220 |
|
221 /** |
|
222 * Update reminder task |
|
223 * |
|
224 * @lib fotaengine.lib |
|
225 * @since S60 v3.1 |
|
226 */ |
|
227 class TFotaScheduledUpdate |
|
228 { |
|
229 public: |
|
230 TFotaScheduledUpdate(const TInt aPkgId, const TInt aScheduleId) |
|
231 { |
|
232 iPkgId = aPkgId; |
|
233 iScheduleId = aScheduleId; |
|
234 } |
|
235 |
|
236 TInt iPkgId; |
|
237 |
|
238 TInt iScheduleId; |
|
239 }; |
|
240 |
|
241 #endif // __FOTAIPCTYPES_H_ |
|
242 |
|
243 // End of File |
|