374 iQuery->AddPropertyFilterL( &namePropertyDef ); |
374 iQuery->AddPropertyFilterL( &namePropertyDef ); |
375 CMdEPropertyDef& fileTypePropertyDef = PropertyDefL( EAttrMediaType ); |
375 CMdEPropertyDef& fileTypePropertyDef = PropertyDefL( EAttrMediaType ); |
376 iQuery->AddPropertyFilterL( &fileTypePropertyDef ); |
376 iQuery->AddPropertyFilterL( &fileTypePropertyDef ); |
377 |
377 |
378 CMdELogicCondition& conditions = iQuery->Conditions(); |
378 CMdELogicCondition& conditions = iQuery->Conditions(); |
379 MimeFilterL( conditions ); |
|
380 ExcludeRomFilesL( conditions ); |
379 ExcludeRomFilesL( conditions ); |
381 |
380 |
382 iQuery->SetResultMode( EQueryResultModeItem ); |
381 iQuery->SetResultMode( EQueryResultModeItem ); |
383 iQuery->FindL(); |
382 iQuery->FindL(); |
384 |
383 |
413 iQuery->AddPropertyFilterL( &namePropertyDef ); |
412 iQuery->AddPropertyFilterL( &namePropertyDef ); |
414 CMdEPropertyDef& fileTypePropertyDef = PropertyDefL( EAttrMediaType ); |
413 CMdEPropertyDef& fileTypePropertyDef = PropertyDefL( EAttrMediaType ); |
415 iQuery->AddPropertyFilterL( &fileTypePropertyDef ); |
414 iQuery->AddPropertyFilterL( &fileTypePropertyDef ); |
416 |
415 |
417 CMdELogicCondition& conditions = iQuery->Conditions(); |
416 CMdELogicCondition& conditions = iQuery->Conditions(); |
418 MimeFilterL( conditions ); |
|
419 ExcludeRomFilesL( conditions ); |
417 ExcludeRomFilesL( conditions ); |
420 |
418 |
421 // define sort order |
419 // define sort order |
422 // iQuery->AppendOrderRuleL( TMdEOrderRule( namePropertyDef, ESortAscending ) ); |
420 // iQuery->AppendOrderRuleL( TMdEOrderRule( namePropertyDef, ESortAscending ) ); |
423 |
421 |
455 iQuery->AddPropertyFilterL( &namePropertyDef ); |
453 iQuery->AddPropertyFilterL( &namePropertyDef ); |
456 CMdEPropertyDef& fileTypePropertyDef = PropertyDefL( EAttrMediaType ); |
454 CMdEPropertyDef& fileTypePropertyDef = PropertyDefL( EAttrMediaType ); |
457 iQuery->AddPropertyFilterL( &fileTypePropertyDef ); |
455 iQuery->AddPropertyFilterL( &fileTypePropertyDef ); |
458 |
456 |
459 CMdELogicCondition& conditions = iQuery->Conditions(); |
457 CMdELogicCondition& conditions = iQuery->Conditions(); |
460 MimeFilterL( conditions ); |
|
461 ExcludeRomFilesL( conditions ); |
458 ExcludeRomFilesL( conditions ); |
462 |
459 |
463 iQuery->SetResultMode( EQueryResultModeItem ); |
460 iQuery->SetResultMode( EQueryResultModeItem ); |
464 iQuery->FindL(); |
461 iQuery->FindL(); |
465 |
462 |
701 CMdEObjectCondition& cond = aCondition.AddObjectConditionL( |
698 CMdEObjectCondition& cond = aCondition.AddObjectConditionL( |
702 EObjectConditionCompareUriBeginsWith, KDriveZ ); |
699 EObjectConditionCompareUriBeginsWith, KDriveZ ); |
703 cond.SetNegate( ETrue ); |
700 cond.SetNegate( ETrue ); |
704 } |
701 } |
705 |
702 |
706 // ----------------------------------------------------------------------------- |
|
707 // CAudioFetcherFileHandler::MimeFilterL |
|
708 // |
|
709 // ----------------------------------------------------------------------------- |
|
710 // |
|
711 void CAudioFetcherFileHandler::MimeFilterL( CMdELogicCondition& aCondition ) |
|
712 { |
|
713 WLOG("CAudioFetcherFileHandler::MimeFilterL"); |
|
714 |
|
715 if( iMimeTypeArray ) |
|
716 { |
|
717 if ( iMimeTypeArray->MdcaCount() > 0 ) |
|
718 { |
|
719 CMdELogicCondition& cond = |
|
720 aCondition.AddLogicConditionL( ELogicConditionOperatorOr ); |
|
721 for ( TInt i = 0; i < iMimeTypeArray->MdcaCount(); i++ ) |
|
722 { |
|
723 TPtrC ptr = iMimeTypeArray->MdcaPoint(i); |
|
724 |
|
725 cond.AddPropertyConditionL( |
|
726 iSession->GetDefaultNamespaceDefL().GetObjectDefL( |
|
727 MdeConstants::Image::KImageObject ).GetPropertyDefL( |
|
728 MdeConstants::Object::KItemTypeProperty ), |
|
729 ETextPropertyConditionCompareEquals, ptr ); |
|
730 } |
|
731 } |
|
732 } |
|
733 } |
|
734 |
|
735 // ----------------------------------------------------------------------------- |
|
736 // CAudioFetcherFileHandler::SetMimeType |
|
737 // |
|
738 // ----------------------------------------------------------------------------- |
|
739 // |
|
740 void CAudioFetcherFileHandler::SetMimeType( const MDesCArray& aMimeTypeArray ) |
|
741 { |
|
742 WLOG("CAudioFetcherFileHandler::SetMimeType"); |
|
743 iMimeTypeArray = &aMimeTypeArray; |
|
744 } |
|
745 |
703 |
746 // ------------------------------------------------------------------------------- |
704 // ------------------------------------------------------------------------------- |
747 // CAudioFetcherFileHandler::StrCopy |
705 // CAudioFetcherFileHandler::StrCopy |
748 // |
706 // |
749 // String copy with lenght check. |
707 // String copy with lenght check. |