predictivesearch/PcsAlgorithm/Algorithm1/src/CPcsAlgorithm1.cpp
branchRCL_3
changeset 85 38bb213f60ba
parent 63 f4a778e096c2
equal deleted inserted replaced
74:6b5524b4f673 85:38bb213f60ba
   976             }
   976             }
   977         }
   977         }
   978     }
   978     }
   979 
   979 
   980     // Calculate cumulative status according to single caches statuses
   980     // Calculate cumulative status according to single caches statuses
   981     if ( countCompleted > 0 && ( countCompleted + countNotStarted ) == cacheCount )
   981     if ( countCompleted == cacheCount )
   982     {
   982     {
   983         // If at least one caching is finished
   983         // If all caching are finished, set status to ECachingComplete or 
       
   984         // ECachingCompleteWithErrors according to iCacheError
       
   985         status = ( iCacheError == KErrNone ) ? ECachingComplete : ECachingCompleteWithErrors;
       
   986     }
       
   987     else if ( countInProgress > 0 )
       
   988     {
       
   989         // Else if at least one caching is in progress,
       
   990         // set status to ECachingInProgress
       
   991         status = ECachingInProgress;
       
   992     }
       
   993     else if ( countCompletedWithErrors > 0 )
       
   994     {
       
   995         // Else if at least one caching is completed with errors, 
       
   996         //set status to ECachingCompleteWithErrors
       
   997         status = ECachingCompleteWithErrors;
       
   998     }
       
   999     else if ( countCompleted > 0 && ( countCompleted + countNotStarted ) == cacheCount )
       
  1000     {
       
  1001         // Else if at least one caching is finished
   984         // set status to ECachingComplete or ECachingCompleteWithErrors
  1002         // set status to ECachingComplete or ECachingCompleteWithErrors
   985         // according to iCacheError
  1003         // according to iCacheError
   986         status = ( iCacheError == KErrNone ) ? ECachingComplete : ECachingCompleteWithErrors;
  1004         status = ( iCacheError == KErrNone ) ? ECachingComplete : ECachingCompleteWithErrors;
   987     }
       
   988     else if ( countInProgress > 0 )
       
   989     {
       
   990         // Else if at least one caching is in progress,
       
   991         // set status to ECachingInProgress
       
   992         status = ECachingInProgress;
       
   993     }
       
   994     else if ( countCompletedWithErrors > 0 )
       
   995     {
       
   996         // Else if at least one caching is completed with errors, 
       
   997         //set status to ECachingCompleteWithErrors
       
   998         status = ECachingCompleteWithErrors;
       
   999     }
  1005     }
  1000     else
  1006     else
  1001     {
  1007     {
  1002         // countNotStarted == cacheCount
  1008         // countNotStarted == cacheCount
  1003         // status is set to default ECachingNotStarted
  1009         // status is set to default ECachingNotStarted