143 iManualPauseEnabled = EFalse; |
143 iManualPauseEnabled = EFalse; |
144 iFastHarvestNeeded = EFalse; |
144 iFastHarvestNeeded = EFalse; |
145 iHarvestingPlaceholders = EFalse; |
145 iHarvestingPlaceholders = EFalse; |
146 |
146 |
147 iUnmountDetected = EFalse; |
147 iUnmountDetected = EFalse; |
|
148 iPriorityInterruptDetected = EFalse; |
148 } |
149 } |
149 |
150 |
150 // --------------------------------------------------------------------------- |
151 // --------------------------------------------------------------------------- |
151 // ~CHarvesterAO |
152 // ~CHarvesterAO |
152 // --------------------------------------------------------------------------- |
153 // --------------------------------------------------------------------------- |
910 iPHArray.Insert( hd, 0 ); |
911 iPHArray.Insert( hd, 0 ); |
911 } |
912 } |
912 iTempReadyPHArray.Reset(); |
913 iTempReadyPHArray.Reset(); |
913 CleanupStack::PopAndDestroy( &mdeObjectArray ); |
914 CleanupStack::PopAndDestroy( &mdeObjectArray ); |
914 return; |
915 return; |
|
916 } |
|
917 // Check for priority interrupt |
|
918 // If priority interrupt occures, drop current operation to handle the priority item first, |
|
919 // and continue from current situation after that |
|
920 else if( iPriorityInterruptDetected ) |
|
921 { |
|
922 WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - Priority interrupt during execution!" ); |
|
923 const TInt currentPHArrayCount( iPHArray.Count() ); |
|
924 for( TInt y( iTempReadyPHArray.Count() -1 ); y >=0; y-- ) |
|
925 { |
|
926 CHarvesterData* hd = iTempReadyPHArray[y]; |
|
927 if( currentPHArrayCount ) |
|
928 { |
|
929 // Leave the first item in the array as it is the priority item |
|
930 iPHArray.Insert( hd, 1 ); |
|
931 } |
|
932 else |
|
933 { |
|
934 iPHArray.Insert( hd, 0 ); |
|
935 } |
|
936 } |
|
937 iTempReadyPHArray.Reset(); |
|
938 CleanupStack::PopAndDestroy( &mdeObjectArray ); |
|
939 return; |
915 } |
940 } |
916 |
941 |
917 if( objDefStr.Length() == 0 || |
942 if( objDefStr.Length() == 0 || |
918 ( objDefStr == KInUse ) ) |
943 ( objDefStr == KInUse ) ) |
919 { |
944 { |
1642 iNextRequest = ERequestIdle; |
1667 iNextRequest = ERequestIdle; |
1643 } |
1668 } |
1644 |
1669 |
1645 // Reset unmount flag, as unmount is handled before RunL is called again after aborted harvesting run |
1670 // Reset unmount flag, as unmount is handled before RunL is called again after aborted harvesting run |
1646 iUnmountDetected = EFalse; |
1671 iUnmountDetected = EFalse; |
|
1672 // Reset priority flag, as interrupt is handled automatically first when RunL is called again |
|
1673 iPriorityInterruptDetected = EFalse; |
1647 |
1674 |
1648 User::LeaveIfError( iStatus.Int() ); |
1675 User::LeaveIfError( iStatus.Int() ); |
1649 switch( iNextRequest ) |
1676 switch( iNextRequest ) |
1650 { |
1677 { |
1651 // no more items in queue |
1678 // no more items in queue |