diff -r b01126ce0bec -r ba63c83f4716 menufw/hierarchynavigator/hnengine/src/hnengine.cpp --- a/menufw/hierarchynavigator/hnengine/src/hnengine.cpp Wed Sep 15 12:00:00 2010 +0300 +++ b/menufw/hierarchynavigator/hnengine/src/hnengine.cpp Wed Oct 13 14:18:30 2010 +0300 @@ -192,7 +192,7 @@ if( !( aSuiteName.Compare( KRoot8 ) ) ) { CLiwGenericParamList* uriParams = - UriQueryToLiwListLC( aUriQuery, aUriFragment, aSuiteName ); + UriQueryToLiwListLC( aUriQuery, aUriFragment, aSuiteName ); CLiwGenericParamList* params = CLiwGenericParamList::NewLC(); params->AppendL( iMetaDataModel->GetSuiteParameters( 0 ) ); params->AppendL( *uriParams ); @@ -205,7 +205,7 @@ else { CLiwGenericParamList* params = - UriQueryToLiwListLC( aUriQuery, aUriFragment, aSuiteName ); + UriQueryToLiwListLC( aUriQuery, aUriFragment, aSuiteName ); HBufC* suiteName = HnConvUtils::Str8ToStrLC( aSuiteName ); params->AppendL( TLiwGenericParam( KNewSuiteParamNameEn, @@ -267,32 +267,27 @@ // --------------------------------------------------------------------------- // EXPORT_C void CHnEngine::LoadSuitesFromUriL( const TDesC8& aUri ) - { - DEBUG(("_MM_:CHnEngine::LoadSuitesFromUriL IN")); - DEBUG8(("_MM_:\tURI: %S",&aUri)); + { + DEBUG(("_MM_:CHnEngine::LoadSuitesFromUriL IN")); + DEBUG8(("_MM_:\tURI: %S",&aUri)); - TBool consumed( EFalse ); + TBool consumed(EFalse); - if( aUri.Find( KSetFocusWithPref ) != KErrNotFound ) - { - LoadFromCrL( aUri ); - consumed = ETrue; - } - else if( aUri.Find( KOpenItemWithPref ) != KErrNotFound ) - { - LoadItemFromCrL( aUri ); - consumed = ETrue; - } + if ( aUri.Find( KSetFocusWithPref ) != KErrNotFound ) + { + LoadFromCrL( aUri ); + consumed = ETrue; + } - if( !consumed ) - { - consumed = HandleActionL( aUri ); - } + if ( !consumed ) + { + consumed = HandleActionL( aUri ); + } - if( !consumed ) - { - LoadSuitesL( aUri ); - } + if ( !consumed ) + { + LoadSuitesL( aUri ); + } DEBUG(("_MM_:CHnEngine::LoadSuitesFromUriL OUT")); } @@ -358,19 +353,19 @@ ret = HandleSetFocusEventL( aParams ); } else if (aEventName == KAppGainForeground ) - { - //force matrix gain foreground + { + //force matrix gain foreground DEBUG(("_MM_:CHnEngine::HandleModelEventL EForegroundGain")); iControllerInterface.NotifyUiRefreshL( EForegroundGain ); ret = KErrNone; - } + } else if (aEventName == KAppGainBackground ) - { - //force matrix gain background + { + //force matrix gain background DEBUG(("_MM_:CHnEngine::HandleModelEventL EBackgroundGain")); iControllerInterface.NotifyUiRefreshL( EBackgroundGain ); ret = KErrNone; - } + } return ret; } @@ -607,41 +602,41 @@ TInt posSuite( 0 ); TInt posItem( 0 ); - TInt64 suiteCustomId( KErrNotFound ); - TInt64 itemCustomId( KErrNotFound ); + TInt64 suiteCustomId( KErrNotFound ); + TInt64 itemCustomId( KErrNotFound ); - // Get suite's and item's custom ids. - const TLiwGenericParam* paramSuiteId = aParams.FindFirst( posSuite, KSuiteCustomId8 ); - const TLiwGenericParam* paramItemId = aParams.FindFirst( posItem, KItemCustomId8 ); + // Get suite's and item's custom ids. + const TLiwGenericParam* paramSuiteId = aParams.FindFirst( posSuite, KSuiteCustomId8 ); + const TLiwGenericParam* paramItemId = aParams.FindFirst( posItem, KItemCustomId8 ); - if ( posSuite >= 0 && posItem >= 0 ) - { - suiteCustomId = paramSuiteId->Value().AsTInt64(); - itemCustomId = paramItemId->Value().AsTInt64(); + if ( posSuite >= 0 && posItem >= 0 ) + { + suiteCustomId = paramSuiteId->Value().AsTInt64(); + itemCustomId = paramItemId->Value().AsTInt64(); - // Get matching suite. - CHnSuiteModel* suiteModel = iSuiteContainer->GetMatchingSuiteModel( suiteCustomId ); + // Get matching suite. + CHnSuiteModel* suiteModel = iSuiteContainer->GetMatchingSuiteModel( suiteCustomId ); - if ( suiteModel ) - { - // If suite is not null, then find matching item model. - TInt index( KErrNotFound ); - CHnItemModel* itemModel = suiteModel->GetMatchingItemModelL( itemCustomId, index ); + if ( suiteModel ) + { + // If suite is not null, then find matching item model. + TInt index( KErrNotFound ); + CHnItemModel* itemModel = suiteModel->GetMatchingItemModelL( itemCustomId, index ); - if ( itemModel ) - { - // If itemModel is not null then set highlight and set highligh - // on matching item. - suiteModel->SetSuiteHighlightL( index ); - iControllerInterface.HandleSuiteEventL( ESuiteHighlightChanged, suiteModel ); - } - else - { - suiteModel->QueueFocus( itemCustomId ); - } - } - } + if ( itemModel ) + { + // If itemModel is not null then set highlight and set highligh + // on matching item. + suiteModel->SetSuiteHighlightL( index ); + iControllerInterface.HandleSuiteEventL( ESuiteHighlightChanged, suiteModel ); + } + else + { + suiteModel->QueueFocus( itemCustomId ); + } + } + } DEBUG(("_MM_:CHnEngine::HandleSetFocusEventL OUT")); return KErrNone; @@ -893,45 +888,18 @@ if ( aSource.Length() > 0 && aSeparator.Length() > 0 ) { TPtrC8 tmpSource = aSource; + TPtrC8 token( KNullDesC8 ); while( ETrue ) { TInt length = tmpSource.Find( aSeparator ); - if( aSeparator == HnLogicalRelations::KParamUid8 - && length != KErrNotFound ) - { - TInt ampPos( KErrNotFound ); - do - { - ampPos = tmpSource.Mid( - length + HnLogicalRelations::KParamUid8().Length() ). - Find( HnLogicalRelations::KLogicalAnd8 ); - if( ampPos >= 0 ) - { - length += (ampPos + HnLogicalRelations::KParamUid8().Length()); - ampPos = 0; - } - else if( (length + HnLogicalRelations::KParamUid8().Length()) - == tmpSource.Length()) - { - length = KErrNotFound; - } - }while( !ampPos ); - } - if ( length >= 0 ) { token.Set( tmpSource.Mid( 0, length ) ); tokens.AppendL( token.AllocL() ); tmpSource.Set( tmpSource.Mid( length + 1 ) ); - if( aSeparator == HnLogicalRelations::KLogicalEqual8 ) - { - token.Set( tmpSource ); - tokens.AppendL( token.AllocL() ); - break; - } } else { @@ -1025,18 +993,18 @@ // --------------------------------------------------------------------------- // void CHnEngine::LoadFromCrL( const TDesC8& aUri ) - { - HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); - uriBuf->Des().Copy( aUri ); + { + HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); + uriBuf->Des().Copy( aUri ); - TUriParser8 parser; - parser.Parse( *uriBuf ); - User::LeaveIfError( parser.IsSchemeValid() ? KErrNone : KErrPathNotFound ); + TUriParser8 parser; + parser.Parse( *uriBuf ); + User::LeaveIfError( parser.IsSchemeValid() ? KErrNone : KErrPathNotFound ); - const TDesC8& query = parser.Extract( EUriQuery ); - RPointerArray< HBufC8 > params = SplitL( query, HnLogicalRelations::KParamUid8); + const TDesC8& query = parser.Extract( EUriQuery ); + RPointerArray< HBufC8 > params = SplitL( query, HnLogicalRelations::KLogicalAnd8); - TBuf8< KApaMaxAppGroupName + KTimeStampBufferLength + KUidStringLength + 2> item; + TBuf8 item; for( TInt i = 0; i < params.Count(); i++ ) { @@ -1045,40 +1013,41 @@ ASSERT( paramValue.Count() == 2 ); if ( !paramValue[0]->Compare(KMcsAppGroupName8) ) - { - TBuf8< KApaMaxAppGroupName > appgrname; - if( paramValue[1]->Length()<= KApaMaxAppGroupName ) - { - appgrname.Append( *paramValue[1] ); - } + { + TBuf8 appgrname; + if( paramValue[1]->Length()<=KApaMaxAppGroupName ) + { + appgrname.Append( *paramValue[1] ); + } - //get current time - TTime currentTime; - currentTime.HomeTime(); - TDateTime date(currentTime.DateTime()); - item.Format(KCRepTimeFormat, &appgrname , date.Year(), date.Month(), - date.Day(), date.Hour(), date.Minute(), date.Second(), date.MicroSecond()); - } + //get current time + TTime currentTime; + currentTime.HomeTime(); + TDateTime date(currentTime.DateTime()); + item.Format(KCRepTimeFormat, &appgrname , date.Year(), date.Month(), + date.Day(), date.Hour(), date.Minute(), date.Second(), date.MicroSecond()); + } else if ( !paramValue[0]->Compare( KKeyTypeUid ) ) - { - item.Append( KComma8 ); + { + item.Append( KComma8 ); if( paramValue[1]->Length()<=KUidStringLength ) { item.Append( *paramValue[1] ); } - } + } CleanupStack::PopAndDestroy( ¶mValue ); } - TBuf< KApaMaxAppGroupName + KTimeStampBufferLength + KUidStringLength + 2> item1; + TBuf item1; item1.Copy(item); - CRepository *cenRep = CRepository::NewLC( KCRUidMenu ); - cenRep->Set(KMenuShowFolder, item1); - CleanupStack::PopAndDestroy( cenRep ); + CRepository *cenRep = CRepository::NewLC( KCRUidMenu ); + cenRep->Set(KMenuShowFolder, item1); + CleanupStack::PopAndDestroy( cenRep ); params.ResetAndDestroy(); CleanupStack::PopAndDestroy( uriBuf ); - } + + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- @@ -1112,96 +1081,96 @@ // --------------------------------------------------------------------------- // TBool CHnEngine::HandleActionL( const TDesC8& aUri ) - { - TBool exitActionConsumed( EFalse ); + { + TBool exitActionConsumed(EFalse); - HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); - uriBuf->Des().Copy( aUri ); + HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); + uriBuf->Des().Copy( aUri ); - TUriParser8 parser; + TUriParser8 parser; parser.Parse( *uriBuf ); User::LeaveIfError( parser.IsSchemeValid() ? KErrNone : KErrPathNotFound ); const TDesC8& host8 = parser.Extract( EUriHost ); const TDesC8& query = parser.Extract( EUriQuery ); - RBuf action; + RBuf action; CleanupClosePushL( action ); CLiwGenericParamList* paramsUri = UriQueryToLiwListLC( query, KNullDesC8, KNullDesC8 ); HnLiwUtils::GetStringL( *paramsUri, KActionParams, action ); - if( !action.Compare( KActionExit ) ) - { - RBuf host; - host.CreateL( host8.Length() ); - CleanupClosePushL( host ); - host.Copy( host8 ); - CHnSuiteModel* suiteModel = iSuiteContainer->GetSuiteModel( host ); - TBool exitHideHostNotFound( ETrue ); - if( suiteModel && suiteModel->ExitMode() == EExitModeHide ) - { - exitHideHostNotFound = EFalse; - } + if ( !action.Compare( KActionExit ) ) + { + RBuf host; + host.CreateL( host8.Length() ); + CleanupClosePushL( host ); + host.Copy(host8); + CHnSuiteModel* suiteModel = iSuiteContainer->GetSuiteModel( host ); + TBool exitHideHostNotFound( ETrue ); + if( suiteModel && suiteModel->ExitMode() == EExitModeHide ) + { + exitHideHostNotFound = EFalse; + } - if( exitHideHostNotFound ) - { - //send to foreground - CLiwGenericParamList* pl = CLiwGenericParamList::NewL(); - CleanupStack::PushL( pl ); - HandleModelEventL( KAppGainForeground, *pl ); - CleanupStack::PopAndDestroy( pl ); - } - else - { - //send to background - CLiwGenericParamList* pl = CLiwGenericParamList::NewL(); - CleanupStack::PushL( pl ); - HandleModelEventL( KAppGainBackground, *pl ); - CleanupStack::PopAndDestroy( pl ); - } + if ( exitHideHostNotFound ) + { + //send to foreground + CLiwGenericParamList* pl = CLiwGenericParamList::NewL(); + CleanupStack::PushL( pl ); + HandleModelEventL( KAppGainForeground, *pl ); + CleanupStack::PopAndDestroy( pl ); + } + else + { + //send to background + CLiwGenericParamList* pl = CLiwGenericParamList::NewL(); + CleanupStack::PushL( pl ); + HandleModelEventL( KAppGainBackground, *pl ); + CleanupStack::PopAndDestroy( pl ); + } - if( exitHideHostNotFound && iSuiteContainer->GetLastSuiteModel() == suiteModel ) - { - HandleBackEventL( host, 1 ); - } - else - { - //reset to root + if ( exitHideHostNotFound && iSuiteContainer->GetLastSuiteModel() == suiteModel ) + { + HandleBackEventL( host, 1 ); + } + else + { + //reset to root CLiwGenericParamList* params = CLiwGenericParamList::NewLC(); params->AppendL( iMetaDataModel->GetSuiteParameters( 0 ) ); - ResetModelsL(); + ResetModelsL(); InitializeL( *params ); CleanupStack::PopAndDestroy( params ); - } + } - CleanupStack::PopAndDestroy( &host ); - exitActionConsumed = ETrue; - } + CleanupStack::PopAndDestroy( &host ); + exitActionConsumed = ETrue; + } CleanupStack::PopAndDestroy( paramsUri ); CleanupStack::PopAndDestroy( &action ); CleanupStack::PopAndDestroy( uriBuf ); return exitActionConsumed; - } + } // --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- // void CHnEngine::LoadSuitesL( const TDesC8& aUri ) - { - TBool sendToForeground(EFalse); - HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); - uriBuf->Des().Copy( aUri ); + { + TBool sendToForeground(EFalse); + HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); + uriBuf->Des().Copy( aUri ); - TUriParser8 parser; - parser.Parse( *uriBuf ); - User::LeaveIfError( parser.IsSchemeValid() ? KErrNone : KErrPathNotFound ); + TUriParser8 parser; + parser.Parse( *uriBuf ); + User::LeaveIfError( parser.IsSchemeValid() ? KErrNone : KErrPathNotFound ); - CDesC8ArrayFlat* suiteNameArray = new( ELeave ) CDesC8ArrayFlat( KDefaultGranularity ) ; - CleanupStack::PushL( suiteNameArray ); + CDesC8ArrayFlat* suiteNameArray = new( ELeave ) CDesC8ArrayFlat( KDefaultGranularity ) ; + CleanupStack::PushL( suiteNameArray ); - const TDesC8& host = parser.Extract( EUriHost ); + const TDesC8& host = parser.Extract( EUriHost ); RBuf8 host8; CleanupClosePushL( host8 ); if (host.Compare( KNullDesC8 )) @@ -1212,19 +1181,19 @@ DEBUG8(( "_MM_:\tURI host part: %S", &host8 )); } - const TDesC8& path = parser.Extract( EUriPath ); - if (path.Compare( KNullDesC8 )) - { - HBufC8* path8 = HBufC8::NewLC( path.Length() ); - path8->Des().Copy( path ); - path8->Des().LowerCase(); - ParseSuiteUriPathL( *path8, *suiteNameArray ); - CleanupStack::PopAndDestroy( path8 ); - } + const TDesC8& path = parser.Extract( EUriPath ); + if (path.Compare( KNullDesC8 )) + { + HBufC8* path8 = HBufC8::NewLC( path.Length() ); + path8->Des().Copy( path ); + path8->Des().LowerCase(); + ParseSuiteUriPathL( *path8, *suiteNameArray ); + CleanupStack::PopAndDestroy( path8 ); + } - TBool suiteExists( EFalse ); - iMetaDataModel->IgnoreEvaluations( ETrue ); - iMetaDataModel->QueueForeground( CHnMdModel::EWhenAnySuiteIsEvaluated ); + TBool suiteExists( EFalse ); + iMetaDataModel->IgnoreEvaluations( ETrue ); + iMetaDataModel->QueueForeground( CHnMdModel::EWhenAnySuiteIsEvaluated ); if( host8.Length() == 0 || ( host8.Length() > 0 && !iMetaDataModel->SuiteModelExistsL( host8 ) ) ) @@ -1233,141 +1202,101 @@ suiteNameArray->AppendL( KRoot8 ); } - for( TInt i = 0; i < suiteNameArray->Count(); ++i ) - { - suiteExists = iMetaDataModel->SuiteModelExistsL( - ( *suiteNameArray )[i] ); - TBool nextExists = i < suiteNameArray->Count() - 1 && - iMetaDataModel->SuiteModelExistsL( ( *suiteNameArray )[i + 1] ); - TBool isLast = ( i == ( suiteNameArray->Count() - 1 ) ); + for( TInt i = 0; i < suiteNameArray->Count(); ++i ) + { + suiteExists = iMetaDataModel->SuiteModelExistsL( + ( *suiteNameArray )[i] ); + TBool nextExists = i < suiteNameArray->Count() - 1 && + iMetaDataModel->SuiteModelExistsL( ( *suiteNameArray )[i + 1] ); + TBool isLast = ( i == ( suiteNameArray->Count() - 1 ) ); - TBool turnOnEvaluation = ( suiteExists && ( !nextExists || isLast ) ); - if( turnOnEvaluation || !suiteExists ) - { - iMetaDataModel->IgnoreEvaluations( EFalse ); - } + TBool turnOnEvaluation = ( suiteExists && ( !nextExists || isLast ) ); + if( turnOnEvaluation || !suiteExists ) + { + iMetaDataModel->IgnoreEvaluations( EFalse ); + } - TInt err( KErrNone ); + TInt err( KErrNone ); - // Ignore loading new suite if the last suite in model is the same - // as first one in the uri. - if ( i == 0 ) - { - if ( SuitesAreTheSameL( iMetaDataModel->GetLastSuite()->SuiteName(), (*suiteNameArray)[i] ) ) - { - HandleTheSameSuitesL( nextExists, parser.Extract( EUriQuery ) ); - sendToForeground = ETrue; - continue; - } - } + // Ignore loading new suite if the last suite in model is the same + // as first one in the uri. + if ( i == 0 ) + { + if ( SuitesAreTheSameL( iMetaDataModel->GetLastSuite()->SuiteName(), (*suiteNameArray)[i] ) ) + { + HandleTheSameSuitesL( nextExists, parser.Extract( EUriQuery ) ); + sendToForeground = ETrue; + continue; + } + } - if( suiteExists ) - { - if (!nextExists) - { - // Tricky: queue foreground so that if the suite is evaluated synchronously - // the foreground will be gained. - iMetaDataModel->QueueForeground( CHnMdModel::EWhenAnySuiteIsEvaluated ); - } - err = LoadSuiteFromUriL( - ( *suiteNameArray )[i], parser.Extract( EUriQuery ), parser.Extract( EUriFragment ) ); - if ( KErrNone == err && !nextExists && iMetaDataModel->IsForegroundQueued() ) - { - // Tricky: if foreground is still queued it means that the suite is evaluated - // asynchronously. Override the previos foreground queue setting with one - // that will be effective only if the last loaded suite is evaluated. - iMetaDataModel->QueueForeground( CHnMdModel::EWhenCurrentTopSuiteIsEvaluated ); - } - if ( err != KErrNone ) - { - sendToForeground = ETrue; - } - } + if( suiteExists ) + { + if (!nextExists) + { + // Tricky: queue foreground so that if the suite is evaluated synchronously + // the foreground will be gained. + iMetaDataModel->QueueForeground( CHnMdModel::EWhenAnySuiteIsEvaluated ); + } + err = LoadSuiteFromUriL( + ( *suiteNameArray )[i], parser.Extract( EUriQuery ), parser.Extract( EUriFragment ) ); + if ( KErrNone == err && !nextExists && iMetaDataModel->IsForegroundQueued() ) + { + // Tricky: if foreground is still queued it means that the suite is evaluated + // asynchronously. Override the previos foreground queue setting with one + // that will be effective only if the last loaded suite is evaluated. + iMetaDataModel->QueueForeground( CHnMdModel::EWhenCurrentTopSuiteIsEvaluated ); + } + if ( err != KErrNone ) + { + sendToForeground = ETrue; + } + } - if( !suiteExists || err != KErrNone || !nextExists ) - { - CHnFilter* filter = CHnFilter::NewLC(); + if( !suiteExists || err != KErrNone || !nextExists ) + { + CHnFilter* filter = CHnFilter::NewLC(); - filter->SetSuiteId( - iSuiteContainer->GetLastSuiteModel()->CustomId() ); + filter->SetSuiteId( + iSuiteContainer->GetLastSuiteModel()->CustomId() ); - filter->SetEvaluateSuiteL( ETrue ); - iMetaDataModel->IgnoreEvaluations( EFalse ); + filter->SetEvaluateSuiteL( ETrue ); + iMetaDataModel->IgnoreEvaluations( EFalse ); - TRAPD( err, iMetaDataModel->EvaluateL( *filter ) ); + TRAPD( err, iMetaDataModel->EvaluateL( *filter ) ); - CleanupStack::PopAndDestroy( filter ); - if( err ) - { - iMetaDataModel->DeleteLastSuite(); - iSuiteContainer->PopSuiteModelL( - HnConvUtils::Str8ToStr( ( *suiteNameArray )[i] )->Des() ); - sendToForeground = ETrue; - } - break; - } - } + CleanupStack::PopAndDestroy( filter ); + if( err ) + { + iMetaDataModel->DeleteLastSuite(); + iSuiteContainer->PopSuiteModelL( + HnConvUtils::Str8ToStr( ( *suiteNameArray )[i] )->Des() ); + sendToForeground = ETrue; + } + break; + } + } - // set highlight only when path is valid! - if( suiteExists ) - { - HighlightPlacementFromUriL( parser.Extract( EUriFragment ) ); - } + // set highlight only when path is valid! + if( suiteExists ) + { + HighlightPlacementFromUriL( parser.Extract( EUriFragment ) ); + } CleanupStack::PopAndDestroy( &host8 ); - CleanupStack::PopAndDestroy( suiteNameArray ); - CleanupStack::PopAndDestroy( uriBuf ); - - // send to foreground - if ( sendToForeground ) - { - CLiwGenericParamList* pl = CLiwGenericParamList::NewL(); - CleanupStack::PushL( pl ); - HandleModelEventL( KAppGainForeground, *pl ); - CleanupStack::PopAndDestroy( pl ); - iMetaDataModel->QueueForeground( CHnMdModel::ENever ); - } - - } -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CHnEngine::LoadItemFromCrL( const TDesC8& aUri ) - { - HBufC8* uriBuf = HBufC8::NewLC( aUri.Length() ); - uriBuf->Des().Copy( aUri ); - - TUriParser8 parser; - parser.Parse( *uriBuf ); - User::LeaveIfError( parser.IsSchemeValid() ? KErrNone : KErrPathNotFound ); + CleanupStack::PopAndDestroy( suiteNameArray ); + CleanupStack::PopAndDestroy( uriBuf ); - const TDesC8& query = parser.Extract( EUriQuery ); - - if( query.Compare( KNullDesC8 ) ) - { - TBuf8 item; - RPointerArray paramValue = SplitL( query, - HnLogicalRelations::KLogicalEqual8 ); - CleanupResetAndDestroyPushL( paramValue ); - ASSERT( paramValue.Count() == 2 ); +// send to foreground + if ( sendToForeground ) + { + CLiwGenericParamList* pl = CLiwGenericParamList::NewL(); + CleanupStack::PushL( pl ); + HandleModelEventL( KAppGainForeground, *pl ); + CleanupStack::PopAndDestroy( pl ); + iMetaDataModel->QueueForeground( CHnMdModel::ENever ); + } - if( !paramValue[0]->Compare( KId8 ) ) - { - if( paramValue[1]->Length() <= KUidStringLength ) - { - item.Append( *paramValue[1] ); - } - } - CleanupStack::PopAndDestroy( ¶mValue ); - - TBuf item1; - item1.Copy( item ); - CRepository *cenRep = CRepository::NewLC( KCRUidMenu ); - cenRep->Set( KMenuOpenItem, item1 ); - CleanupStack::PopAndDestroy( cenRep ); - } - CleanupStack::PopAndDestroy( uriBuf ); - } + } // End of file