1 /* |
|
2 * Copyright (c) 2005-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: CSConPCD implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "sconpcd.h" |
|
22 #include "sconpcdconsts.h" |
|
23 #include "sconinstqueue.h" |
|
24 #include "sconbrqueue.h" |
|
25 #include "sconmetadata.h" |
|
26 #include "sconsynchandler.h" |
|
27 #include "debug.h" |
|
28 |
|
29 // ============================= MEMBER FUNCTIONS =============================== |
|
30 |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CreateCSConPCDL() |
|
34 // Entry to CSConPCD |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 EXPORT_C CSConPCD* CreateCSConPCDL() |
|
38 { |
|
39 TRACE_FUNC; |
|
40 return CSConPCD::NewL(); |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CSConPCD::NewL() |
|
45 // Two-phase constructor |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 CSConPCD* CSConPCD::NewL() |
|
49 { |
|
50 TRACE_FUNC_ENTRY; |
|
51 CSConPCD* self = new (ELeave) CSConPCD(); |
|
52 CleanupStack::PushL( self ); |
|
53 self->ConstructL(); |
|
54 CleanupStack::Pop( self ); |
|
55 TRACE_FUNC_EXIT; |
|
56 return self; |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CSConPCD::CSConPCD() |
|
61 // Constructor |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 CSConPCD::CSConPCD() : iInstallerQueue( NULL ), iBackupRestoreQueue( NULL ), |
|
65 iLatestReply(NULL), iTaskNumber( 0 ), iMaxObjectSize( 65536 ), |
|
66 iLastOperation( ENoTask ) |
|
67 { |
|
68 TRACE_FUNC; |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CSConPCD::ConstructL() |
|
73 // Initializes member data |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 void CSConPCD::ConstructL() |
|
77 { |
|
78 TRACE_FUNC_ENTRY; |
|
79 User::LeaveIfError( iFs.Connect() ); |
|
80 iInstallerQueue = CSConInstallerQueue::NewL( iFs ); |
|
81 iBackupRestoreQueue = CSConBackupRestoreQueue::NewL( iMaxObjectSize, iFs ); |
|
82 iInstallerQueue->QueueAddress( iBackupRestoreQueue ); |
|
83 iBackupRestoreQueue->QueueAddress( iInstallerQueue ); |
|
84 |
|
85 if ( !CActiveScheduler::Current() ) |
|
86 { |
|
87 CActiveScheduler* scheduler = new (ELeave) CActiveScheduler(); |
|
88 CActiveScheduler::Install( scheduler ); |
|
89 } |
|
90 CActiveScheduler::Add( iInstallerQueue ); |
|
91 CActiveScheduler::Add( iBackupRestoreQueue ); |
|
92 iSyncHandler = CSconSyncHandler::NewL( iFs ); |
|
93 TRACE_FUNC_EXIT; |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CSConPCD::~CSConPCD() |
|
98 // Destructor |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 CSConPCD::~CSConPCD() |
|
102 { |
|
103 TRACE_FUNC_ENTRY; |
|
104 if ( iInstallerQueue ) |
|
105 { |
|
106 iInstallerQueue->Cancel(); |
|
107 delete iInstallerQueue; |
|
108 iInstallerQueue = NULL; |
|
109 } |
|
110 |
|
111 if ( iBackupRestoreQueue ) |
|
112 { |
|
113 iBackupRestoreQueue->Cancel(); |
|
114 delete iBackupRestoreQueue; |
|
115 iBackupRestoreQueue = NULL; |
|
116 } |
|
117 |
|
118 if ( iLatestReply ) |
|
119 { |
|
120 delete iLatestReply; |
|
121 iLatestReply = NULL; |
|
122 } |
|
123 |
|
124 if ( iSyncHandler ) |
|
125 { |
|
126 iSyncHandler->Cancel(); |
|
127 delete iSyncHandler; |
|
128 iSyncHandler = NULL; |
|
129 } |
|
130 iFs.Close(); |
|
131 TRACE_FUNC_EXIT; |
|
132 } |
|
133 |
|
134 // ----------------------------------------------------------------------------- |
|
135 // CSConPCD::PutTaskL( CSConTask* aTask ) |
|
136 // Receives a new task |
|
137 // ----------------------------------------------------------------------------- |
|
138 // |
|
139 TInt CSConPCD::PutTaskL( CSConTask*& aTask ) |
|
140 { |
|
141 TRACE_FUNC_ENTRY; |
|
142 TInt ret( KErrNone ); |
|
143 TInt maxObjectSize( 0 ); |
|
144 |
|
145 if ( iLastOperation == EPutTask ) |
|
146 { |
|
147 LOGGER_WRITE( "CSConPCD::PutTaskL() : Two Puts in a row -> Reset()" ); |
|
148 ResetPCD(); |
|
149 } |
|
150 else |
|
151 { |
|
152 LOGGER_WRITE( "CSConPCD::PutTaskL() : Protocol procedure ok" ); |
|
153 iLastOperation = EPutTask; |
|
154 } |
|
155 |
|
156 switch( aTask->GetServiceId() ) |
|
157 { |
|
158 case ECancel : |
|
159 ret = CancelL( aTask->iCancelTaskId, aTask->iCancelTaskAll ); |
|
160 delete aTask; |
|
161 break; |
|
162 case EGetDataOwnerStatus : |
|
163 ret = SupportedBRTaskL( aTask ); |
|
164 break; |
|
165 case EGetDataSize : |
|
166 ret = SupportedBRTaskL( aTask ); |
|
167 break; |
|
168 case EGetStatus : |
|
169 ret = GetStatusL( aTask->iGetStatusParams->iTaskId, |
|
170 aTask->iGetStatusParams->iAll ); |
|
171 delete aTask; |
|
172 break; |
|
173 case EInstall : |
|
174 ret = SupportedInstTaskL( aTask ); |
|
175 break; |
|
176 case EListDataOwners : |
|
177 ret = SupportedBRTaskL( aTask ); |
|
178 break; |
|
179 case EListInstalledApps : |
|
180 ret = SupportedInstTaskL( aTask ); |
|
181 break; |
|
182 case EListPublicFiles : |
|
183 ret = SupportedBRTaskL( aTask ); |
|
184 break; |
|
185 case ERequestData : |
|
186 ret = SupportedBRTaskL( aTask ); |
|
187 break; |
|
188 case ESetBURMode : |
|
189 ret = SupportedBRTaskL( aTask ); |
|
190 break; |
|
191 case ESetInstParams : |
|
192 ret = SupportedInstTaskL( aTask ); |
|
193 break; |
|
194 case ESupplyData : |
|
195 ret = SupportedBRTaskL( aTask ); |
|
196 break; |
|
197 case EUninstall : |
|
198 ret = SupportedInstTaskL( aTask ); |
|
199 break; |
|
200 case EUpdateDeviceInfo : |
|
201 maxObjectSize = aTask->iDevInfoParams->iMaxObjectSize; |
|
202 ret = UpdateDeviceInfoL( maxObjectSize ); |
|
203 iTaskNumber++; |
|
204 delete aTask; |
|
205 break; |
|
206 case EReboot : |
|
207 RebootTaskL( aTask ); |
|
208 delete aTask; |
|
209 break; |
|
210 case EGetMetadata : |
|
211 ret = KErrNone; |
|
212 GetMetadataTaskL( *aTask ); |
|
213 delete aTask; |
|
214 break; |
|
215 default : |
|
216 break; |
|
217 } |
|
218 LOGGER_WRITE_1( "CSConPCD::PutTaskL() : returned %d", ret ); |
|
219 return ret; |
|
220 } |
|
221 |
|
222 // ----------------------------------------------------------------------------- |
|
223 // CSConPCD::GetReply() |
|
224 // Returns a reply to previous PutTaskL operation |
|
225 // ----------------------------------------------------------------------------- |
|
226 // |
|
227 CSConStatusReply* CSConPCD::GetReply() |
|
228 { |
|
229 TRACE_FUNC_ENTRY; |
|
230 |
|
231 if ( iLastOperation == EGetReply ) |
|
232 { |
|
233 LOGGER_WRITE( "CSConPCD::GetReply() : Two Gets in a row -> Reset()" ); |
|
234 ResetPCD(); |
|
235 } |
|
236 else |
|
237 { |
|
238 LOGGER_WRITE( "CSConPCD::GetReply() : Protocol procedure ok" ); |
|
239 iLastOperation = EGetReply; |
|
240 } |
|
241 CSConStatusReply* reply = iLatestReply; |
|
242 iLatestReply = NULL; |
|
243 TRACE_FUNC_EXIT; |
|
244 return reply; |
|
245 } |
|
246 |
|
247 // ----------------------------------------------------------------------------- |
|
248 // CSConPCD::ResetPCD() |
|
249 // Resets the module to the initial state |
|
250 // ----------------------------------------------------------------------------- |
|
251 // |
|
252 void CSConPCD::ResetPCD() |
|
253 { |
|
254 TRACE_FUNC_ENTRY; |
|
255 if ( iInstallerQueue ) |
|
256 { |
|
257 LOGGER_WRITE( "CSConPCD::ResetPCD() : Reseting installer queue" ); |
|
258 iInstallerQueue->Reset(); |
|
259 } |
|
260 |
|
261 if ( iBackupRestoreQueue ) |
|
262 { |
|
263 LOGGER_WRITE( "CSConPCD::ResetPCD() : Reseting backup queue" ); |
|
264 iBackupRestoreQueue->Reset(); |
|
265 } |
|
266 |
|
267 TRACE_FUNC_EXIT; |
|
268 } |
|
269 |
|
270 // ----------------------------------------------------------------------------- |
|
271 // CSConPCD::HandleGetSyncRequestL() |
|
272 // |
|
273 // ----------------------------------------------------------------------------- |
|
274 // |
|
275 void CSConPCD::HandleGetSyncRequestL( const TDesC8& aRequest, RWriteStream& aResult, TInt aMaxObjectSize ) |
|
276 { |
|
277 TRACE_FUNC_ENTRY; |
|
278 iSyncHandler->HandleGetSyncRequestL( aRequest, aResult, aMaxObjectSize ); |
|
279 |
|
280 TRACE_FUNC_EXIT; |
|
281 } |
|
282 |
|
283 // ----------------------------------------------------------------------------- |
|
284 // CSConPCD::HandlePutSyncRequestL() |
|
285 // |
|
286 // ----------------------------------------------------------------------------- |
|
287 // |
|
288 void CSConPCD::HandlePutSyncRequestL( const TDesC8& aRequest, RReadStream& aResult ) |
|
289 { |
|
290 TRACE_FUNC_ENTRY; |
|
291 iSyncHandler->HandlePutSyncRequestL( aRequest, aResult ); |
|
292 |
|
293 TRACE_FUNC_EXIT; |
|
294 } |
|
295 |
|
296 // ----------------------------------------------------------------------------- |
|
297 // CSConPCD::SupportedInstTaskL( CSConTask* aTask ) |
|
298 // Fills a reply with predefined supported task -information |
|
299 // ----------------------------------------------------------------------------- |
|
300 // |
|
301 TInt CSConPCD::SupportedInstTaskL( CSConTask* aTask ) |
|
302 { |
|
303 TRACE_FUNC_ENTRY; |
|
304 TInt ret( KErrNone ); |
|
305 iTaskNumber++; |
|
306 ret = iInstallerQueue->AddNewTask( aTask, iTaskNumber ); |
|
307 |
|
308 //Get status for this task |
|
309 TBool all( EFalse ); |
|
310 CSConStatusReply* reply = new (ELeave) CSConStatusReply(); |
|
311 CleanupStack::PushL( reply ); |
|
312 iInstallerQueue->GetQueueStatusL( iTaskNumber, all, reply ); |
|
313 CleanupStack::Pop( reply ); |
|
314 |
|
315 StoreReply( reply ); |
|
316 |
|
317 LOGGER_WRITE_1( "CSConPCD::SupportedInstTaskL() : returned %d", ret ); |
|
318 return ret; |
|
319 } |
|
320 |
|
321 // ----------------------------------------------------------------------------- |
|
322 // CSConPCD::SupportedBRTask( CSConTask* aTask ) |
|
323 // Fills a reply with predefined supported task -information |
|
324 // ----------------------------------------------------------------------------- |
|
325 // |
|
326 TInt CSConPCD::SupportedBRTaskL( CSConTask* aTask ) |
|
327 { |
|
328 TRACE_FUNC_ENTRY; |
|
329 TInt ret( KErrNone ); |
|
330 |
|
331 TInt taskId; |
|
332 |
|
333 taskId = ++iTaskNumber; |
|
334 |
|
335 ret = iBackupRestoreQueue->AddNewTask( aTask, taskId ); |
|
336 LOGGER_WRITE_1( "iBackupRestoreQueue->AddNewTask : ret %d", ret ); |
|
337 //Get status for this task |
|
338 TBool all( EFalse ); |
|
339 CSConStatusReply* reply = new (ELeave) CSConStatusReply(); |
|
340 CleanupStack::PushL( reply ); |
|
341 iBackupRestoreQueue->GetQueueStatusL( iTaskNumber, all, reply ); |
|
342 CleanupStack::Pop( reply ); |
|
343 |
|
344 StoreReply( reply ); |
|
345 |
|
346 TRACE_FUNC_EXIT; |
|
347 return ret; |
|
348 } |
|
349 |
|
350 |
|
351 // ----------------------------------------------------------------------------- |
|
352 // CSConPCD::RebootTask( const CSConTask* aTask ) |
|
353 // Fills a reply with predefined unsupported task -information |
|
354 // ----------------------------------------------------------------------------- |
|
355 // |
|
356 TInt CSConPCD::RebootTaskL( const CSConTask* aTask ) |
|
357 { |
|
358 TRACE_FUNC_ENTRY; |
|
359 TInt ret( KErrNotSupported ); |
|
360 iTaskNumber++; |
|
361 TSConMethodName method( aTask->GetServiceId() ); |
|
362 CSConStatusReply* reply = new (ELeave) CSConStatusReply(); |
|
363 CleanupStack::PushL( reply ); |
|
364 CSConTaskReply* taskReply = new (ELeave) CSConTaskReply(); |
|
365 CleanupStack::PushL( taskReply ); |
|
366 |
|
367 TBool complete( ETrue ); |
|
368 taskReply->InitializeL( method, KSConCodeNotSupported, complete ); |
|
369 taskReply->iTaskId = iTaskNumber; |
|
370 |
|
371 reply->iNoTasks = EFalse; |
|
372 User::LeaveIfError( reply->iTasks.Append( taskReply ) ); |
|
373 CleanupStack::Pop( taskReply ); |
|
374 |
|
375 StoreReply( reply ); |
|
376 CleanupStack::Pop( reply ); |
|
377 |
|
378 LOGGER_WRITE_1( "CSConPCD::RebootTask() : returned %d", ret ); |
|
379 return ret; |
|
380 } |
|
381 |
|
382 // ----------------------------------------------------------------------------- |
|
383 // CSConPCD::GetMetadataTask( const CSConTask* aTask ) |
|
384 // Fills a reply with predefined GetMetadata task -information |
|
385 // ----------------------------------------------------------------------------- |
|
386 // |
|
387 void CSConPCD::GetMetadataTaskL( CSConTask& aTask ) |
|
388 { |
|
389 TRACE_FUNC_ENTRY; |
|
390 |
|
391 aTask.iTaskId = ++iTaskNumber; |
|
392 |
|
393 //Set progress value "task accepted for execution" |
|
394 aTask.SetProgressValue( KSConCodeTaskCreated ); |
|
395 aTask.SetCompleteValue( EFalse ); |
|
396 |
|
397 SConMetadata::ProcessTask( aTask, iFs ); |
|
398 |
|
399 //Get status for this task |
|
400 |
|
401 CSConStatusReply* reply = new (ELeave) CSConStatusReply(); |
|
402 CleanupStack::PushL( reply ); |
|
403 CSConTaskReply* taskReply = new (ELeave) CSConTaskReply(); |
|
404 CleanupStack::PushL( taskReply ); |
|
405 taskReply->InitializeL( aTask ); |
|
406 User::LeaveIfError( reply->iTasks.Append( taskReply ) ); |
|
407 CleanupStack::Pop( taskReply ); |
|
408 |
|
409 if ( !aTask.GetComplete() ) |
|
410 { |
|
411 // clean all unneccessary data from the reply packet |
|
412 taskReply->CleanTaskData(); |
|
413 } |
|
414 |
|
415 |
|
416 StoreReply( reply ); |
|
417 CleanupStack::Pop( reply ); |
|
418 |
|
419 TRACE_FUNC_EXIT; |
|
420 } |
|
421 |
|
422 // ----------------------------------------------------------------------------- |
|
423 // CSConPCD::GetStatus( TInt aTask, TBool aAll ) |
|
424 // Collects a status of a specified task / all tasks |
|
425 // ----------------------------------------------------------------------------- |
|
426 // |
|
427 TInt CSConPCD::GetStatusL( TInt aTask, TBool aAll ) |
|
428 { |
|
429 TRACE_FUNC_ENTRY; |
|
430 TInt ret( KErrNone ); |
|
431 |
|
432 // create mergeReply object. Store installer and br replys here. |
|
433 CSConStatusReply* mergeReply = new (ELeave) CSConStatusReply(); |
|
434 CleanupStack::PushL( mergeReply ); |
|
435 |
|
436 |
|
437 CSConStatusReply* brReply = new (ELeave) CSConStatusReply(); |
|
438 CleanupStack::PushL( brReply ); |
|
439 iBackupRestoreQueue->GetQueueStatusL( aTask, aAll, brReply ); |
|
440 |
|
441 |
|
442 // Create installerReply and populate it |
|
443 CSConStatusReply* installerReply = new (ELeave) CSConStatusReply(); |
|
444 CleanupStack::PushL( installerReply ); |
|
445 iInstallerQueue->GetQueueStatusL( aTask, aAll, installerReply ); |
|
446 |
|
447 if ( !installerReply->iNoTasks || !brReply->iNoTasks ) |
|
448 { |
|
449 mergeReply->iNoTasks = EFalse; |
|
450 } |
|
451 else |
|
452 { |
|
453 mergeReply->iNoTasks = ETrue; |
|
454 } |
|
455 |
|
456 for ( TInt i = 0; i < installerReply->iTasks.Count(); i++ ) |
|
457 { |
|
458 CSConTaskReply* temp = installerReply->iTasks[i]->CopyAndFreeL(); |
|
459 CleanupStack::PushL( temp ); |
|
460 mergeReply->iTasks.AppendL( temp ); |
|
461 CleanupStack::Pop( temp ); |
|
462 } |
|
463 |
|
464 // installer replys are copied to mergereply, delete installerReply |
|
465 CleanupStack::PopAndDestroy( installerReply ); |
|
466 |
|
467 // do same for br reply |
|
468 for ( TInt i = 0; i < brReply->iTasks.Count(); i++ ) |
|
469 { |
|
470 CSConTaskReply* temp = brReply->iTasks[i]->CopyAndFreeL(); |
|
471 CleanupStack::PushL( temp ); |
|
472 mergeReply->iTasks.AppendL( temp ); |
|
473 CleanupStack::Pop( temp ); |
|
474 } |
|
475 |
|
476 CleanupStack::PopAndDestroy( brReply ); |
|
477 |
|
478 CleanupStack::Pop( mergeReply ); |
|
479 // store reply |
|
480 StoreReply( mergeReply ); |
|
481 |
|
482 LOGGER_WRITE_1( "CSConPCD::GetStatus() : returned %d", ret ); |
|
483 return ret; |
|
484 } |
|
485 |
|
486 // ----------------------------------------------------------------------------- |
|
487 // CSConPCD::Cancel( TInt aTask, TBool aAll ) |
|
488 // Cancels a specified task / all tasks |
|
489 // ----------------------------------------------------------------------------- |
|
490 // |
|
491 TInt CSConPCD::CancelL( TInt aTask, TBool aAll ) |
|
492 { |
|
493 TRACE_FUNC_ENTRY; |
|
494 TInt ret( KErrNone ); |
|
495 |
|
496 CSConStatusReply* reply = new (ELeave) CSConStatusReply(); |
|
497 iInstallerQueue->CancelTask( aTask, aAll ); |
|
498 iBackupRestoreQueue->CancelTask( aTask, aAll ); |
|
499 |
|
500 reply->iNoTasks = ETrue; |
|
501 |
|
502 StoreReply( reply ); |
|
503 |
|
504 LOGGER_WRITE_1( "CSConPCD::CancelL() : returned %d", ret ); |
|
505 return ret; |
|
506 } |
|
507 |
|
508 // ----------------------------------------------------------------------------- |
|
509 // CSConPCD::StoreReply( CSConStatusReply*& aReply ) |
|
510 // Stores a reply |
|
511 // ----------------------------------------------------------------------------- |
|
512 // |
|
513 void CSConPCD::StoreReply( CSConStatusReply*& aReply ) |
|
514 { |
|
515 TRACE_FUNC_ENTRY; |
|
516 if ( iLatestReply ) |
|
517 { |
|
518 delete iLatestReply; |
|
519 iLatestReply = NULL; |
|
520 } |
|
521 |
|
522 iLatestReply = aReply; |
|
523 TRACE_FUNC_EXIT; |
|
524 } |
|
525 |
|
526 // ----------------------------------------------------------------------------- |
|
527 // CSConPCD::UpdateDeviceInfo( TInt aMaxObjectSize ) |
|
528 // Creates a reply for UpdateDeviceInfo task |
|
529 // ----------------------------------------------------------------------------- |
|
530 // |
|
531 TInt CSConPCD::UpdateDeviceInfoL( TInt aMaxObjectSize ) |
|
532 { |
|
533 TRACE_FUNC_ENTRY; |
|
534 TInt ret( KErrNone ); |
|
535 TSConMethodName method( EUpdateDeviceInfo ); |
|
536 |
|
537 CSConStatusReply* reply = new (ELeave) CSConStatusReply(); |
|
538 CleanupStack::PushL( reply ); |
|
539 CSConTaskReply* taskReply = new (ELeave) CSConTaskReply(); |
|
540 CleanupStack::PushL( taskReply ); |
|
541 |
|
542 |
|
543 TBool complete( ETrue ); |
|
544 TInt progress( KSConCodeTaskCompleted ); |
|
545 |
|
546 taskReply->InitializeL( method, progress, complete ); |
|
547 taskReply->iTaskId = iTaskNumber; |
|
548 |
|
549 TInt arrayLength = sizeof KSupportedMethods / sizeof KSupportedMethods[0]; |
|
550 |
|
551 for ( TInt i = 0; i < arrayLength; i++ ) |
|
552 { |
|
553 switch( KSupportedMethods[i].method ) |
|
554 { |
|
555 case EGetDataSize : |
|
556 taskReply->iDevInfoParams->iGetSizeSupp = |
|
557 KSupportedMethods[i].support; |
|
558 break; |
|
559 case EInstall : |
|
560 taskReply->iDevInfoParams->iInstallSupp = |
|
561 KSupportedMethods[i].support; |
|
562 break; |
|
563 case EListDataOwners : |
|
564 taskReply->iDevInfoParams->iDataOwnersSupp = |
|
565 KSupportedMethods[i].support; |
|
566 break; |
|
567 case EListInstalledApps : |
|
568 taskReply->iDevInfoParams->iInstAppsSupp = |
|
569 KSupportedMethods[i].support; |
|
570 break; |
|
571 case ERequestData : |
|
572 taskReply->iDevInfoParams->iReqDataSupp = |
|
573 KSupportedMethods[i].support; |
|
574 break; |
|
575 case ESetBURMode : |
|
576 taskReply->iDevInfoParams->iSetBURModeSupp = |
|
577 KSupportedMethods[i].support; |
|
578 break; |
|
579 case ESetInstParams : |
|
580 taskReply->iDevInfoParams->iInstParamsSupp = |
|
581 KSupportedMethods[i].support; |
|
582 break; |
|
583 case ESupplyData : |
|
584 taskReply->iDevInfoParams->iSupplyDataSupp = |
|
585 KSupportedMethods[i].support; |
|
586 break; |
|
587 case EUninstall : |
|
588 taskReply->iDevInfoParams->iUninstallSupp = |
|
589 KSupportedMethods[i].support; |
|
590 break; |
|
591 case EReboot : |
|
592 taskReply->iDevInfoParams->iRebootSupp = |
|
593 KSupportedMethods[i].support; |
|
594 break; |
|
595 default : |
|
596 break; |
|
597 } |
|
598 } |
|
599 |
|
600 taskReply->iDevInfoParams->iVersion.Copy( KCONMLVERSION ); |
|
601 taskReply->iDevInfoParams->iMaxObjectSize = |
|
602 GetMaxObjectSize( aMaxObjectSize ); |
|
603 |
|
604 reply->iNoTasks = EFalse; |
|
605 |
|
606 User::LeaveIfError( reply->iTasks.Append( taskReply ) ); |
|
607 StoreReply( reply ); |
|
608 |
|
609 CleanupStack::Pop( taskReply ); |
|
610 CleanupStack::Pop( reply ); |
|
611 LOGGER_WRITE_1( "CSConPCD::UpdateDeviceInfo() : returned %d", ret ); |
|
612 return ret; |
|
613 } |
|
614 |
|
615 // ----------------------------------------------------------------------------- |
|
616 // CSConPCD::GetMaxObjectSize( TInt /*aClientObjectSize*/ ) const |
|
617 // Gets the current max object size |
|
618 // ----------------------------------------------------------------------------- |
|
619 // |
|
620 TInt CSConPCD::GetMaxObjectSize( TInt /*aClientObjectSize*/ ) const |
|
621 { |
|
622 LOGGER_WRITE_1( "CSConPCD::GetMaxObjectSize() : returned %d", iMaxObjectSize ); |
|
623 return iMaxObjectSize; |
|
624 } |
|
625 |
|
626 // End of file |
|