# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273583687 -10800 # Node ID 6347473a7bb26d867a3959e1f0d870b97e597700 # Parent fc313e1df071a897fab7866b5d01214f56730daf Revision: 201017 Kit: 201019 diff -r fc313e1df071 -r 6347473a7bb2 srsf/nssvasapi/nssvascore/src/vascvpbkhandler.cpp --- a/srsf/nssvasapi/nssvascore/src/vascvpbkhandler.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/nssvasapi/nssvascore/src/vascvpbkhandler.cpp Tue May 11 16:14:47 2010 +0300 @@ -487,6 +487,12 @@ __ASSERT_ALWAYS( iField, User::Leave( KErrArgument ) ); __ASSERT_ALWAYS( !iOperation, User::Leave( KErrArgument ) ); + if ( iField->BestMatchingFieldType()->FieldTypeResId() == R_VPBK_FIELD_TYPE_IMPP && + iField->FieldData().DataType() == EVPbkFieldStorageTypeUri ) + { + return MVPbkContactFieldUriData::Cast( iField->FieldData()).Scheme(); + } + return iField->FieldLabel(); } diff -r fc313e1df071 -r 6347473a7bb2 srsf/nssvasapi/nssvasdb/src/nssvascvasdb.cpp --- a/srsf/nssvasapi/nssvasdb/src/nssvascvasdb.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/nssvasapi/nssvasdb/src/nssvascvasdb.cpp Tue May 11 16:14:47 2010 +0300 @@ -841,6 +841,8 @@ // void CNssVasDb::SaveTagsL( CArrayPtrFlat* aTagArray, RArray& aTagIdArray ) { + CleanupClosePushL( aTagIdArray ); + TInt k( 0 ); TInt error( KErrNone ); @@ -912,6 +914,7 @@ // Pop rollback cleanup // (which would have made database rollback, if a leave had happened) CleanupStack::Pop(); // Rollback cleanup item + CleanupStack::Pop(); } // --------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/sicc/src/nsssispeechrecognitioncustomcommands.cpp --- a/srsf/sicc/src/nsssispeechrecognitioncustomcommands.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/sicc/src/nsssispeechrecognitioncustomcommands.cpp Tue May 11 16:14:47 2010 +0300 @@ -621,6 +621,7 @@ EXPORT_C void RSISpeechRecognitionCustomCommands::GetPronunciationIDArrayL( RArray& aPronunciationIDs) { + CleanupClosePushL( aPronunciationIDs ); TPckgBuf pckgSize; @@ -649,7 +650,7 @@ } CleanupStack::PopAndDestroy(2);//stream, buf - + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- @@ -660,6 +661,7 @@ EXPORT_C void RSISpeechRecognitionCustomCommands::GetRuleIDArrayL( RArray& aRuleIDs) { + CleanupClosePushL( aRuleIDs ); TPckgBuf pckgSize; @@ -687,7 +689,7 @@ } CleanupStack::PopAndDestroy(2);//stream, buf - + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- @@ -698,6 +700,7 @@ EXPORT_C void RSISpeechRecognitionCustomCommands::GetModelIDArrayL( RArray& aModelIDs) { + CleanupClosePushL( aModelIDs ); TPckgBuf pckgSize; @@ -725,7 +728,7 @@ } CleanupStack::PopAndDestroy( 2 );//stream, buf - + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- @@ -736,7 +739,8 @@ EXPORT_C void RSISpeechRecognitionCustomCommands::GetGrammarIDArrayL( RArray& aGrammarIDs) { - + CleanupClosePushL( aGrammarIDs ); + TPckgBuf pckgSize; User::LeaveIfError(iController.CustomCommandSync(iDestinationPckg, @@ -763,7 +767,7 @@ } CleanupStack::PopAndDestroy( 2 );//stream, buf - + CleanupStack::Pop();//aGrammarIDs } // ----------------------------------------------------------------------------- @@ -774,6 +778,7 @@ EXPORT_C void RSISpeechRecognitionCustomCommands::GetLexiconIDArrayL( RArray& aLexiconIDs) { + CleanupClosePushL( aLexiconIDs ); TPckgBuf pckgSize; @@ -802,7 +807,7 @@ } CleanupStack::PopAndDestroy(2);//stream, buf - + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- @@ -813,6 +818,7 @@ EXPORT_C void RSISpeechRecognitionCustomCommands::GetModelBankIDArrayL( RArray& aModelBankIDs) { + CleanupClosePushL( aModelBankIDs ); TPckgBuf pckgSize; @@ -840,7 +846,7 @@ } CleanupStack::PopAndDestroy(2);//stream, buf - + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- @@ -1001,6 +1007,7 @@ TInt aNumberElements, RArray& aArray) { + CleanupClosePushL( aArray ); RDesReadStream stream(aDes); CleanupClosePushL(stream); @@ -1011,7 +1018,7 @@ } CleanupStack::PopAndDestroy();//stream - + CleanupStack::Pop(); } /************************** New SI functions start here ***********************/ diff -r fc313e1df071 -r 6347473a7bb2 srsf/sispeechrecognitiondata/src/nsssispeechrecognitiondatadevasr.cpp --- a/srsf/sispeechrecognitiondata/src/nsssispeechrecognitiondatadevasr.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/sispeechrecognitiondata/src/nsssispeechrecognitiondatadevasr.cpp Tue May 11 16:14:47 2010 +0300 @@ -20,6 +20,7 @@ // INCLUDE FILES #include #include +#include #include "nsssispeechrecognitiondatadevasr.h" #include "nsssispeechrecognitiondatatest.h" #include "nsssidataserialize.h" @@ -2128,6 +2129,7 @@ const TInt aIndex, RPointerArray& aPronunciations ) const { + CleanupResetAndDestroyPushL( aPronunciations ); // clear given array aPronunciations.Reset(); @@ -2140,6 +2142,7 @@ User::LeaveIfError( error ); } } + CleanupStack::Pop( &aPronunciations ); } /*****************************************************************************/ diff -r fc313e1df071 -r 6347473a7bb2 srsf/sisrscontrollerplugin/src/sicommondb.cpp --- a/srsf/sisrscontrollerplugin/src/sicommondb.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/sisrscontrollerplugin/src/sicommondb.cpp Tue May 11 16:14:47 2010 +0300 @@ -228,6 +228,8 @@ TUid aClientUid, RArray& aIDs ) { + CleanupClosePushL( aIDs ); + TBuf<100> KSQLStatement; // Declare a literal string to hold the SQL statement // SELECT aIdColumn, KUsedColumn FROM aIdTable WHERE KClientUidColumn = uid @@ -279,6 +281,7 @@ // Cleanup view CleanupStack::PopAndDestroy(); + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- @@ -291,6 +294,8 @@ const TDesC& aIdColumn, RArray& aIDs ) { + CleanupClosePushL( aIDs ); + TBuf<100> KSQLStatement; // Declare a literal string to hold the SQL statement // SELECT aIdColumn FROM aIdTable WHERE KUsedColumn = KUsed @@ -333,6 +338,7 @@ // Cleanup view CleanupStack::PopAndDestroy(); + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp --- a/srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/sisrscontrollerplugin/src/sicontrollerplugin.cpp Tue May 11 16:14:47 2010 +0300 @@ -2877,6 +2877,8 @@ RArray& aRuleIDs ) { RUBY_DEBUG_BLOCK( "CSIControllerPlugin::UpdateGrammarAndLexiconDBL" ); + CleanupClosePushL( aRuleIDs ); + iSITtpWordList = aSITtpWordList; iLexiconID = aLexiconID; iGrammarID = aGrammarID; @@ -2963,6 +2965,8 @@ iSILexiconDB->UpdateLexiconL( iClientUid,aLexicon ); iSIDatabase->CommitChangesL( ETrue ); CleanupStack::PopAndDestroy( 2 ); // aGrammar aLexicon + + CleanupStack::Pop(); //aRuleIDs } // ----------------------------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/sisrscontrollerplugin/src/sigrammardb.cpp --- a/srsf/sisrscontrollerplugin/src/sigrammardb.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/sisrscontrollerplugin/src/sigrammardb.cpp Tue May 11 16:14:47 2010 +0300 @@ -608,6 +608,8 @@ void CSIGrammarDB::GetAllRuleIDsL( TSIGrammarID aGrammarID, RArray& aRuleIDs ) { + CleanupClosePushL( aRuleIDs ); + // Construct the table name using the provided grammar ID TBuf<40> KGrammarName(KSIGrammarTable); KGrammarName.AppendNumUC(aGrammarID); @@ -622,6 +624,7 @@ User::LeaveIfError(aRuleIDs.Append(RuleId)); } CleanupStack::PopAndDestroy(newgrammar); + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/sisrscontrollerplugin/src/silexicondb.cpp --- a/srsf/sisrscontrollerplugin/src/silexicondb.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/sisrscontrollerplugin/src/silexicondb.cpp Tue May 11 16:14:47 2010 +0300 @@ -334,6 +334,8 @@ // void CSILexiconDB::GetAllPronunciationIDsL( TSILexiconID aLexiconID, RArray& aPronunciationIDs ) { + CleanupClosePushL( aPronunciationIDs ); + // Construct the table name using the provided Lexicon ID TBuf<40> KLexiconName(KSILexiconTable); KLexiconName.AppendNumUC(aLexiconID); @@ -350,6 +352,7 @@ CleanupStack::PopAndDestroy(newLexicon); // newLexicon // GetAllIDsL(KLexiconName, KPronunciationIDColumn, aPronunciationIDs); + CleanupStack::Pop(); } // ----------------------------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/speechsynthesis/client/src/speechsynthesis.cpp --- a/srsf/speechsynthesis/client/src/speechsynthesis.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/speechsynthesis/client/src/speechsynthesis.cpp Tue May 11 16:14:47 2010 +0300 @@ -257,6 +257,7 @@ // EXPORT_C void RSpeechSynthesis::GetLanguagesL( RArray& aLanguages ) { + CleanupClosePushL( aLanguages ); if ( Handle() == 0 ) { User::Leave( KErrBadHandle ); @@ -288,6 +289,7 @@ CleanupStack::PopAndDestroy( data ); } + CleanupStack::Pop(); } // ---------------------------------------------------------------------------- @@ -298,6 +300,7 @@ EXPORT_C void RSpeechSynthesis::GetVoicesL( RArray& aVoices, TLanguage aLanguage ) { + CleanupClosePushL( aVoices ); if ( Handle() == 0 ) { User::Leave( KErrBadHandle ); @@ -330,6 +333,7 @@ CleanupStack::PopAndDestroy( data ); } + CleanupStack::Pop(); } // ---------------------------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/speechsynthesis/server/src/speechsynthesisserver.cpp --- a/srsf/speechsynthesis/server/src/speechsynthesisserver.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/speechsynthesis/server/src/speechsynthesisserver.cpp Tue May 11 16:14:47 2010 +0300 @@ -461,6 +461,7 @@ RArray& aVoices ) { RUBY_DEBUG_BLOCK( "CSpeechSynthesisServer::GetSupportedVoicesL" ); + CleanupClosePushL( aVoices ); UpdateSynthesisConfigurationIfNeededL(); @@ -477,6 +478,7 @@ aVoices.AppendL( voice ); } } + CleanupStack::Pop(); } // ---------------------------------------------------------------------------- diff -r fc313e1df071 -r 6347473a7bb2 srsf/ttscustomcommands/src/nssttscustomcommandparser.cpp --- a/srsf/ttscustomcommands/src/nssttscustomcommandparser.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/ttscustomcommands/src/nssttscustomcommandparser.cpp Tue May 11 16:14:47 2010 +0300 @@ -427,10 +427,11 @@ TInt* languageCount = intPtrPckg(); RArray languages; + CleanupClosePushL( languages ); iImplementor.MttscGetSupportedLanguagesL( languages ); *languageCount = languages.Count(); - languages.Close(); + CleanupStack::PopAndDestroy(); } // ----------------------------------------------------------------------------- @@ -484,9 +485,10 @@ TInt* voiceCount = intPtrPckg(); RArray voices; + CleanupClosePushL( voices ); iImplementor.MttscGetSupportedVoicesL( language, voices ); *voiceCount = voices.Count(); - voices.Close(); + CleanupStack::PopAndDestroy( ); } // End of File diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandhandler/group/vcommandhandler.mmp --- a/srsf/vcommandhandler/group/vcommandhandler.mmp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandhandler/group/vcommandhandler.mmp Tue May 11 16:14:47 2010 +0300 @@ -67,3 +67,4 @@ LIBRARY aknskins.lib LIBRARY aknskinsrv.lib LIBRARY aknswallpaperutils.lib +LIBRARY cone.lib diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandhandler/src/tagnameset.cpp --- a/srsf/vcommandhandler/src/tagnameset.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandhandler/src/tagnameset.cpp Tue May 11 16:14:47 2010 +0300 @@ -178,7 +178,15 @@ DecreaseCallbacksExpected(); WaitUntilOperationsAreCompletedL(); - User::Leave( nssErr ); + switch( nssErr ) + { + case MNssSpeechItem::EVasInvalidParameter: + User::Leave( KErrArgument ); + case MNssSpeechItem::EVasTrainFailed: + User::Leave( KErrGeneral ); + default: + User::Leave( nssErr ); + } } } RUBY_DEBUG0( "CTagNameSet::TrainTagL Tag training has been initiated" ); diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandhandler/src/vcommandrunnable.cpp --- a/srsf/vcommandhandler/src/vcommandrunnable.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandhandler/src/vcommandrunnable.cpp Tue May 11 16:14:47 2010 +0300 @@ -23,6 +23,8 @@ #include #include #include +#include +#include /** * The version of the streamed data protocol @@ -232,6 +234,21 @@ } else { + const TUid KLogsUID3 = { 270486741 };//101F4CD5 + //In case logs.exe run in background [EDCN-84B68Q] + //todo: General support for this kind of case, + // eg, add "view" keyworkd in defaultvoicecommands.xml... + if ( iExeUid == KLogsUID3 ) + { + TApaTaskList taskList( CCoeEnv::Static()->WsSession() ); + TApaTask task = taskList.FindApp( iExeUid ); + if( task.Exists() ) //Logs already open. Request it to + { //activate the correct view + task.SendMessage( iExeUid, *iArguments ); + return; + } + } + TApaAppInfo appInfo; RApaLsSession apaLsSession; CleanupClosePushL( apaLsSession ); diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandmanager/inc/defaultvoicecommands.xml --- a/srsf/vcommandmanager/inc/defaultvoicecommands.xml Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandmanager/inc/defaultvoicecommands.xml Tue May 11 16:14:47 2010 +0300 @@ -37,7 +37,7 @@ - + counters diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandmanager/src/vcmanagervoiceheadsetlauncher.cpp --- a/srsf/vcommandmanager/src/vcmanagervoiceheadsetlauncher.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandmanager/src/vcmanagervoiceheadsetlauncher.cpp Tue May 11 16:14:47 2010 +0300 @@ -80,6 +80,7 @@ // iCallHandlingTarget will be destroyed when iSelector is destroyed. delete iSelector; + iProperty.Close(); RUBY_DEBUG0( "CVCommandManagerVoiceHeadSetLauncher::~CVCommandManagerVoiceHeadSetLauncher - EXIT" ); } @@ -237,6 +238,7 @@ { RApaLsSession apaLsSession; User::LeaveIfError( apaLsSession.Connect() ); + CleanupClosePushL(apaLsSession); TApaAppInfo appInfo; User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, KVoiceUiUID ) ); @@ -256,7 +258,7 @@ User::LeaveIfError ( apaLsSession.StartApp( *apaCommandLine ) ); CleanupStack::PopAndDestroy( apaCommandLine ); - apaLsSession.Close(); + CleanupStack::PopAndDestroy(&apaLsSession); } } } diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandmanager/src/vcmanagervoicekeylauncher.cpp --- a/srsf/vcommandmanager/src/vcmanagervoicekeylauncher.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandmanager/src/vcmanagervoicekeylauncher.cpp Tue May 11 16:14:47 2010 +0300 @@ -176,6 +176,7 @@ { RApaLsSession apaLsSession; User::LeaveIfError( apaLsSession.Connect() ); + CleanupClosePushL(apaLsSession); TApaAppInfo appInfo; User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, KVoiceUiUID ) ); @@ -188,7 +189,7 @@ User::LeaveIfError ( apaLsSession.StartApp( *apaCommandLine ) ); CleanupStack::PopAndDestroy( apaCommandLine ); - apaLsSession.Close(); + CleanupStack::PopAndDestroy(&apaLsSession); } } diff -r fc313e1df071 -r 6347473a7bb2 srsf/vcommandmanager/src/vcommandmanager.cpp --- a/srsf/vcommandmanager/src/vcommandmanager.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/srsf/vcommandmanager/src/vcommandmanager.cpp Tue May 11 16:14:47 2010 +0300 @@ -179,7 +179,7 @@ } else { - RUBY_ERROR1( "CVCommandManager::ParseAllFilesFromDirectoryL - GetDir returns [%d]", error ); + RUBY_DEBUG1( "CVCommandManager::ParseAllFilesFromDirectoryL - GetDir returns [%d]", error ); } } diff -r fc313e1df071 -r 6347473a7bb2 voiceui/pbkinfoviewimpl/group/pbkinfoview.mmp --- a/voiceui/pbkinfoviewimpl/group/pbkinfoview.mmp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/pbkinfoviewimpl/group/pbkinfoview.mmp Tue May 11 16:14:47 2010 +0300 @@ -85,6 +85,8 @@ LIBRARY VPbkEng.lib LIBRARY Pbk2Presentation.lib LIBRARY Pbk2CommonUI.lib +LIBRARY fbscli.lib +LIBRARY egul.lib //EXPORTUNFROZEN diff -r fc313e1df071 -r 6347473a7bb2 voiceui/pbkinfoviewimpl/inc/pbkinfoviewdialog.h --- a/voiceui/pbkinfoviewimpl/inc/pbkinfoviewdialog.h Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/pbkinfoviewimpl/inc/pbkinfoviewdialog.h Tue May 11 16:14:47 2010 +0300 @@ -32,6 +32,9 @@ #include "pbkinfoviewreshandler.h" #include "pbkinfoviewsindhandler.h" +// FORWARD DECLARATIONS +class TXspIconHelper; + // CLASS DECLARATION /** @@ -46,7 +49,6 @@ EIconIndexVideo, EIconIndexVoip, EIconIndexEmail, - EIconIndexXsp, EIconIndexEmpty }; @@ -165,9 +167,10 @@ /** * Returns TInfoViewDialogIconIndex enumeration icon index. * @param aIconId enumeration TPbkIconId from PbkIconId.hrh. + * aTagIndex voice tag index * @return Icon index. */ - TInt IconIndex( TInt aIconId ); + TInt IconIndex( TInt aIconId,TInt aTagIndex ); /** * Creates listbox items. @@ -250,8 +253,8 @@ // SIND handler CPbkInfoViewSindHandler* iSindHandler; - // Xsp flag - TBool isXsp; + //XSp icon helper + RArray iXspIconHelper; }; #endif // PBKINFOVIEWDIALOG_H diff -r fc313e1df071 -r 6347473a7bb2 voiceui/pbkinfoviewimpl/inc/pbkinfoviewsindhandler.h --- a/voiceui/pbkinfoviewimpl/inc/pbkinfoviewsindhandler.h Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/pbkinfoviewimpl/inc/pbkinfoviewsindhandler.h Tue May 11 16:14:47 2010 +0300 @@ -122,10 +122,20 @@ TInt IconIdL( TInt aIndex ); /** - * Returns an field id - * @return TInt the field id + * Returns an field id that the voice tage is associated + * @param aIndex index for the voice tag. + * 0 <= aIndex <= VoiceTagCount() - 1 + * @return TInt field id */ - TInt FieldIdL(); + TInt FieldIdL( TInt aIndex ); + + /** + * Returns a tag label that the voice tage is associated + * @param aIndex index for the voice tag. + * 0 <= aIndex <= VoiceTagCount() - 1 + * @return TPtrC the tag label + */ + TPtrC LabelL( TInt aIndex ); /** * Calls CompareL and catches possible leaves diff -r fc313e1df071 -r 6347473a7bb2 voiceui/pbkinfoviewimpl/src/pbkinfoviewdialog.cpp --- a/voiceui/pbkinfoviewimpl/src/pbkinfoviewdialog.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/pbkinfoviewimpl/src/pbkinfoviewdialog.cpp Tue May 11 16:14:47 2010 +0300 @@ -51,6 +51,10 @@ #include #include +#include +#include +#include + const TUint KFieldIds[] = { R_VPBK_FIELD_TYPE_LANDPHONEGEN, @@ -61,6 +65,31 @@ R_VPBK_FIELD_TYPE_IMPP }; +NONSHARABLE_CLASS( TXspIconHelper ) + { + public: + TXspIconHelper( TInt aIndex, const TDesC& aLable ); + TDesC& LableText(); + TInt Index(); + private: + TBuf iLable; + TInt iIndex; + }; + +TXspIconHelper::TXspIconHelper( TInt aIndex, const TDesC& aLable ): + iLable(aLable),iIndex(aIndex) + { + } + +inline TInt TXspIconHelper::Index() + { + return iIndex; + } +inline TDesC& TXspIconHelper::LableText() + { + return iLable; + } + // ============================ MEMBER FUNCTIONS =============================== // ----------------------------------------------------------------------------- @@ -153,6 +182,8 @@ { iNaviPane->Pop(); } + + iXspIconHelper.Close(); } //------------------------------------------------------------------------------ @@ -515,7 +546,7 @@ // @return TInt Icon index. // ----------------------------------------------------------------------------- // -TInt CPbkInfoViewDialog::IconIndex( TInt aIconId ) +TInt CPbkInfoViewDialog::IconIndex( TInt aIconId, TInt aTagIndex ) { TInt iconIndex; @@ -534,17 +565,20 @@ iconIndex = EIconIndexEmail; break; case EPbkqgn_prop_nrtyp_voip: - if ( isXsp ) + iconIndex = EIconIndexVoip; + if ( iSindHandler->FieldIdL( aTagIndex ) == EPbkFieldIdXsp ) { - iconIndex = EIconIndexXsp; - } - else - { - iconIndex = EIconIndexVoip; + for ( TInt i=0; iLabelL(aTagIndex)) ) + { + iconIndex = iXspIconHelper[i].Index(); + } + } } break; default: - iconIndex = EIconIndexEmpty; + iconIndex = EIconIndexPhone; break; } @@ -574,12 +608,8 @@ HBufC* firstLine = iSindHandler->VoiceTagLabelLC( i ); // Phone number, email address, etc... HBufC* secondLine = iSindHandler->VoiceTagValueL( i ).AllocLC(); - isXsp = EFalse; - if( iSindHandler->FieldIdL() == EPbkFieldIdXsp ) - { - isXsp = ETrue; - } - TInt iconIndex = IconIndex( iSindHandler->IconIdL( i ) ); + + TInt iconIndex = IconIndex( iSindHandler->IconIdL( i ), i ); TPtr ptr1 = firstLine->Des(); AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr1 ); @@ -743,6 +773,17 @@ for( count = 0; count < propertyArray->Count(); ++ count) { icon = pbk2IconFactory->CreateIconL( propertyArray->At(count).IconId()); + // Append xSP icon info to helper array + if ( propertyArray->At(count).FieldType().FieldTypeResId() == R_VPBK_FIELD_TYPE_IMPP + && icon && icon->Bitmap()->Handle() ) + { + const MPbk2FieldProperty& property = propertyArray->At(count); + MPbk2FieldProperty2* property2 = reinterpret_cast + ( const_cast (property).FieldPropertyExtension( + KMPbk2FieldPropertyExtension2Uid ) ); + TXspIconHelper xsp( count, property2->XSpName() ); + iXspIconHelper.Append( xsp ); + } aIconArray->AppendL(icon); } @@ -750,14 +791,6 @@ //Destroy: configuration,uriArray,contactManager //fieldTypeList,propertyArray,pbk2IconFactory - CleanupStack::PopAndDestroy( 6,configuration ); - - TFileName bitmapName; - CPbkInfoViewResHandler::GetBitmapFileName( bitmapName ); - - aIconArray->AppendL( TDialogUtil::CreateIconL( - KAknsIIDQgnLogoEmpty, bitmapName, - EMbmAvkonQgn_prop_empty, - EMbmAvkonQgn_prop_empty_mask ) ); + CleanupStack::PopAndDestroy( 6,configuration ); } // End of File diff -r fc313e1df071 -r 6347473a7bb2 voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp --- a/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp Tue May 11 16:14:47 2010 +0300 @@ -505,14 +505,40 @@ // ---------------------------------------------------------------------------- // CPbkInfoViewSindHandler::FieldIdL // Returns an field id for the contact field. +// @param aIndex index for the voice tag. 0 <= aIndex <= VoiceTagCount() - 1 // @return TInt the field id // ---------------------------------------------------------------------------- -TInt CPbkInfoViewSindHandler::FieldIdL( ) - { +TInt CPbkInfoViewSindHandler::FieldIdL( TInt aIndex ) + { + RUBY_DEBUG_BLOCK( "CPbkInfoViewSindHandler::FieldIdL" ); + + __ASSERT_ALWAYS( aIndex >= 0 && aIndex < VoiceTagCount(), + User::Leave( KErrArgument ) ); + + iPbkHandler->FindContactFieldL( iTagArray[aIndex] ); + return iPbkHandler->FieldIdL(); } // ---------------------------------------------------------------------------- +// CPbkInfoViewSindHandler::LabelL +// Returns label for the contact field. +// @param aIndex index for the voice tag. 0 <= aIndex <= VoiceTagCount() - 1 +// @return TPtrC the tag label +// ---------------------------------------------------------------------------- +TPtrC CPbkInfoViewSindHandler::LabelL( TInt aIndex ) + { + RUBY_DEBUG_BLOCK( "CPbkInfoViewSindHandler::LabelL" ); + + __ASSERT_ALWAYS( aIndex >= 0 && aIndex < VoiceTagCount(), + User::Leave( KErrArgument ) ); + + iPbkHandler->FindContactFieldL( iTagArray[aIndex] ); + + return iPbkHandler->LabelL(); + } + +// ---------------------------------------------------------------------------- // CPbkInfoViewSindHandler::CreateVoiceTagListL // Fetches voice tag list from vas db. // @param aContactId Contact id for the contact whose voice tags are diff -r fc313e1df071 -r 6347473a7bb2 voiceui/vcommand/data/vcommand.rss --- a/voiceui/vcommand/data/vcommand.rss Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/vcommand/data/vcommand.rss Tue May 11 16:14:47 2010 +0300 @@ -196,6 +196,11 @@ }, MENU_ITEM { + command = EVCCmdStartVui; + txt = qtn_vc_tutorial; + }, + MENU_ITEM + { command = EVCCmdPlayback; txt = text_voice_replay; flags = EEikMenuItemAction; @@ -210,12 +215,7 @@ { command = EVCCmdSettings; txt = qtn_vc_settings; - }, - MENU_ITEM - { - command = EVCCmdStartVui; - txt = qtn_vc_tutorial; - }, + }, MENU_ITEM { command = EAknCmdHelp; diff -r fc313e1df071 -r 6347473a7bb2 voiceui/vcommand/src/uiarraysgenerator.cpp --- a/voiceui/vcommand/src/uiarraysgenerator.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/vcommand/src/uiarraysgenerator.cpp Tue May 11 16:14:47 2010 +0300 @@ -206,6 +206,8 @@ CAknIconArray& aIconArray, CDesC16ArrayFlat& aFolderTitles, RArray& aItemIsFolder, CDesC16ArrayFlat& aItemArray ) { + CleanupClosePushL( aItemIsFolder ); + aIconArray.ResetAndDestroy(); aFolderTitles.Reset(); aItemIsFolder.Reset(); @@ -241,7 +243,9 @@ } CleanupStack::PopAndDestroy( entries ); // ResetAndDestroy - CleanupStack::PopAndDestroy( entries ); // delete + CleanupStack::PopAndDestroy( entries ); // delete + + CleanupStack::Pop(); //aItemIsFolder } /** diff -r fc313e1df071 -r 6347473a7bb2 voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp --- a/voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/voiceuivoicerecognition/group/vuivoicerecognition.mmp Tue May 11 16:14:47 2010 +0300 @@ -137,3 +137,6 @@ LIBRARY estor.lib LIBRARY etel3rdparty.lib +LIBRARY VPbkEng.lib +LIBRARY ecom.lib + diff -r fc313e1df071 -r 6347473a7bb2 voiceui/voiceuivoicerecognition/src/vuiclistquerydialog.cpp --- a/voiceui/voiceuivoicerecognition/src/vuiclistquerydialog.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/voiceuivoicerecognition/src/vuiclistquerydialog.cpp Tue May 11 16:14:47 2010 +0300 @@ -226,6 +226,13 @@ iObserver->ProcessCommandL( EVoiceTagSoftKeySelect ); } } + else if ( aEventType == EEventFlickStopped ) + { + if ( iObserver ) + { + iObserver->ProcessCommandL( EDragKeypress ); + } + } if ( forwardEvent ) { diff -r fc313e1df071 -r 6347473a7bb2 voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp --- a/voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/voiceuivoicerecognition/src/vuicprecheckstate.cpp Tue May 11 16:14:47 2010 +0300 @@ -214,12 +214,13 @@ TBool islock = EFalse; RWsSession &ws = CCoeEnv::Static()->WsSession(); TInt wgId = ws.GetFocusWindowGroup(); - CApaWindowGroupName *WindowsGroupName = CApaWindowGroupName::NewL( ws, wgId ); + CApaWindowGroupName *WindowsGroupName = CApaWindowGroupName::NewLC( ws, wgId ); if ( ( KAknnfysrvUid == WindowsGroupName->AppUid() ) && ( ws.GetWindowGroupOrdinalPriority( wgId ) >= ECoeWinPriorityAlwaysAtFront ) ) { islock = ETrue; } + CleanupStack::PopAndDestroy( WindowsGroupName ); return islock; } diff -r fc313e1df071 -r 6347473a7bb2 voiceui/voiceuivoicerecognition/src/vuicresultsstate.cpp --- a/voiceui/voiceuivoicerecognition/src/vuicresultsstate.cpp Wed Apr 14 15:58:44 2010 +0300 +++ b/voiceui/voiceuivoicerecognition/src/vuicresultsstate.cpp Tue May 11 16:14:47 2010 +0300 @@ -42,6 +42,14 @@ #include "vuicttsplayer.h" #include "vuivoiceicondefs.h" +#include +#include +#include +#include +#include +#include +#include + #include "rubydebug.h" _LIT( KTab, "\t" ); @@ -731,16 +739,39 @@ CleanupClosePushL( *parameter ); parameter->SetConnectionFlag( MCCAParameter::ENormal ); - parameter->SetContactDataFlag( MCCAParameter::EContactId ); + parameter->SetContactDataFlag( MCCAParameter::EContactLink ); + + // Create a Contact Manager and bind it with the default contact database + CVPbkContactStoreUriArray* uriArray = CVPbkContactStoreUriArray::NewL(); + CleanupStack::PushL( uriArray ); + + TVPbkContactStoreUriPtr uri( VPbkContactStoreUris::DefaultCntDbUri() ); + uriArray->AppendL( uri ); + + CVPbkContactManager* contactManager = CVPbkContactManager::NewL(*uriArray); + CleanupStack::PushL( contactManager ); + + // Find Contacts Model store URI from the contact manager (copied from Phonebook app) + MVPbkContactStore* defaultStore = contactManager->ContactStoresL().Find( uri ); + User::LeaveIfNull( defaultStore ); + + // Create a ContactIdConverter object for the ContactId-to-ContactLink conversion + CVPbkContactIdConverter* idConverter = CVPbkContactIdConverter::NewL( *defaultStore ); + CleanupStack::PushL( idConverter ); + + MVPbkContactLink* link = idConverter->IdentifierToLinkLC( + DataStorage().Tag()->RRD()->IntArray()->At( KVasContactIdRrdLocation )); + + HBufC8* link8 = link->PackLC(); + HBufC16* link16 = HBufC16::NewLC( link8->Length() ); + link16->Des().Copy( *link8 ); - TBuf<10> idString; - idString.Num( DataStorage().Tag()->RRD()->IntArray()->At( KVasContactIdRrdLocation ) ); - - parameter->SetContactDataL( idString ); + parameter->SetContactDataL( link16->Des() ); iConnection->LaunchAppL( *parameter, this ); - CleanupStack::Pop(); // parameter + CleanupStack::PopAndDestroy(6,uriArray); + CleanupStack::Pop();//parameter } // End of File