514 if( iQuery.Find( KSQLIcFileName ) != KErrNotFound ) |
514 if( iQuery.Find( KSQLIcFileName ) != KErrNotFound ) |
515 { |
515 { |
516 BindTextL( iStatement.ParameterIndex( KSQLIcFileName ), |
516 BindTextL( iStatement.ParameterIndex( KSQLIcFileName ), |
517 aEntry->GetIcon().iFileName ); |
517 aEntry->GetIcon().iFileName ); |
518 } |
518 } |
519 if( iQuery.Find( KSQLIcBitmapId ) != KErrNotFound ) |
519 if( iQuery.Find( KSQLIcSkinId ) != KErrNotFound ) |
520 { |
520 { |
521 BindIntL( iStatement.ParameterIndex( KSQLIcBitmapId ), |
521 BindTextL( iStatement.ParameterIndex( KSQLIcSkinId ), |
522 aEntry->GetIcon().iBitmapId ); |
522 aEntry->GetIcon().iSkinId ); |
523 } |
523 } |
524 if( iQuery.Find(KSQLIcMaskId) != KErrNotFound ) |
524 if( iQuery.Find( KSQLIcAppId ) != KErrNotFound ) |
525 { |
525 { |
526 BindIntL( iStatement.ParameterIndex( KSQLIcMaskId ), |
526 BindTextL( iStatement.ParameterIndex( KSQLIcAppId ), |
527 aEntry->GetIcon().iMaskId ); |
527 aEntry->GetIcon().iApplicationId ); |
528 } |
|
529 if( iQuery.Find( KSQLIcSkinMajorId ) != KErrNotFound ) |
|
530 { |
|
531 BindIntL( iStatement.ParameterIndex( KSQLIcSkinMajorId ), |
|
532 aEntry->GetIcon().iSkinMajorId ); |
|
533 } |
|
534 if( iQuery.Find( KSQLIcSkinMinorId ) != KErrNotFound ) |
|
535 { |
|
536 BindIntL( iStatement.ParameterIndex( KSQLIcSkinMinorId ), |
|
537 aEntry->GetIcon().iSkinMinorId ); |
|
538 } |
528 } |
539 } |
529 } |
540 |
530 |
541 // --------------------------------------------------------------------------- |
531 // --------------------------------------------------------------------------- |
542 // |
532 // |
672 RPointerArray<CCaInnerEntry>& aResultInput ) |
662 RPointerArray<CCaInnerEntry>& aResultInput ) |
673 { |
663 { |
674 TInt rowCount(0); |
664 TInt rowCount(0); |
675 while( iStatement.Next() == KSqlAtRow ) |
665 while( iStatement.Next() == KSqlAtRow ) |
676 { |
666 { |
677 TInt entryId = iStatement. |
667 TInt entryId = iStatement.ColumnInt( |
678 ColumnInt( ColumnIndexL( iStatement, KColumnEntryId ) ); |
668 ColumnIndexL( iStatement, KColumnEntryId ) ); |
679 TInt role = iStatement. |
669 TInt role = iStatement.ColumnInt( |
680 ColumnInt( ColumnIndexL( iStatement, KColumnEnRole ) ); |
670 ColumnIndexL( iStatement, KColumnEnRole ) ); |
681 // TODO get NULL ??? |
671 TInt32 uid = iStatement.ColumnInt( |
682 TInt32 uid = |
672 ColumnIndexL( iStatement, KColumnEnUid ) ); |
683 iStatement.ColumnInt( ColumnIndexL( iStatement, KColumnEnUid ) ) |
673 TUint flags = iStatement.ColumnInt( |
684 ? iStatement.ColumnInt( ColumnIndexL( iStatement, KColumnEnUid ) ) |
674 ColumnIndexL( iStatement, KColumnEnFlags ) ); |
685 : 0; |
675 TInt idIcon = iStatement.ColumnInt( |
686 TUint flags = iStatement.ColumnInt( ColumnIndexL( iStatement, |
676 ColumnIndexL( iStatement, KColumnEnIdIcon ) ); |
687 KColumnEnFlags ) ); |
677 |
688 TInt idIcon = iStatement.ColumnInt( ColumnIndexL( iStatement, |
|
689 KColumnEnIdIcon ) ); |
|
690 TInt bitmapId = iStatement.ColumnInt( ColumnIndexL( iStatement, |
|
691 KColumnIcBitmapId ) ); |
|
692 TInt maskId = iStatement.ColumnInt( ColumnIndexL( iStatement, |
|
693 KColumnIcMaskId ) ); |
|
694 TInt skinMajorId = iStatement.ColumnInt( ColumnIndexL( iStatement, |
|
695 KColumnIcSkinMajorId ) ); |
|
696 TInt skinMinorId = iStatement.ColumnInt( ColumnIndexL( iStatement, |
|
697 KColumnIcSkinMinorId ) ); |
|
698 |
|
699 TPtrC text; |
678 TPtrC text; |
700 User::LeaveIfError( iStatement. ColumnText( ColumnIndexL( |
679 User::LeaveIfError( iStatement. ColumnText( ColumnIndexL( |
701 iStatement, KColumnEnText ), text ) ); |
680 iStatement, KColumnEnText ), text ) ); |
702 TPtrC description; |
681 TPtrC description; |
703 User::LeaveIfError( iStatement. |
682 User::LeaveIfError( iStatement. |
704 ColumnText( ColumnIndexL( iStatement, KColumnEnDescription ), |
683 ColumnText( ColumnIndexL( iStatement, KColumnEnDescription ), |
705 description) ); |
684 description) ); |
706 TPtrC typeName; |
685 TPtrC typeName; |
707 User::LeaveIfError( iStatement.ColumnText( |
686 User::LeaveIfError( iStatement.ColumnText( |
708 ColumnIndexL(iStatement, KColumnEnTypeName ), typeName) ); |
687 ColumnIndexL(iStatement, KColumnEnTypeName ), typeName) ); |
|
688 |
709 TPtrC iconFilename; |
689 TPtrC iconFilename; |
710 User::LeaveIfError( iStatement.ColumnText( ColumnIndexL( |
690 User::LeaveIfError( iStatement.ColumnText( ColumnIndexL( |
711 iStatement, KColumnIcFileName ), iconFilename ) ); |
691 iStatement, KColumnIcFileName ), iconFilename ) ); |
712 |
692 |
|
693 TPtrC iconSkinId; |
|
694 User::LeaveIfError( iStatement.ColumnText( ColumnIndexL( |
|
695 iStatement, KColumnIcSkinId ), iconSkinId ) ); |
|
696 |
|
697 TPtrC iconApplicationId; |
|
698 User::LeaveIfError( iStatement.ColumnText( ColumnIndexL( |
|
699 iStatement, KColumnIcAppId ), iconApplicationId ) ); |
|
700 |
713 CCaInnerEntry* result = CCaInnerEntry::NewLC(); |
701 CCaInnerEntry* result = CCaInnerEntry::NewLC(); |
714 result->SetId( entryId ); |
702 result->SetId( entryId ); |
715 result->SetRole( role ); |
703 result->SetRole( role ); |
716 result->SetIconDataL( bitmapId, maskId, skinMajorId, skinMinorId, |
704 result->SetIconDataL( |
717 iconFilename ); |
705 iconFilename, iconSkinId, iconApplicationId ); |
718 result->SetIconId( idIcon ); |
706 result->SetIconId( idIcon ); |
719 result->SetFlags( flags ); |
707 result->SetFlags( flags ); |
720 result->SetUid( uid ); |
708 result->SetUid( uid ); |
721 result->SetTextL( text ); |
709 result->SetTextL( text ); |
722 result->SetDescriptionL( description ); |
710 result->SetDescriptionL( description ); |
873 aIconAttributes.iId = iStatement.ColumnInt( |
861 aIconAttributes.iId = iStatement.ColumnInt( |
874 ColumnIndexL( iStatement, KColumnIconId ) ); |
862 ColumnIndexL( iStatement, KColumnIconId ) ); |
875 User::LeaveIfError(iStatement.ColumnText( |
863 User::LeaveIfError(iStatement.ColumnText( |
876 ColumnIndexL( iStatement, KColumnIcFileName), |
864 ColumnIndexL( iStatement, KColumnIcFileName), |
877 aIconAttributes.iFileName)); |
865 aIconAttributes.iFileName)); |
878 aIconAttributes.iBitmapId = iStatement.ColumnInt( |
866 User::LeaveIfError(iStatement.ColumnText( |
879 ColumnIndexL( iStatement, KColumnIcBitmapId ) ); |
867 ColumnIndexL( iStatement, KColumnIcSkinId), |
880 aIconAttributes.iMaskId = iStatement.ColumnInt( |
868 aIconAttributes.iSkinId)); |
881 ColumnIndexL( iStatement, KColumnIcMaskId ) ); |
869 User::LeaveIfError(iStatement.ColumnText( |
882 aIconAttributes.iSkinMajorId = iStatement.ColumnInt( |
870 ColumnIndexL( iStatement, KColumnIcAppId), |
883 ColumnIndexL( iStatement, KColumnIcSkinMajorId ) ); |
871 aIconAttributes.iApplicationId)); |
884 aIconAttributes.iSkinMinorId = iStatement.ColumnInt( |
|
885 ColumnIndexL( iStatement, KColumnIcSkinMinorId ) ); |
|
886 columnCount++; |
872 columnCount++; |
887 } |
873 } |
888 return columnCount; |
874 return columnCount; |
889 } |
875 } |
890 |
876 |