507 void CCaSqlQuery::BindValuesForGetIconL( const CCaInnerEntry* aEntry ) |
507 void CCaSqlQuery::BindValuesForGetIconL( const CCaInnerEntry* aEntry ) |
508 { |
508 { |
509 if( iQuery.Find( KSQLIconId ) != KErrNotFound ) |
509 if( iQuery.Find( KSQLIconId ) != KErrNotFound ) |
510 { |
510 { |
511 BindIntL(iStatement.ParameterIndex( KSQLIconId ), |
511 BindIntL(iStatement.ParameterIndex( KSQLIconId ), |
512 aEntry->GetIcon().iId ); |
512 aEntry->Icon()->Id() ); |
513 } |
513 } |
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->Icon()->FileName() ); |
518 } |
518 } |
519 if( iQuery.Find( KSQLIcSkinId ) != KErrNotFound ) |
519 if( iQuery.Find( KSQLIcSkinId ) != KErrNotFound ) |
520 { |
520 { |
521 BindTextL( iStatement.ParameterIndex( KSQLIcSkinId ), |
521 BindTextL( iStatement.ParameterIndex( KSQLIcSkinId ), |
522 aEntry->GetIcon().iSkinId ); |
522 aEntry->Icon()->SkinId() ); |
523 } |
523 } |
524 if( iQuery.Find( KSQLIcAppId ) != KErrNotFound ) |
524 if( iQuery.Find( KSQLIcAppId ) != KErrNotFound ) |
525 { |
525 { |
526 BindTextL( iStatement.ParameterIndex( KSQLIcAppId ), |
526 BindTextL( iStatement.ParameterIndex( KSQLIcAppId ), |
527 aEntry->GetIcon().iApplicationId ); |
527 aEntry->Icon()->ApplicationId() ); |
528 } |
528 } |
529 } |
529 } |
530 |
530 |
531 // --------------------------------------------------------------------------- |
531 // --------------------------------------------------------------------------- |
532 // |
532 // |
851 |
851 |
852 // --------------------------------------------------------------------------- |
852 // --------------------------------------------------------------------------- |
853 // |
853 // |
854 // --------------------------------------------------------------------------- |
854 // --------------------------------------------------------------------------- |
855 // |
855 // |
856 TInt CCaSqlQuery::ExecuteL( CCaInnerEntry::TIconAttributes& aIconAttributes ) |
856 TInt CCaSqlQuery::ExecuteL( CCaInnerIconDescription* aInnerIconDescription ) |
857 { |
857 { |
858 TInt columnCount( 0 ); |
858 TInt columnCount( 0 ); |
|
859 |
|
860 RBuf description; |
|
861 description.CleanupClosePushL(); |
|
862 description.CreateL(KMaxFileName); |
|
863 |
859 while( iStatement.Next() == KSqlAtRow ) |
864 while( iStatement.Next() == KSqlAtRow ) |
860 { |
865 { |
861 aIconAttributes.iId = iStatement.ColumnInt( |
866 aInnerIconDescription->SetId( iStatement.ColumnInt( |
862 ColumnIndexL( iStatement, KColumnIconId ) ); |
867 ColumnIndexL( iStatement, KColumnIconId ) ) ); |
863 User::LeaveIfError(iStatement.ColumnText( |
868 User::LeaveIfError(iStatement.ColumnText( |
864 ColumnIndexL( iStatement, KColumnIcFileName), |
869 ColumnIndexL( iStatement, KColumnIcFileName), |
865 aIconAttributes.iFileName)); |
870 description)); |
|
871 aInnerIconDescription->SetFileNameL(description); |
|
872 |
866 User::LeaveIfError(iStatement.ColumnText( |
873 User::LeaveIfError(iStatement.ColumnText( |
867 ColumnIndexL( iStatement, KColumnIcSkinId), |
874 ColumnIndexL( iStatement, KColumnIcSkinId), |
868 aIconAttributes.iSkinId)); |
875 description)); |
|
876 aInnerIconDescription->SetSkinIdL(description); |
|
877 |
869 User::LeaveIfError(iStatement.ColumnText( |
878 User::LeaveIfError(iStatement.ColumnText( |
870 ColumnIndexL( iStatement, KColumnIcAppId), |
879 ColumnIndexL( iStatement, KColumnIcAppId), |
871 aIconAttributes.iApplicationId)); |
880 description)); |
|
881 aInnerIconDescription->SetApplicationIdL(description); |
|
882 |
872 columnCount++; |
883 columnCount++; |
873 } |
884 } |
|
885 CleanupStack::PopAndDestroy(&description); |
874 return columnCount; |
886 return columnCount; |
875 } |
887 } |
876 |
888 |
877 // --------------------------------------------------------------------------- |
889 // --------------------------------------------------------------------------- |
878 // |
890 // |