1046 |
1046 |
1047 CMdELogicCondition& rootCondition = iQueryPlaceholders->Conditions(); |
1047 CMdELogicCondition& rootCondition = iQueryPlaceholders->Conditions(); |
1048 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
1048 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
1049 |
1049 |
1050 CMdEObjectCondition& imagePHObjectCondition = rootCondition.AddObjectConditionL(imageObjDef); |
1050 CMdEObjectCondition& imagePHObjectCondition = rootCondition.AddObjectConditionL(imageObjDef); |
1051 CleanupStack::PushL( &imagePHObjectCondition ); |
|
1052 imagePHObjectCondition.SetPlaceholderOnly( ETrue ); |
1051 imagePHObjectCondition.SetPlaceholderOnly( ETrue ); |
1053 imagePHObjectCondition.SetNotPresent( aPresent ); |
1052 imagePHObjectCondition.SetNotPresent( aPresent ); |
1054 |
1053 |
1055 CMdEObjectCondition& videoPHObjectCondition = rootCondition.AddObjectConditionL(videoObjDef); |
1054 CMdEObjectCondition& videoPHObjectCondition = rootCondition.AddObjectConditionL(videoObjDef); |
1056 CleanupStack::PushL( &videoPHObjectCondition ); |
|
1057 videoPHObjectCondition.SetPlaceholderOnly( ETrue ); |
1055 videoPHObjectCondition.SetPlaceholderOnly( ETrue ); |
1058 videoPHObjectCondition.SetNotPresent( aPresent ); |
1056 videoPHObjectCondition.SetNotPresent( aPresent ); |
1059 |
1057 |
1060 CMdEObjectCondition& audioPHObjectCondition = rootCondition.AddObjectConditionL(audioObjDef); |
1058 CMdEObjectCondition& audioPHObjectCondition = rootCondition.AddObjectConditionL(audioObjDef); |
1061 CleanupStack::PushL( &audioPHObjectCondition ); |
|
1062 audioPHObjectCondition.SetPlaceholderOnly( ETrue ); |
1059 audioPHObjectCondition.SetPlaceholderOnly( ETrue ); |
1063 audioPHObjectCondition.SetNotPresent( aPresent ); |
1060 audioPHObjectCondition.SetNotPresent( aPresent ); |
1064 |
1061 |
1065 iQueryPlaceholders->FindL(KMaxTInt, KMaxQueryBatchSize); |
1062 iQueryPlaceholders->FindL(KMaxTInt, KMaxQueryBatchSize); |
1066 |
|
1067 CleanupStack::Pop(3, &imagePHObjectCondition ); |
|
1068 } |
1063 } |
1069 |
1064 |
1070 TN_DEBUG1( "CThumbAGProcessor::QueryPlaceholdersL - end" ); |
1065 TN_DEBUG1( "CThumbAGProcessor::QueryPlaceholdersL - end" ); |
1071 } |
1066 } |
1072 |
1067 |
1129 { |
1124 { |
1130 TN_DEBUG1( "CThumbAGProcessor::RunL() add iHarvesterClient observer"); |
1125 TN_DEBUG1( "CThumbAGProcessor::RunL() add iHarvesterClient observer"); |
1131 err = iHarvesterClient.AddHarvesterEventObserver( *this, EHEObserverTypeOverall | EHEObserverTypeMMC | EHEObserverTypePlaceholder, 20 ); |
1126 err = iHarvesterClient.AddHarvesterEventObserver( *this, EHEObserverTypeOverall | EHEObserverTypeMMC | EHEObserverTypePlaceholder, 20 ); |
1132 TN_DEBUG2( "CThumbAGProcessor::RunL() iHarvesterClient observer err = %d", err); |
1127 TN_DEBUG2( "CThumbAGProcessor::RunL() iHarvesterClient observer err = %d", err); |
1133 |
1128 |
1134 if( !err ) |
1129 if( err != KErrNone ) |
1135 { |
1130 { |
1136 TN_DEBUG1( "CThumbAGProcessor::RunL() add iHarvesterClient observer failed"); |
1131 TN_DEBUG1( "CThumbAGProcessor::RunL() add iHarvesterClient observer failed"); |
1137 // if we fail observer harvester, fake it |
1132 // if we fail observer harvester, fake it |
1138 iHarvesterActivated = ETrue; |
1133 iHarvesterActivated = ETrue; |
1139 } |
1134 } |
1888 iQueryAllItems->SetResultMode( EQueryResultModeItem ); |
1883 iQueryAllItems->SetResultMode( EQueryResultModeItem ); |
1889 |
1884 |
1890 CMdELogicCondition& rootCondition = iQueryAllItems->Conditions(); |
1885 CMdELogicCondition& rootCondition = iQueryAllItems->Conditions(); |
1891 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
1886 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
1892 |
1887 |
1893 CMdEObjectCondition& imageObjectCondition = rootCondition.AddObjectConditionL(imageObjDef); |
1888 rootCondition.AddObjectConditionL(imageObjDef); |
1894 CleanupStack::PushL( &imageObjectCondition ); |
1889 rootCondition.AddObjectConditionL(videoObjDef); |
1895 |
1890 rootCondition.AddObjectConditionL(audioObjDef); |
1896 CMdEObjectCondition& videoObjectCondition = rootCondition.AddObjectConditionL(videoObjDef); |
|
1897 CleanupStack::PushL( &videoObjectCondition ); |
|
1898 |
|
1899 CMdEObjectCondition& audioObjectCondition = rootCondition.AddObjectConditionL(audioObjDef); |
|
1900 CleanupStack::PushL( &audioObjectCondition ); |
|
1901 |
1891 |
1902 iQueryAllItems->FindL(KMaxTInt, KMaxQueryBatchSize); |
1892 iQueryAllItems->FindL(KMaxTInt, KMaxQueryBatchSize); |
1903 |
|
1904 CleanupStack::Pop(3, &imageObjectCondition); |
|
1905 |
1893 |
1906 TN_DEBUG1( "CThumbAGProcessor::QueryAllItemsL - end" ); |
1894 TN_DEBUG1( "CThumbAGProcessor::QueryAllItemsL - end" ); |
1907 } |
1895 } |
1908 |
1896 |
1909 // ----------------------------------------------------------------------------- |
1897 // ----------------------------------------------------------------------------- |