128 // |
128 // |
129 void CFeatMgrSession::ServiceL( const RMessage2& aMessage ) |
129 void CFeatMgrSession::ServiceL( const RMessage2& aMessage ) |
130 { |
130 { |
131 FUNC_LOG |
131 FUNC_LOG |
132 // If plugins are not ready all request will be queued. |
132 // If plugins are not ready all request will be queued. |
133 // During backup operation, all write request e.g. EnableFeature will be queued |
133 // During backup & restore operation, all write request |
|
134 // e.g. EnableFeature will return with KErrServerBusy |
134 TInt msgCmd = aMessage.Function(); |
135 TInt msgCmd = aMessage.Function(); |
135 if ( !iFeatMgrServer.PluginsReady() || ( iFeatMgrServer.BackupIsInProgress() && IsWriteOperation( msgCmd ) ) ) |
136 if ( !iFeatMgrServer.PluginsReady() || ( iFeatMgrServer.BURIsInProgress() && IsWriteOperation( msgCmd ) ) ) |
136 { |
137 { |
137 INFO_LOG( "CFeatMgrSession::ServiceL() - plugins not ready or backup is in progress" ); |
138 if ( iFeatMgrServer.BURIsInProgress() ) |
138 iList.AddLast( *CFeatMgrPendingRequest::NewL( aMessage ) ); |
139 { |
|
140 INFO_LOG( "CFeatMgrSession::ServiceL() - backup/restore is in progress - no write operation allowed" ); |
|
141 aMessage.Complete( KErrServerBusy ); |
|
142 } |
|
143 else |
|
144 { |
|
145 INFO_LOG( "CFeatMgrSession::ServiceL() - plugins not ready" ); |
|
146 iList.AddLast( *CFeatMgrPendingRequest::NewL( aMessage ) ); |
|
147 } |
139 } |
148 } |
140 else |
149 else |
141 { |
150 { |
142 #if defined(FEATMGR_INFO_LOG_ENABLED) |
151 #if defined(FEATMGR_INFO_LOG_ENABLED) |
143 // check memory usage |
152 // check memory usage |
523 TPckgC<TInt> resPckg( getIdErr ); |
532 TPckgC<TInt> resPckg( getIdErr ); |
524 aMessage.WriteL( 0, resPckg ); |
533 aMessage.WriteL( 0, resPckg ); |
525 |
534 |
526 break; |
535 break; |
527 } |
536 } |
528 |
537 |
529 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
538 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
|
539 |
|
540 case EFeatMgrResourceMark: |
|
541 ResourceCountMarkStart(); |
|
542 break; |
|
543 |
|
544 case EFeatMgrResourceCheck: |
|
545 ResourceCountMarkEnd(aMessage); |
|
546 break; |
|
547 |
|
548 case EFeatMgrResourceCount: |
|
549 { |
|
550 TInt retCode = CountResources(); |
|
551 User::Leave(retCode); |
|
552 } |
|
553 break; |
|
554 |
|
555 case EFeatMgrSetHeapFailure: |
|
556 { |
|
557 RAllocator::TAllocFail mode = static_cast <RAllocator::TAllocFail> (aMessage.Int0()); |
|
558 TInt failAllocNum = aMessage.Int1(); |
|
559 if(mode == RHeap::EBurstFailNext || mode == RHeap::EBurstRandom || mode == RHeap::EBurstTrueRandom || mode == RHeap::EBurstDeterministic) |
|
560 { |
|
561 User::__DbgSetBurstAllocFail(RHeap::EUser, mode, failAllocNum, 20); |
|
562 } |
|
563 else |
|
564 { |
|
565 User::__DbgSetAllocFail(RHeap::EUser, mode, failAllocNum); |
|
566 } |
|
567 } |
|
568 break; |
|
569 |
530 // debug only API |
570 // debug only API |
531 // returns the size of the iNotifyFeatures array |
571 // returns the size of the iNotifyFeatures array |
532 case EFeatMgrNumberOfNotifyFeatures: |
572 case EFeatMgrNumberOfNotifyFeatures: |
533 { |
573 { |
534 TInt count = iNotifyFeatures.Count(); |
574 TInt count = iNotifyFeatures.Count(); |