csxhelp/src/CSXHAppUi.cpp
changeset 0 1f04cf54edd8
child 5 d06b1526f62c
equal deleted inserted replaced
-1:000000000000 0:1f04cf54edd8
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  CCSXHAppUi class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "CSXHAppUi.h"
       
    20 #include "CSXHGenericView.h"
       
    21 #include "CSXHHtmlTopicView.h"
       
    22 #include "CSXHLegacyTopicView.h"
       
    23 #include "CsHelp.hrh"
       
    24 #include <cshelp.rsg>
       
    25 #include "CSXHAppUi.h"
       
    26 #include "CSXHDocument.h"
       
    27 
       
    28 #include "CSXHHelpDataBase.h"
       
    29 #include "CSXHViewIDs.h"
       
    30 
       
    31 #include <avkon.hrh>
       
    32 #include <utf.h>
       
    33 #include <aknnotewrappers.h> 
       
    34 #include <AknGlobalNote.h>
       
    35 #include <akninputblock.h>
       
    36 #include <hlplch.h>
       
    37 
       
    38 #include "csxhconstants.h"
       
    39 
       
    40 #ifdef FF_HELP_TUTORIAL_MERGE
       
    41 #include <AiwServiceHandler.h>
       
    42 
       
    43 #if defined(_DEBUG) && defined(__WINS__)
       
    44 #include <f32file.h>
       
    45 #include <flogger.h>
       
    46 _LIT(KLogDir, "csxh");
       
    47 _LIT(KLogFile, "csxh.txt");
       
    48 inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
       
    49     {
       
    50     VA_LIST list;
       
    51     VA_START(list,aFmt);
       
    52     RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
       
    53     }
       
    54 #define FLOG(a) {FPrint(a);}
       
    55 #define FLOGF   FPrint
       
    56 #else //_DEBUG
       
    57 #define FLOG(a)
       
    58 #define FLOGF
       
    59 #endif //_DEBUG
       
    60 #endif // FF_HELP_TUTORIAL_MERGE
       
    61 CCSXHAppUi* CCSXHAppUi::iInstance = NULL;
       
    62 
       
    63 // ConstructL is called by the application framework
       
    64 void CCSXHAppUi::ConstructL()
       
    65     {
       
    66 #ifndef __SERIES60_30__         
       
    67     BaseConstructL(EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
       
    68 #else
       
    69     BaseConstructL(EAknEnableSkin);
       
    70 #endif  
       
    71   
       
    72 #ifdef FF_HELP_TUTORIAL_MERGE
       
    73     LoadTutorialService();
       
    74 #endif // FF_HELP_TUTORIAL_MERGE
       
    75     SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | CAknAppUiBase::EDisableSendKeyLong );
       
    76     iTOC1View = CCSXHGenericView::NewL(KCSXHToc1ViewID,R_CSXH_TOC1);
       
    77     AddViewL(iTOC1View); 
       
    78     
       
    79     iTOC2View = NULL;
       
    80     iKywdTOC1View = NULL;
       
    81     iKywdTOC2View = NULL;
       
    82     iHtmlTopicView = NULL;
       
    83     iLegacyTopicView = NULL;
       
    84     iLegacyContextTopicView = NULL;
       
    85     
       
    86     SetDefaultViewL(*iTOC1View);  
       
    87         
       
    88     iRuntimeWatcher = CCSXHRuntimeAppWatcher::NewL();
       
    89     iRuntimeWatcher->SetObserver( this );
       
    90     iRuntimeWatcher->Start();
       
    91 #ifdef _DEBUG
       
    92     RDebug::Print( _L("Help app launched") );
       
    93 #endif
       
    94     }
       
    95 
       
    96 CCSXHAppUi::CCSXHAppUi()                              
       
    97     {
       
    98     iInstance = this;
       
    99     }
       
   100 
       
   101 CCSXHAppUi::~CCSXHAppUi()
       
   102     {
       
   103 #ifdef FF_HELP_TUTORIAL_MERGE
       
   104 
       
   105     if(iServiceHandler)
       
   106         {
       
   107         delete iServiceHandler;
       
   108         }
       
   109 
       
   110 #endif // FF_HELP_TUTORIAL_MERGE
       
   111 #ifdef _DEBUG
       
   112     RDebug::Print(_L("Help app ended"));
       
   113 #endif
       
   114     if ( iRuntimeWatcher )
       
   115         delete iRuntimeWatcher;
       
   116 
       
   117     }
       
   118 
       
   119 // --------------------------------------------------------------------------
       
   120 // Message Handler
       
   121 // --------------------------------------------------------------------------
       
   122 void CCSXHAppUi::HandleCommandL(TInt aCommand)
       
   123     {
       
   124     switch(aCommand)
       
   125         {
       
   126         case EEikCmdExit:
       
   127         case EAknSoftkeyExit:
       
   128         case EAknSoftkeyClose:
       
   129             Exit();
       
   130             break;
       
   131   
       
   132         case ECSXHOpenTopicText:
       
   133         case ECSXHOpenItemPropagated:
       
   134         case ECSXHOpenItem:        
       
   135             {
       
   136             CAknInputBlock* inputBlock = CAknInputBlock::NewLC();
       
   137             ActivateDisplayTopicViewL();
       
   138             CleanupStack::PopAndDestroy( inputBlock ); 
       
   139             }
       
   140             break;
       
   141         case ECSXHSearchText:
       
   142             {
       
   143             CCSXHDocument* doc = static_cast<CCSXHDocument*>(Document());
       
   144             doc->SetDisplayTopic(doc->GetHelpDataBase()->GetKywdTopics());
       
   145             ActivateDisplayTopicViewL();
       
   146             }
       
   147             break;
       
   148         default:
       
   149             break;
       
   150         }
       
   151     }
       
   152 void CCSXHAppUi::InitDisplayTopicViewL(TUid aViewID)
       
   153 	{
       
   154 	if(aViewID == KCSXHToc1ViewID)
       
   155 		return;
       
   156 	
       
   157 	
       
   158   	if(aViewID == KCSXHContextLegacyTopicViewID && iLegacyContextTopicView == NULL)	
       
   159 	 	{
       
   160         iLegacyContextTopicView = CCSXHLegacyTopicView::NewL (KCSXHContextLegacyTopicViewID,
       
   161                                                               R_CSHELP_TOPICFORCONTEXT,
       
   162                                                               ClientRect());
       
   163     	AddViewL(iLegacyContextTopicView);
       
   164 	 	}	 	   
       
   165 	else if(aViewID == KCSXHToc2ViewID && iTOC2View == NULL)
       
   166 		{
       
   167 		iTOC2View = CCSXHGenericView::NewL(KCSXHToc2ViewID,R_TOPICLIST);
       
   168     	AddViewL(iTOC2View); 
       
   169 		}
       
   170 	 else if(aViewID == KCSXHKywdToc1ViewID && iKywdTOC1View == NULL)
       
   171 	 	{
       
   172 	 	iKywdTOC1View = CCSXHGenericView::NewL(KCSXHKywdToc1ViewID,R_KYWDTOC1LIST);
       
   173     	AddViewL(iKywdTOC1View);
       
   174 	 	}
       
   175 	 else if(aViewID == KCSXHKywdToc2ViewID && iKywdTOC2View == NULL)	
       
   176 	 	{
       
   177 	 	iKywdTOC2View = CCSXHGenericView::NewL(KCSXHKywdToc2ViewID,R_KYWDTOC2LIST);
       
   178     	AddViewL(iKywdTOC2View); 
       
   179 	 	}
       
   180 	 else if(aViewID == KCSXHLegacyTopicViewID && iLegacyTopicView == NULL)	
       
   181 	 	{
       
   182         iLegacyTopicView = CCSXHLegacyTopicView::NewL(KCSXHLegacyTopicViewID,
       
   183                                                       R_TOPICTEXTLIST,ClientRect());
       
   184     	AddViewL(iLegacyTopicView);
       
   185 	 	}	
       
   186 	 	
       
   187 	 else if(aViewID == KCSXHContextHtmlTopicViewID )	
       
   188 	 	{
       
   189 	 	if(!iHtmlTopicView)
       
   190 	 		{
       
   191             iHtmlTopicView = CCSXHHtmlTopicView::NewL(KCSXHHtmlTopicViewID,
       
   192                                                       R_CSHELP_HTMLTOPICFORCONTEXT,
       
   193                                                       ClientRect());
       
   194     		AddViewL(iHtmlTopicView);	
       
   195 	 		}
       
   196 	 	else
       
   197 	 		{
       
   198 	 		//View is already created update the softkeys to Options and Close
       
   199 	 		iHtmlTopicView->SetViewTypeL(CCSXHHtmlTopicView::EContextHtmlView);
       
   200 	 		}
       
   201   	 	}	
       
   202 	 else if(aViewID == KCSXHHtmlTopicViewID )	
       
   203 	 	{
       
   204 	 	if(!iHtmlTopicView)
       
   205 	 		{
       
   206             iHtmlTopicView = CCSXHHtmlTopicView::NewL(KCSXHHtmlTopicViewID,
       
   207                                                       R_CSHELP_HTMLTOPICVIEW,
       
   208                                                       ClientRect());
       
   209     		AddViewL(iHtmlTopicView);
       
   210 	 		}
       
   211 	 	else
       
   212 	 		{
       
   213 	 		//View is already created update the softkeys to Options and Back
       
   214 	 		iHtmlTopicView->SetViewTypeL(CCSXHHtmlTopicView::EHtmlView);
       
   215 	 		}
       
   216 	 	}
       
   217 	}
       
   218 // --------------------------------------------------------------------------
       
   219 // Activates the view corresponding to the topic to be displayed
       
   220 // It also sets for recreating the container dending on the view to be 
       
   221 // activated, 
       
   222 // 1) Search Pane in Search Result View will be cleared if user 
       
   223 // opens the Search View.
       
   224 // 2)Search Pane in Application Topics view will be cleared, if user opens 
       
   225 //      a)Help Contents View 
       
   226 //      b)Search View 
       
   227 //      c)Context Senisitive view
       
   228 // --------------------------------------------------------------------------
       
   229 void CCSXHAppUi::ActivateDisplayTopicViewL()
       
   230     {
       
   231     CCSXHDocument* doc = static_cast<CCSXHDocument*>(Document());
       
   232     TUid viewId = doc->GetDisplayTopic()->GetViewID();
       
   233     InitDisplayTopicViewL(viewId);
       
   234     
       
   235     if(viewId == KCSXHKywdToc1ViewID )
       
   236         {
       
   237         if(iKywdTOC2View)
       
   238         	iKywdTOC2View->ResetContainer();
       
   239         if(iTOC2View)
       
   240         	iTOC2View->ResetContainer();
       
   241         }
       
   242 	else if(viewId == KCSXHToc1ViewID ||
       
   243 	        viewId == KCSXHContextHtmlTopicViewID ||
       
   244             viewId == KCSXHContextLegacyTopicViewID )
       
   245 	    {
       
   246 	    if(iTOC2View)
       
   247 			iTOC2View->ResetContainer();
       
   248 	    }
       
   249 /*	else if(viewId == KCSXHKywdToc1ViewID)  
       
   250 		{
       
   251 		doc->InitProgressBarL();
       
   252 		}
       
   253 */	
       
   254 	if(viewId == KCSXHContextHtmlTopicViewID)    
       
   255 		viewId = KCSXHHtmlTopicViewID;
       
   256     ActivateLocalViewL(viewId);
       
   257     }
       
   258 void CCSXHAppUi::HandleForegroundEventL(TBool aForeground)
       
   259 	{
       
   260 	// Call Base class method
       
   261  	CAknAppUi::HandleForegroundEventL(aForeground);
       
   262 
       
   263  	if(!aForeground && iView && 
       
   264  	iView->Id() != KCSXHHtmlTopicViewID
       
   265  	&& iHtmlTopicView)
       
   266  		{
       
   267  		//put NUll first in for bug ESXU-7JA9NS
       
   268  		iHtmlTopicView = NULL;
       
   269      	// We have lost the focus
       
   270      	//Check if the HTML view is the last active view. If it not delete it 
       
   271      	//to free the memory used by the browser control
       
   272      	RemoveView(KCSXHHtmlTopicViewID);
       
   273      	//delete iHtmlTopicView;
       
   274     	}
       
   275 	}
       
   276 // --------------------------------------------------------------------------
       
   277 // It sets a flag in the View for recreating the container 
       
   278 // --------------------------------------------------------------------------
       
   279 void CCSXHAppUi::ResetTOC2ViewContainer()
       
   280     {
       
   281     if(iTOC2View)
       
   282     	iTOC2View->ResetContainer();	
       
   283     }
       
   284 // --------------------------------------------------------------------------
       
   285 // Context sensitive help launch handling. Help is not running
       
   286 // --------------------------------------------------------------------------
       
   287 TBool CCSXHAppUi::ProcessCommandParametersL(TApaCommand aCommand,
       
   288                                               TFileName& /* aDocumentName */,
       
   289                                               const TDesC8& aTail)
       
   290     {
       
   291     if (aCommand == EApaCommandOpen)
       
   292         { // when another app launches the help app
       
   293         HandleContextSensitiveLaunchL(aTail);
       
   294         }
       
   295     return EFalse;
       
   296     }
       
   297 
       
   298 // --------------------------------------------------------------------------
       
   299 // Context sensitive help launch handling. Help is already running
       
   300 // --------------------------------------------------------------------------
       
   301 MCoeMessageObserver::TMessageResponse CCSXHAppUi::HandleMessageL(
       
   302            TUint32 aClientHandleOfTargetWindowGroup,
       
   303            TUid aMessageUid,
       
   304            const TDesC8& aMessageParameters)
       
   305     {
       
   306     if (aMessageUid == KHlpAppWsMsg)
       
   307         {
       
   308         HandleContextSensitiveLaunchL(aMessageParameters);
       
   309         return EMessageHandled;
       
   310         }
       
   311     return CAknViewAppUi::HandleMessageL(aClientHandleOfTargetWindowGroup,
       
   312                                          aMessageUid,
       
   313                                          aMessageParameters);
       
   314     }
       
   315 
       
   316 // --------------------------------------------------------------------------
       
   317 // Opens the context topic. If no topic is avbl then toc1 view is activated
       
   318 // --------------------------------------------------------------------------
       
   319 void  CCSXHAppUi::HandleContextSensitiveLaunchL(const TDesC8& aContext )   
       
   320     {
       
   321     CCSXHDocument* doc = static_cast<CCSXHDocument*>(Document());
       
   322         
       
   323     if(doc->SetContextTopicAsDisplayTopicL(aContext))
       
   324         {
       
   325         TRAPD(res,ActivateDisplayTopicViewL());
       
   326         if(res == KErrNone)
       
   327             return;
       
   328         }
       
   329     
       
   330     //No topic avaliable, activate the TOC1 View & Pop a message
       
   331     doc->SetDisplayTopic(doc->GetHelpDataBase()->GetMainTopics());
       
   332     ActivateDisplayTopicViewL();
       
   333         
       
   334     HBufC* ErrorMessage = iCoeEnv->AllocReadResourceLC(R_TYPE_NO_HELP_TOPICS);      
       
   335     CAknGlobalNote* note = CAknGlobalNote::NewLC();
       
   336     note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
       
   337 
       
   338     CleanupStack::PopAndDestroy(note); 
       
   339     CleanupStack::PopAndDestroy(ErrorMessage); 
       
   340     }
       
   341 
       
   342 CCSXHAppUi* CCSXHAppUi::GetInstance()
       
   343     {
       
   344     return iInstance;
       
   345     }
       
   346 RWsSession& CCSXHAppUi::GetWsSession()
       
   347     {
       
   348     return iInstance->iCoeEnv->WsSession();
       
   349     }
       
   350 CCoeEnv* CCSXHAppUi::GetCoeEnv()
       
   351     {
       
   352     return iInstance->iCoeEnv;
       
   353     }
       
   354 
       
   355 // --------------------------------------------------------------------------
       
   356 // Launches an application based on the Application UID and a View ID
       
   357 // --------------------------------------------------------------------------
       
   358 void CCSXHAppUi::AppLaunchL(TInt32& aAppId,TInt32& aVId)
       
   359     {
       
   360     //Convert from TInt to TUid
       
   361     TUid KtestAppUid( TUid::Uid( aAppId ) ); 
       
   362     TUid KtestViewUid( TUid::Uid( aVId ) ); 
       
   363       
       
   364     //Launch Application
       
   365     TVwsViewId AppLaunch(KtestAppUid,KtestViewUid);
       
   366     ActivateViewL(AppLaunch);
       
   367     }
       
   368 
       
   369 // --------------------------------------------------------------------------
       
   370 // Launches an application based on the Application UID and a View ID
       
   371 // --------------------------------------------------------------------------
       
   372 void CCSXHAppUi::AppLaunchL(TInt32& aAppId,TInt32& aVId,
       
   373                             TInt32& aMsgId,
       
   374                             const TBuf<KMaxParamLength>& aParams)
       
   375     {
       
   376     //Convert from TInt to TUid
       
   377     TUid AplnUid( TUid::Uid( aAppId ) ); 
       
   378     TUid AplnViewUid( TUid::Uid( aVId ) ); 
       
   379     TUid MsgUid( TUid::Uid( aMsgId ) ); 
       
   380       
       
   381     //Launch Application
       
   382     TVwsViewId AppLaunch(AplnUid,AplnViewUid);
       
   383     
       
   384     HBufC8* params = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aParams);
       
   385     CleanupStack::PushL(params);
       
   386     ActivateViewL(AppLaunch,MsgUid,*params);
       
   387     CleanupStack::PopAndDestroy(params);
       
   388     }
       
   389  
       
   390 void CCSXHAppUi::PropagateResourceChange(TInt aType)
       
   391     {
       
   392     iTOC1View->ResourceChangeHdl(aType);
       
   393     if(iKywdTOC1View)
       
   394     	iKywdTOC1View->ResourceChangeHdl(aType);
       
   395     if(iKywdTOC2View)
       
   396     	iKywdTOC2View->ResourceChangeHdl(aType);
       
   397     if(iTOC2View)
       
   398 		iTOC2View->ResourceChangeHdl(aType);    
       
   399     if(iHtmlTopicView)
       
   400     	iHtmlTopicView->ResourceChangeHdl(aType);
       
   401     if(iLegacyTopicView)
       
   402     	iLegacyTopicView->ResourceChangeHdl(aType);
       
   403     if(iLegacyContextTopicView)
       
   404     	iLegacyContextTopicView->ResourceChangeHdl(aType);
       
   405     }
       
   406  
       
   407 void CCSXHAppUi::RuntimeUpdateIndex()
       
   408     {
       
   409     CAknNoteDialog* dlg = new ( ELeave ) CAknNoteDialog();
       
   410     dlg->SetTimeout( CAknNoteDialog::EShortTimeout );
       
   411     dlg->SetTone( CAknNoteDialog::ENoTone );
       
   412     dlg->ExecuteLD( R_CSHELP_INSTALL_UNINSTALL_NOTE );
       
   413     }
       
   414    
       
   415        
       
   416 #ifdef FF_HELP_TUTORIAL_MERGE
       
   417 // --------------------------------------------------------------------------
       
   418 // CCSXHAppUi::NewParamListLC
       
   419 // Create paramlist for provider.
       
   420 // --------------------------------------------------------------------------
       
   421 CAiwGenericParamList* CCSXHAppUi::NewParamListLC(
       
   422                                             const TCoeHelpContext& aContext)
       
   423     {
       
   424     TAiwVariant variant1;
       
   425     TAiwVariant variant2;
       
   426     variant1.Set(aContext.iMajor);
       
   427     TAiwGenericParam param1(EGenericParamHelpItem, variant1);
       
   428     variant2.Set(aContext.iContext);
       
   429     TAiwGenericParam param2(EGenericParamHelpItem, variant2);
       
   430     CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
       
   431     list->AppendL(param1);
       
   432     list->AppendL(param2);
       
   433     return list;
       
   434     }
       
   435 
       
   436 // --------------------------------------------------------------------------
       
   437 // CCSXHAppUi::LoadTutorialService
       
   438 // Load service handler and attach interest for using tutorial service command.
       
   439 // --------------------------------------------------------------------------
       
   440 void CCSXHAppUi::LoadTutorialService()
       
   441     {
       
   442     iServiceHandler = CAiwServiceHandler::NewL();
       
   443 
       
   444     // Create AIW interest
       
   445     RCriteriaArray interest;
       
   446 
       
   447     iServiceHandler->AttachL(R_AIWTUTORIALAPP_INTEREST);
       
   448 
       
   449     //Tutorial AIW provider exists or not
       
   450     iTutorialExists = EFalse;
       
   451     iServiceHandler->GetInterest(interest);
       
   452     if(interest.Count() > 0)
       
   453         {
       
   454         FLOGF(_L("CCSXHAppUi::LoadTutorialService() - interest.Count()=%d"), interest.Count());
       
   455         CAiwCriteriaItem* testCriteria = interest[0];
       
   456         if(iServiceHandler->NbrOfProviders(interest[0]) > 0)
       
   457             {
       
   458             FLOGF(_L("CCSXHAppUi::LoadTutorialService() - NbrOfProviders()=%d"), iServiceHandler->NbrOfProviders(interest[0]));
       
   459             iTutorialExists = ETrue;
       
   460             }
       
   461         }
       
   462     interest.Close();
       
   463     }
       
   464 
       
   465 // --------------------------------------------------------------------------
       
   466 // CCSXHAppUi::CallTutorialAiwProviderL
       
   467 // If tutorial exists,call play presentation command.
       
   468 // --------------------------------------------------------------------------
       
   469 void CCSXHAppUi::CallTutorialAiwProviderL()
       
   470     {
       
   471     CAiwGenericParamList* inlist = NewParamListLC( iTCoeHelpContext );
       
   472 
       
   473     iServiceHandler->ExecuteServiceCmdL( KPlayPresentation,
       
   474                                          *inlist,
       
   475                                          iServiceHandler->OutParamListL() );
       
   476     CleanupStack::PopAndDestroy();   //inlist
       
   477     }
       
   478 
       
   479 // --------------------------------------------------------------------------
       
   480 // CCSXHAppUi::IsApplicationPresentInTutorialL
       
   481 // If tutorial exists,identify the presentation needed exist or not.
       
   482 // --------------------------------------------------------------------------
       
   483 TBool CCSXHAppUi::IsApplicationPresentInTutorialL()
       
   484     {
       
   485     TBool Result = EFalse;
       
   486     //__ASSERT_DEBUG( iTutorialExists, User::Panic(_L("TutAiwHlp"),-1));
       
   487     if(iTutorialExists )
       
   488         {
       
   489         CAiwGenericParamList* inlist = NewParamListLC(iTCoeHelpContext) ;
       
   490 
       
   491         CAiwGenericParamList* outlist = CAiwGenericParamList::NewLC();
       
   492 
       
   493         TUid maj = iTCoeHelpContext.iMajor;
       
   494         TCoeContextName con = iTCoeHelpContext.iContext;
       
   495 
       
   496         FLOGF(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - 0x%08x %S"),maj,&con);
       
   497 
       
   498         //checks if the application specific presentation exists.
       
   499         //Parameter list inlist must contain AppUid which refers to presentation.
       
   500         // The other parameters are not used.
       
   501         //The result is returned in outlist parameter list.
       
   502         //First parameter in the outlist contains ETrue if there is presentation
       
   503         //available and EFalse if there is not.
       
   504         iServiceHandler->ExecuteServiceCmdL( KPresentationExists,
       
   505                                              *inlist, *outlist );
       
   506 
       
   507         FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-1"));
       
   508 
       
   509         //__ASSERT_DEBUG( outlist->Count() > 0, User::Panic(_L("TutAiwHlpO"),-1));
       
   510         __ASSERT_DEBUG(outlist->Count(), User::Panic(_L("outlist"),0));
       
   511 
       
   512         FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-2"));
       
   513         if( outlist->Count() > 0)
       
   514             {
       
   515             FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-2.4"));
       
   516             TAiwGenericParam param = (*outlist)[0];
       
   517             TAiwVariant variant = param.Value();
       
   518             TInt32 val(0);
       
   519 
       
   520             if(variant.Get(val) && val)
       
   521                 {
       
   522                 Result = ETrue;
       
   523                 }
       
   524             FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-3"));
       
   525             __ASSERT_DEBUG( variant.Get(val) && val, User::Panic(_L("TutAiwHlpV"),-1));
       
   526             }
       
   527         CleanupStack::PopAndDestroy();   //outlist
       
   528         CleanupStack::PopAndDestroy();   //inlist
       
   529         }
       
   530     return Result;
       
   531     }
       
   532 
       
   533 // --------------------------------------------------------------------------
       
   534 // CCSXHAppUi::SetHelpContext
       
   535 // If tutorial exists,identify the presentation needed exist or not.
       
   536 // --------------------------------------------------------------------------
       
   537 void CCSXHAppUi::SetHelpContext(TCoeHelpContext aTCoeHelpContext)
       
   538     {
       
   539     iTCoeHelpContext = aTCoeHelpContext;
       
   540     }
       
   541 #endif // FF_HELP_TUTORIAL_MERGE