webengine/wrtharvester/src/wrtharvester.cpp
branchRCL_3
changeset 92 e1bea15f9a39
parent 91 30342f40acbf
child 93 79859ed3eea9
equal deleted inserted replaced
91:30342f40acbf 92:e1bea15f9a39
   333           session.SetBlanketPermissionL( uid, EBlanketUnknown );
   333           session.SetBlanketPermissionL( uid, EBlanketUnknown );
   334           CleanupStack::PopAndDestroy( &session );
   334           CleanupStack::PopAndDestroy( &session );
   335           }
   335           }
   336       return; 
   336       return; 
   337       }
   337       }
   338              
   338       
       
   339 	if(!iCanAccessRegistry)
       
   340 		return;             
       
   341 		
   339     TWidgetOperations operation( Uninitialized );
   342     TWidgetOperations operation( Uninitialized );
   340     if( aTrigger == KActive )
   343     if( aTrigger == KActive )
   341         {
   344         {
   342         HBufC* temp = aContentId.Alloc();
   345         HBufC* temp = aContentId.Alloc();
   343         iHSWidgets.Append( temp );
   346         iHSWidgets.Append( temp );
   769 void CWrtHarvester::QueueOperationL( TWidgetOperations aOperation, TUid aUid )
   772 void CWrtHarvester::QueueOperationL( TWidgetOperations aOperation, TUid aUid )
   770     {
   773     {
   771     //Hack to find out if WidgetUi exist as Queue keeps filling up
   774     //Hack to find out if WidgetUi exist as Queue keeps filling up
   772     SWidgetOperation op = { aOperation, aUid };
   775     SWidgetOperation op = { aOperation, aUid };
   773     
   776     
   774     if((iHSCount*3 <= iWidgetOperations.Count() && !CheckTaskExistsL() ) || (aOperation == WidgetSelect))
   777     TInt value = KErrNone;
       
   778     TInt error = iWidgetUIListener->GetValue(value);
       
   779     
       
   780     if((iHSCount*3 <= iWidgetOperations.Count() && !CheckTaskExistsL() ) || (aOperation == WidgetSelect && !CheckTaskExistsL() && value ) )
   775         {        
   781         {        
   776         ClearAllOperations();
   782         ClearAllOperations();
   777         iWidgetUIListener->SetValue(1);
   783         iWidgetUIListener->SetValue(1);
   778         } 
   784         } 
   779     
   785     
   829 //
   835 //
   830 void CWrtHarvester::TryLaunchNextOperationL()
   836 void CWrtHarvester::TryLaunchNextOperationL()
   831     {
   837     {
   832     TInt value = KErrNone;
   838     TInt value = KErrNone;
   833     TInt error = iWidgetUIListener->GetValue(value);
   839     TInt error = iWidgetUIListener->GetValue(value);
   834     if( error == KErrNone && value == 1 && iWidgetOperations.Count() != 0 )
   840     if( error == KErrNone && value == 1 && iWidgetOperations.Count() != 0 && iCanAccessRegistry )
   835         {
   841         {
   836         // Set value to 0 so that next widget is not launched before Widget App sets value to 1.
   842         // Set value to 0 so that next widget is not launched before Widget App sets value to 1.
   837         iWidgetUIListener->SetValue( 0 );
   843         iWidgetUIListener->SetValue( 0 );
   838         //Always launch the first in operation
   844         //Always launch the first in operation
   839         LaunchWidgetOperationL( iWidgetOperations[0] );
   845         LaunchWidgetOperationL( iWidgetOperations[0] );
   840         iWidgetOperations.Remove( 0 );
   846         
       
   847         if(iWidgetOperations[0].iOperation == WidgetSelect)
       
   848         	ClearAllOperations();        
       
   849         else
       
   850         	iWidgetOperations.Remove( 0 );
   841         }
   851         }
   842     }
   852     }
   843 
   853 
   844 void CWrtHarvester::ClearAllOperations()
   854 void CWrtHarvester::ClearAllOperations()
   845     {
   855     {