|
1 /* |
|
2 * Copyright (c) 2004 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: DM Fota Adapter |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __NSMLDMFOTAADAPTER_H__ |
|
22 #define __NSMLDMFOTAADAPTER_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <smldmadapter.h> |
|
27 #include <fotaengine.h> |
|
28 #include <fotaConst.h> |
|
29 |
|
30 #include "nsmldmfotaadapterdb.h" |
|
31 |
|
32 |
|
33 // CONSTANTS |
|
34 |
|
35 const TInt KNSmlDMFotaResultBufferExpandSize = 64; |
|
36 const TInt KNSmlDMFotaStreamingTreshold = 4096; |
|
37 const TInt KNSmlDMFotaNullPkgId = -1; |
|
38 |
|
39 // final result values |
|
40 const TInt KNSmlDMFotaUndefinedError = 410; |
|
41 const TInt KNSmlDMFotaSuccessfullDownload = 202; |
|
42 const TInt KNSmlDMFotaBadUrl = 502; |
|
43 |
|
44 // P&S keys defined & owned by FotaServer for OMA DM large object |
|
45 // sets the OMA DM large object download status |
|
46 const TUint32 KFotaLrgObjDl = 0x00000005; |
|
47 // sets the profile id used for OMA DM large object download |
|
48 const TUint32 KFotaLrgObjProfileId = 0x00000006; |
|
49 // literals for DDF structure |
|
50 _LIT8( KNSmlDMFotaNode, "FUMO" ); |
|
51 _LIT8( KNSmlDMFotaNodeName, "PkgName" ); |
|
52 _LIT8( KNSmlDMFotaNodeVersion, "PkgVersion" ); |
|
53 _LIT8( KNSmlDMFotaNodeDownload, "Download" ); |
|
54 _LIT8( KNSmlDMFotaNodeDownloadUrl, "PkgURL" ); |
|
55 _LIT8( KNSmlDMFotaNodeUpdate, "Update" ); |
|
56 _LIT8( KNSmlDMFotaNodeUpdateData, "PkgData" ); |
|
57 _LIT8( KNSmlDMFotaNodeDownloadAndUpdate, "DownloadAndUpdate" ); |
|
58 _LIT8( KNSmlDMFotaNodeDownloadAndUpdateUrl, "PkgURL" ); |
|
59 _LIT8( KNSmlDMFotaNodeState, "State" ); |
|
60 |
|
61 // descriptions for DDF nodes |
|
62 _LIT8( KNSmlDMFotaNodeDescription, |
|
63 "Placeholder for all firmware management objects" ); |
|
64 |
|
65 _LIT8( KNSmlDMFotaRunTimeNodeDescription, |
|
66 "Placeholder for a single firmware management object" ); |
|
67 |
|
68 _LIT8( KNSmlDMFotaNodeNameDescription, |
|
69 "Name of a firmware update package" ); |
|
70 |
|
71 _LIT8( KNSmlDMFotaNodeVersionDescription, |
|
72 "Version of a firmware update package" ); |
|
73 |
|
74 _LIT8( KNSmlDMFotaNodeDownloadDescription, |
|
75 "Execution target for firmware update package download" ); |
|
76 |
|
77 _LIT8( KNSmlDMFotaNodeDownloadUrlDescription, |
|
78 "Url to a location containing binary firmare update package" ); |
|
79 |
|
80 _LIT8( KNSmlDMFotaNodeUpdateDescription, |
|
81 "Execution target for installing update package to device" ); |
|
82 |
|
83 _LIT8( KNSmlDMFotaNodeUpdateDataDescription, |
|
84 "Binary data used in installation" ); |
|
85 |
|
86 _LIT8( KNSmlDMFotaNodeDownloadAndUpdateDescription, |
|
87 "Execution target for downloading firmware update package and installing it" ); |
|
88 |
|
89 _LIT8( KNSmlDMFotaNodeDownloadAndUpdateUrlDescription, |
|
90 "Url to a location containing binary firmare update package" ); |
|
91 |
|
92 _LIT8( KNSmlDMFotaNodeStateDescription, |
|
93 "Current state of firmware update" ); |
|
94 |
|
95 // mime types etc |
|
96 _LIT8( KNSmlDMFotaRunTimeMimeType, |
|
97 "org.openmobilealliance/1.0/FirmwareUpdateManagementObject" ); |
|
98 |
|
99 _LIT8( KNSmlDMFotaTextPlain, "text/plain" ); |
|
100 _LIT8( KNSmlDMFotaDDFVersion, "1.0" ); |
|
101 |
|
102 _LIT8( KNSmlDMFotaUpdateMetaType, |
|
103 "org.openmobilealliance.dm.firmwareupdate.update" ); |
|
104 |
|
105 _LIT8( KNSmlDMFotaDownloadMetaType, |
|
106 "org.openmobilealliance.dm.firmwareupdate.download" ); |
|
107 |
|
108 _LIT8( KNSmlDMFotaDownloadAndUpdateMetaType, |
|
109 "org.openmobilealliance.dm.firmwareupdate.downloadandupdate" ); |
|
110 |
|
111 _LIT8( KNSmlDMFotaMetaFormat, "text/plain" ); |
|
112 |
|
113 _LIT8( KNSmlDMFotaRunTimeChildren, |
|
114 "PkgName/PkgVersion/Download/Update/DownloadAndUpdate/State" ); |
|
115 |
|
116 // uri related |
|
117 _LIT8( KNSmlDMFotaSeparatorDes, "/" ); |
|
118 _LIT8( KNSmlDMFotaRuntimeMatch, "*FUMO/*" ); |
|
119 _LIT8( KNSmlDMFotaRootMatch, "*FUMO" ); |
|
120 |
|
121 |
|
122 /** |
|
123 * CNSmlDmFotaAdapter, the main adapter class of Fota. Provides methods |
|
124 * to access and modify FUMO objects. |
|
125 * |
|
126 * @lib nsmldmfotaadapter.lib |
|
127 * |
|
128 */ |
|
129 class CNSmlDmFotaAdapter : public CSmlDmAdapter |
|
130 { |
|
131 |
|
132 public: |
|
133 |
|
134 /** |
|
135 * Two-phased constructor. |
|
136 * @param aDmCallback A pointer to DM Callback, which is used to |
|
137 * set statuses and results of commands. |
|
138 * @return A pointer to the newly created adapter. |
|
139 */ |
|
140 static CNSmlDmFotaAdapter* NewL( MSmlDmCallback* aDmCallback ); |
|
141 |
|
142 /** |
|
143 * Two-phased constructor. Pushes the pointer onto the CleanupStack. |
|
144 * @param aDmCallback A pointer to DM Callback, which is used to |
|
145 * set statuses and results of commands. |
|
146 * @return A pointer to the newly created adapter. |
|
147 */ |
|
148 static CNSmlDmFotaAdapter* NewLC( MSmlDmCallback* aDmCallback ); |
|
149 |
|
150 /** |
|
151 * Destructor. |
|
152 */ |
|
153 virtual ~CNSmlDmFotaAdapter(); |
|
154 |
|
155 public: |
|
156 |
|
157 // from CSmlDmAdapter |
|
158 |
|
159 /** |
|
160 * Sets current version of Fota adapter's DDF structure to aDDFVersion. |
|
161 * @param aVersion Buffer which on return contains the version. |
|
162 */ |
|
163 void DDFVersionL( CBufBase& aDDFVersion ); |
|
164 |
|
165 /** |
|
166 * Fills the DDF structure of firmware management object using the given |
|
167 * reference as the root of DDF. Also checks if there are any Generic |
|
168 * Alerts to be sent to current remote DM server. If there are, delegates |
|
169 * the alerts to SOS Server using Private API. |
|
170 * @param aDDFObject Reference to root DDF node. |
|
171 */ |
|
172 void DDFStructureL( MSmlDmDDFObject& aDDF ); |
|
173 |
|
174 /** |
|
175 * Updates a leaf object in FUMO. Sets ENotFound as status to DM Framework, |
|
176 * if aURI and/or aLUID is not valid. |
|
177 * @param aURI Uri which spesifies the leaf to be updated in a firmware |
|
178 * object. |
|
179 * @param aLUID Identifier used to identify in which firmware object |
|
180 * the leaf should be updated. |
|
181 * @param aObject Data used in the update. |
|
182 * @param aType Mime type of the data. Ignored in Fota adapter. |
|
183 * @param aStatusRef Identifier that is used when setting the completion |
|
184 * status to DM Framework. |
|
185 */ |
|
186 void UpdateLeafObjectL( const TDesC8& aURI, |
|
187 const TDesC8& aLUID, |
|
188 const TDesC8& aObject, |
|
189 const TDesC8& aType, |
|
190 TInt aStatusRef ); |
|
191 |
|
192 /** |
|
193 * Deletes a firmware object from Fota DB. If aURI does not point to a |
|
194 * runtime node and/or aLUIDis invalid, ENotFound is set as status for |
|
195 * this command. |
|
196 * @param aURI Uri which spesifies a firmware object. |
|
197 * @param aLUID Identifier used to identify in which firmware object |
|
198 * should be deleted. |
|
199 * @param aStatusRef Identifier that is used when setting the completion |
|
200 * status to DM Framework. |
|
201 */ |
|
202 void DeleteObjectL( const TDesC8& aURI, |
|
203 const TDesC8& aLUID, |
|
204 const TInt aStatusRef ); |
|
205 |
|
206 /** |
|
207 * Fetches a leaf object in FUMO. Sets ENotFound as status to DM Framework, |
|
208 * if aURI and/or aLUID is not valid. |
|
209 * @param aURI Uri which spesifies the leaf to be fetched. |
|
210 * @param aLUID Identifier used to identify from which firmware object the |
|
211 * leaf should be fetched. |
|
212 * @param aType Mime type that server wishes to be used in the returned data. |
|
213 * Ignored in Fota adapter (but used when setting the result). |
|
214 * @param aResultRef Identifier that is used when setting the result |
|
215 * (fetched data) to DM Framework. |
|
216 * @param aStatusRef Identifier that is used when setting the completion |
|
217 * status to DM Framework. |
|
218 */ |
|
219 void FetchLeafObjectL( const TDesC8& aURI, |
|
220 const TDesC8& aLUID, |
|
221 const TDesC8& aType, |
|
222 const TInt aResultsRef, |
|
223 const TInt aStatusRef ); |
|
224 |
|
225 /** |
|
226 * Forms a list of children of given node (aURI) and sets the list to |
|
227 * DM Framework as result. |
|
228 * @param aURI Uri which spesifies the node whose children should be |
|
229 * listed. In Fota this should point to either to the ./FUMO or ./FUMO/<x>. |
|
230 * In the first case aPreviousURISegmentList is trusted and the list is |
|
231 * formed entirely based on it. In the latter case, a hard coded list of |
|
232 * run time node's children is returned. |
|
233 * @param aLUID Identifier of aURI. Ignored in Fota adapter. |
|
234 * @param aPreviousURISegmentList A List of aURI's children formed by |
|
235 * DM Framework. |
|
236 * @param aResultRef Identifier that is used when setting the result |
|
237 * (fetched data) to DM Framework. |
|
238 * @param aStatusRef Identifier that is used when setting the completion |
|
239 * status to DM Framework. |
|
240 */ |
|
241 void ChildURIListL( const TDesC8& aURI, |
|
242 const TDesC8& aLUID, |
|
243 const CArrayFix<TSmlDmMappingInfo>& aPreviousURISegmentList, |
|
244 const TInt aResultsRef, |
|
245 const TInt aStatusRef ); |
|
246 |
|
247 /** |
|
248 * Adds a firmware object to Fota DB. If aURI does not point to a runtime |
|
249 * node and/or aLUID is invalid, ENotFound is set as status for this |
|
250 * command. |
|
251 * @param aURI Uri which spesifies the firmware object. |
|
252 * @param aParentLUID Identifier of aURI. If this is a valid ID, then |
|
253 * the object has already been added and EAlreadyExists is set as status |
|
254 * for this command. |
|
255 * @param aStatusRef Identifier that is used when setting the completion |
|
256 * status to DM Framework. |
|
257 */ |
|
258 void AddNodeObjectL( const TDesC8& aURI, |
|
259 const TDesC8& aParentLUID, |
|
260 const TInt aStatusRef ); |
|
261 |
|
262 /** |
|
263 * This method is used to update PkgData, which is the only large object |
|
264 * data in FUMO. Adapter opens a stream to a data (using Fota Engine) |
|
265 * and sets this stream to aStream after which this method returns. DM Host |
|
266 * Server then writes the data to the stream piece by piece and finally |
|
267 * calls StreamCommittedL() when all data is written. |
|
268 * @param aURI Uri which spesifies the leaf to be updated in a firmware |
|
269 * object. If this does not point to ./FUMO/<x>/Update/PkgData, ENotFound |
|
270 * is set as status for this command. |
|
271 * @param aLUID Identifier used to identify in which firmware object the |
|
272 * data should be updated. |
|
273 * @param aStream Pointer to a stream, where the opened stream is set. |
|
274 * @param aType Mime type of the data. Ignored in Fota adapter. |
|
275 * @param aStatusRef Identifier that is used when setting the completion |
|
276 * status to DM Framework. |
|
277 */ |
|
278 void UpdateLeafObjectL( const TDesC8& aURI, |
|
279 const TDesC8& aLUID, |
|
280 RWriteStream*& aStream, |
|
281 const TDesC8& aType, |
|
282 const TInt aStatusRef ); |
|
283 |
|
284 /** |
|
285 * Fetches the size of leaf object's data in bytes. Sets ENotFound as |
|
286 * status to DM Framework, if aURI and/or aLUID is not valid. |
|
287 * @param aURI Uri which spesifies the leaf whose data is measured. |
|
288 * @param aLUID Identifier used to identify from which firmware object |
|
289 * the leaf size should be counted. |
|
290 * @param aType Mime type that server wishes to be used in the returned |
|
291 * data. Ignored in Fota adapter (but used when setting the result) |
|
292 * @param aResultRef Identifier that is used when setting the result |
|
293 * (fetched data) to DM Framework. |
|
294 * @param aStatusRef Identifier that is used when setting the completion |
|
295 * status to DM Framework. |
|
296 */ |
|
297 void FetchLeafObjectSizeL( const TDesC8& aURI, |
|
298 const TDesC8& aLUID, |
|
299 const TDesC8& aType, |
|
300 const TInt aResultsRef, |
|
301 const TInt aStatusRef ); |
|
302 |
|
303 /** |
|
304 * Executes command targeting Download, DownloadAndUpdate or Update. In any |
|
305 * other case, ENotFound is set as status for this command. Saves all |
|
306 * the data needed when reporting the final result of this command in |
|
307 * the beginning of next DM session, fetches needed data for the command |
|
308 * and delegates the command to Fota Engine. |
|
309 * @param aURI Uri which spesifies the target node for the exec command. |
|
310 * @param aLUID Identifier used to identify the firmware object where the |
|
311 * target node lies. |
|
312 * @param aArgument The argument data of the exec command. In Fota this is |
|
313 * an overloaded feature, and this parameter contains the Correlator of |
|
314 * the exec command. |
|
315 * @param aType Mime type of aArgument. Ignored in Fota adapter. |
|
316 * @param aStatusRef Identifier that is used when setting the completion |
|
317 * status to DM Framework. |
|
318 */ |
|
319 void ExecuteCommandL( const TDesC8& aURI, |
|
320 const TDesC8& aLUID, |
|
321 const TDesC8& aArgument, |
|
322 const TDesC8& aType, |
|
323 const TInt aStatusRef ); |
|
324 |
|
325 /** |
|
326 * Not supported. |
|
327 */ |
|
328 void ExecuteCommandL( const TDesC8& aURI, |
|
329 const TDesC8& aLUID, |
|
330 RWriteStream*& aStream, |
|
331 const TDesC8& aType, |
|
332 const TInt aStatusRef ); |
|
333 |
|
334 /** |
|
335 * Not supported. |
|
336 */ |
|
337 void CopyCommandL( const TDesC8& aTargetURI, |
|
338 const TDesC8& aTargetLUID, |
|
339 const TDesC8& aSourceURI, |
|
340 const TDesC8& aSourceLUID, |
|
341 const TDesC8& aType, |
|
342 TInt aStatusRef ); |
|
343 |
|
344 /** |
|
345 * Not supported. |
|
346 */ |
|
347 void StartAtomicL(); |
|
348 |
|
349 /** |
|
350 * Not supported. |
|
351 */ |
|
352 void CommitAtomicL(); |
|
353 |
|
354 /** |
|
355 * Not supported. |
|
356 */ |
|
357 void RollbackAtomicL(); |
|
358 |
|
359 /** |
|
360 * Returns whether or not streaming is supported in this adapter. In Fota |
|
361 * this method is also used to enquire whether or not a large object |
|
362 * whose size is given in aItemSize fits to disk (OOD check using Fota |
|
363 * Engine), and to acknowledge that Generic Alerts have been successfully |
|
364 * sent. If aItemSize is larger that 0, OOD check feature is executed. If |
|
365 * aItemSize equals KNSmlDMResetGenAlerts, Generic Alerts are marked sent. |
|
366 * Otherwise aItemSize is set to a treshold value, which is used by DM |
|
367 * Host Server to determine if streaming should be used (large object) |
|
368 * or not. |
|
369 * @param aItemSize If this parameter is larger than zero in the beginning, |
|
370 * on return it equals KErrNone if the data fits to disk, and KErrNoMemory |
|
371 * if not. If in the beginning this param equals KNSmlDMResetGenAlerts, |
|
372 * Generic Alerts are marked sent. Otherwise if in the beginning this param |
|
373 * is less or equal to zero, on return it equals to the treshold value |
|
374 * mentioned above. |
|
375 * @return Whether or not streaming is supported in this adapter |
|
376 * (ETrue always). |
|
377 */ |
|
378 TBool StreamingSupport( TInt& aItemSize ); |
|
379 |
|
380 /** |
|
381 * DM Host Server notifies Fota adapter using this method, when all data |
|
382 * has been written to the stream opened for streaming in UpdateLeafObjectL |
|
383 * targeting PkgData. Fota adapter forwards this notification to Fota |
|
384 * Engine. |
|
385 */ |
|
386 void StreamCommittedL(); |
|
387 |
|
388 /** |
|
389 * Not supported. |
|
390 */ |
|
391 void CompleteOutstandingCmdsL(); |
|
392 |
|
393 private: |
|
394 |
|
395 /** |
|
396 * Check if fota table exists |
|
397 * @param aLUID ID of the node |
|
398 * @return whether table exists |
|
399 */ |
|
400 TBool TableExistsL(const TDesC8& aLUID) const; |
|
401 |
|
402 /** |
|
403 * Default constructor. |
|
404 * @param aEcomArguments A pointer to MSmlDmCallback which is received |
|
405 * through ECom. The pointer is passed on to base class. |
|
406 */ |
|
407 CNSmlDmFotaAdapter( TAny* aEcomArguments ); |
|
408 |
|
409 /** |
|
410 * Second phase construction. |
|
411 */ |
|
412 void ConstructL(); |
|
413 |
|
414 /** |
|
415 * Fetches the data in firmware object identified by aLUID (object) and |
|
416 * aURI (leaf). |
|
417 * @param aURI Identifies the leaf whose data should be fetched. |
|
418 * @param aLUID Identifies the FW object in which the leaf object is. |
|
419 * @param aObject Reference to CBufBase to which the fetched data is |
|
420 * written. |
|
421 * @return Status code according to the success of the fetch. |
|
422 */ |
|
423 CSmlDmAdapter::TError DoFetchObjectL( const TDesC8& aURI, |
|
424 const TDesC8& aLUID, |
|
425 CBufBase& aObject ); |
|
426 |
|
427 /** |
|
428 * Gets data needed for Update execution from Fota DB and notifies |
|
429 * Fota Engine. Note: this method does not wait for Fota Engine to |
|
430 * execute the command, but immediately returns when Fota Engine has been |
|
431 * notified. |
|
432 * @param aLUID The id of the firmware object to which this exec is |
|
433 * targeted. |
|
434 * @param aProfile The profile id of the currently running DM session. |
|
435 * @return Status code according to the success of the method. |
|
436 */ |
|
437 CSmlDmAdapter::TError DoExecUpdateL( const TNSmlDmFwObjectId aLUID, |
|
438 const TSmlProfileId aProfile ); |
|
439 |
|
440 /** |
|
441 * Gets data needed for Download or DownloadAndUpdate execution from |
|
442 * Fota DB and notifies Fota Engine. Note: this method does not wait |
|
443 * for Fota Engine to execute the command, but immediately returns when |
|
444 * Fota Engine has been notified. |
|
445 * @param aLUID The id of the firmware object to which this exec is |
|
446 * targeted. |
|
447 * @param aProfile The profile id of the currently running DM session. |
|
448 * @param aUpdate If set ETrue, executes DownloadAndUpdate. Otherwise |
|
449 * executes Download. |
|
450 * @return Status code according to the success of the method. |
|
451 */ |
|
452 CSmlDmAdapter::TError DoExecDownloadL( const TNSmlDmFwObjectId aLUID, |
|
453 const TSmlProfileId aProfile, |
|
454 TBool aUpdate ); |
|
455 |
|
456 /** |
|
457 * Saves all the data needed to save before any exec command and returns |
|
458 * the id of the profile of currently running DM session. |
|
459 * @param aURI Management uri, which is the target of the exec command. |
|
460 * @param aLUID Identifies the firm3ware object that is the target of the |
|
461 * exec command. |
|
462 * @param aCorrelator Correlator received as an argument in the exec |
|
463 * command. |
|
464 * @return Profile id of the currently running DM session. |
|
465 */ |
|
466 TSmlProfileId SaveExecInfoL( const TDesC8& aURI, |
|
467 const TNSmlDmFwObjectId aLUID, |
|
468 const TDesC8& aCorrelator ); |
|
469 |
|
470 /** |
|
471 * Fetches profile id and server id of the currently running DM session |
|
472 * using Client API. |
|
473 * @param aProfId Reference which on succesful return contains the |
|
474 * profile id. |
|
475 * @param aServerId Reference which on successful return contains |
|
476 * the server id. |
|
477 */ |
|
478 void GetServerInfoL( TSmlProfileId& aProfId, HBufC8*& aServerId ) const; |
|
479 |
|
480 /** |
|
481 * Checks if there are any firmware objects that have empty final results. |
|
482 * If there are, checks if any their final result should be reported to |
|
483 * currently running DM session's remote server using Generic Alert. |
|
484 * I.e. if the remote server is the same as with any of those firmware |
|
485 * object's whose execution's final result has not been reported yet, |
|
486 * uses Private API to generate Generic Alert about them. |
|
487 */ |
|
488 void MakeGenericAlertsL(); |
|
489 |
|
490 /*** |
|
491 * Checks existance of predefined node under FUMO and adds it to |
|
492 * DM Tree |
|
493 **/ |
|
494 |
|
495 void CheckAndAddPredefinedNodeL(); |
|
496 /*** |
|
497 * Gets predefined node name to be created under FUMO from cenrep |
|
498 * |
|
499 **/ |
|
500 |
|
501 void GetPredefinedNodeL(TDes8& aNode); |
|
502 /** |
|
503 * Sets final result to all those FW objects that are associated with |
|
504 * current DM session's remote server, have been a target to an exec |
|
505 * command and that exec command has been finished. I.e. Generic Alert |
|
506 * has been successfully sent reporting these final results, and is not |
|
507 * needed to be sent anymore in next DM session. |
|
508 */ |
|
509 void MarkGenericAlertsSentL(); |
|
510 |
|
511 /** |
|
512 * Returns correct meta/type acoording to the execution target aURI. |
|
513 * @param aURI The target for exec command, e.g. ./FUMO/<X>/Update |
|
514 * @return The meta/type |
|
515 */ |
|
516 TPtrC8 GetMetaType( const TDesC8& aURI ) const; |
|
517 |
|
518 /** |
|
519 * Maps a system wide error code to a TError. |
|
520 * @param aError A system wide error code. |
|
521 * @return A TError value depending on aError. |
|
522 */ |
|
523 CSmlDmAdapter::TError MapErrorToStatus( TInt aError ) const; |
|
524 |
|
525 /** |
|
526 * Parses a numeric value from aLUID. |
|
527 * @param aLUID A string representation of a signed integer. |
|
528 * @return TInt value. |
|
529 */ |
|
530 TInt DesToInt( const TDesC8& aLUID ) const; |
|
531 |
|
532 /** |
|
533 * Return the last uri segment of the given uri. E.g. in |
|
534 * ./FUMO/<x>/Download last uri segment is "Download" |
|
535 * @param aURI the uri to be parsed. |
|
536 * @return The last segment. |
|
537 */ |
|
538 TPtrC8 LastURISeg( const TDesC8& aURI ) const; |
|
539 |
|
540 /** |
|
541 * Fills the given information to a DDF Object node. |
|
542 * @param aNode The node whose data is filled. |
|
543 * @param aAccTypes The access types of the node. |
|
544 * @param aOccurance Occurance of the node. |
|
545 * @param aScope The scope of the node. |
|
546 * @param aFormat The format of the node's data, i.e. node/chr/bin/... |
|
547 * @param aDescription Informal description of the node. |
|
548 */ |
|
549 void FillNodeInfoL( MSmlDmDDFObject& aNode, |
|
550 const TSmlDmAccessTypes& aAccTypes, |
|
551 MSmlDmDDFObject::TOccurence aOccurrence, |
|
552 MSmlDmDDFObject::TScope aScope, |
|
553 MSmlDmDDFObject::TDFFormat aFormat, |
|
554 const TDesC8& aDescription ) const; |
|
555 |
|
556 private: |
|
557 |
|
558 CNSmlDmFotaAdapterDb* iFotaDb; |
|
559 RFotaEngineSession iFotaEngine; |
|
560 |
|
561 TInt iPkgId; |
|
562 |
|
563 }; |
|
564 |
|
565 #endif // __NSMLDMFOTAADAPTER_H__ |