csxhelp/inc/CSXHAppUi.h
branchRCL_3
changeset 17 12f60d9a73b3
parent 16 0d1adf67ec1b
child 18 cbffe13eac63
equal deleted inserted replaced
16:0d1adf67ec1b 17:12f60d9a73b3
     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 declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef INC_CSXHAPPUI_H_HEADER_INCLUDED_BC054CBF
       
    20 #define INC_CSXHAPPUI_H_HEADER_INCLUDED_BC054CBF
       
    21 
       
    22 #include <aknViewAppUi.h>
       
    23 #include "AppLauncherForCSXH.h"
       
    24 #include "csxhruntimeappwatcher.h"
       
    25 
       
    26 //Forward declarations
       
    27 class CCSXHHtmlTopicView;
       
    28 class CCSXHLegacyTopicView;
       
    29 class CCSXHGenericView;
       
    30 #ifdef FF_HELP_TUTORIAL_MERGE
       
    31 class CAiwGenericParamList;
       
    32 class CAiwServiceHandler;
       
    33 #endif // FF_HELP_TUTORIAL_MERGE
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /** 
       
    38 * @class CCSXHAppUi
       
    39 * Application UI class
       
    40 * Provides support for the following features:
       
    41 * - view architecture
       
    42 */
       
    43 class CCSXHAppUi : public CAknViewAppUi,
       
    44                    public MInstallationObserver
       
    45     {
       
    46   public:
       
    47 /** 
       
    48  * @function ConstructL
       
    49  * @since S60 3.2
       
    50  * Perform the second phase construction of a CCSXHAppUi object this needs
       
    51  * to be public due to the way the framework constructs the AppUi      
       
    52  */
       
    53     void ConstructL();
       
    54 /** 
       
    55  * @function CCSXHAppUi
       
    56  * @since S60 3.2
       
    57  * Perform the first phase of two phase construction. This needs to be
       
    58  * public due to the way the framework constructs the AppUi
       
    59  */    
       
    60     CCSXHAppUi();
       
    61 /** 
       
    62  * @function ~CCSXHAppUi
       
    63  * @since S60 3.2
       
    64  * Destroy the object and release all memory objects
       
    65  */    
       
    66     ~CCSXHAppUi();
       
    67 
       
    68 /** 
       
    69  * @function ~CCSXHAppUi
       
    70  * @since S60 3.2  
       
    71  * From CEikAppUi, takes care of command handling.
       
    72  * @param aCommand command to be handled
       
    73  */    
       
    74     void HandleCommandL(TInt aCommand);
       
    75     
       
    76 /** 
       
    77  *  @function PropagateResourceChange
       
    78  *  @since S60 3.2
       
    79  *  Propagates the resource change event to all views
       
    80  *  @param aType - Type of resource change event
       
    81  */		
       
    82 	void PropagateResourceChange(TInt aType);     
       
    83     
       
    84 /** 
       
    85  * @function GetInstance
       
    86  * @since S60 3.2  
       
    87  * returns Application UI class pointer 
       
    88  * @return Application UI class pointer 
       
    89  */     
       
    90     static CCSXHAppUi* GetInstance();
       
    91 
       
    92 /** 
       
    93  * @function GetWsSession
       
    94  * @since S60 3.2  
       
    95  * returns WsSession Pointer
       
    96  * @return WsSession pointer
       
    97  */    
       
    98 	static RWsSession& GetWsSession();
       
    99 
       
   100 /** 
       
   101  * @function GetCoeEnv
       
   102  * @since S60 3.2  
       
   103  * returns Control Environment pointer
       
   104  * @return Control Environment pointer
       
   105  */	
       
   106 	static CCoeEnv* GetCoeEnv();
       
   107 
       
   108 /** 
       
   109  * @function AppLaunchL
       
   110  * @since S60 3.2  
       
   111  * Launch the Application based on Uid & ViewId
       
   112  * @param aAppId Application Uid
       
   113  * 		 aVId   ViewId 
       
   114  */	    
       
   115     void AppLaunchL(TInt32 &aAppId,TInt32 &aVId);
       
   116     
       
   117 /** 
       
   118  * @function AppLaunchL
       
   119  * @since S60 3.2  
       
   120  * Launch the Application based on Uid,ViewId, MessageId & Message
       
   121  * @param aAppId   Application Uid
       
   122  * 		 aVId     ViewId
       
   123  * 		 aMsgId   MessageId
       
   124  * 		 aParams  Message
       
   125  */    
       
   126     void AppLaunchL(TInt32 &aAppId,TInt32 &aVId,TInt32 &aMsgId,
       
   127     									const TBuf<KMaxParamLength>& aParams);
       
   128     
       
   129 /** 
       
   130  * @function ResetTOC2ViewContainer
       
   131  * @since S60 3.2  
       
   132  * Sets a flag in the View for recreating the container 
       
   133  */    
       
   134     void ResetTOC2ViewContainer();
       
   135 /**
       
   136 * From MInstallationObserver
       
   137 * @function RuntimeUpdateIndex 
       
   138 * call back function once install/uninstall happens
       
   139 *
       
   140 * @since 5.0
       
   141 */
       
   142     void RuntimeUpdateIndex();
       
   143 
       
   144 #ifdef FF_HELP_TUTORIAL_MERGE
       
   145     /**
       
   146     *  Generates parameter list for AIW calls
       
   147     *  @since S60 3.2
       
   148     *  @param aContext The help content ready to Tutorial
       
   149     *  @return The Aiw Generic Param List
       
   150     */
       
   151     CAiwGenericParamList* NewParamListLC(const TCoeHelpContext& aContext);
       
   152 
       
   153     /**
       
   154     *  If tutorial exists,call play presentation command
       
   155     *  @since S60 3.2
       
   156     *  @param None
       
   157     *  @return None
       
   158     */
       
   159     void CallTutorialAiwProviderL();
       
   160 
       
   161     /**
       
   162     *  If tutorial exists,call play presentation command
       
   163     *  @since S60 3.2
       
   164     *  @param aTCoeHelpContext The Help Content stored
       
   165     *  @return None
       
   166     */
       
   167     void SetHelpContext(TCoeHelpContext aTCoeHelpContext);
       
   168 
       
   169     /**
       
   170     *  If the presentation requsted exist or not
       
   171     *  @since S60 3.2
       
   172     *  @param None
       
   173     *  @return A boolean value to indicate the presentation exist or not
       
   174     */
       
   175      TBool IsApplicationPresentInTutorialL();
       
   176 
       
   177 #endif // FF_HELP_TUTORIAL_MERGE
       
   178 	protected: 
       
   179 	// Functions from base calsses
       
   180 	/**
       
   181     * Handles changes in keyboard focus when an application switches to, 
       
   182     * or from, the foreground.
       
   183     * @param aForeground @c ETrue if the application is in the foreground,
       
   184     * otherwise @c EFalse.
       
   185     */
       
   186 	void HandleForegroundEventL(TBool aForeground);
       
   187 /** 
       
   188  * @function ProcessCommandParametersL
       
   189  * From CEikAppUi.
       
   190  * Take care of command parameter
       
   191  * @since 3.2
       
   192  * @param aTail should be contexts in TDesC8& form
       
   193  * @return whether or not processing was successful
       
   194  */
       
   195         TBool ProcessCommandParametersL(TApaCommand aCommand,
       
   196                                         TFileName& /* aDocumentName */,
       
   197                                         const TDesC8& aTail);
       
   198 
       
   199 /**
       
   200  * @function HandleMessageL 
       
   201  * From MCoeMessageObserver
       
   202  * Take care of messages from other app.
       
   203  * @since 3.2
       
   204  * @param aMessageParameters should be contexts in TDesC8&
       
   205  * @return always EMessageHandled.
       
   206  */
       
   207     MCoeMessageObserver::TMessageResponse HandleMessageL(
       
   208                                   TUint32 aClientHandleOfTargetWindowGroup,
       
   209                                   TUid aMessageUi,
       
   210                                   const TDesC8& aMessageParameters); 
       
   211   private:
       
   212 /**
       
   213  * @function ActivateDisplayTopicViewL   
       
   214  * Take care of Recreating the Container Class for Specific Views
       
   215  * @since 3.2
       
   216  * @param aMessageParameters should be contexts in TDesC8&
       
   217  * @return always EMessageHandled.
       
   218  */  
       
   219   	void ActivateDisplayTopicViewL();
       
   220   	
       
   221   	void InitDisplayTopicViewL(TUid aViewID);
       
   222 /**
       
   223  * @function HandleContextSensitiveLaunchL   
       
   224  * Take care of Context Sensitive Launch.
       
   225  * @since 3.2
       
   226  * @param aMessageParameters should be contexts in TDesC8&
       
   227  * @return always EMessageHandled.
       
   228  */  	
       
   229   	void HandleContextSensitiveLaunchL(const TDesC8& aContext );   
       
   230 #ifdef FF_HELP_TUTORIAL_MERGE
       
   231         /**
       
   232         *  Load Service Handler and attach the interest
       
   233         *  @since S60 3.2
       
   234         *  @param None
       
   235         *  @return None
       
   236         */
       
   237         void LoadTutorialServiceL();
       
   238 #endif
       
   239   private:
       
   240     
       
   241     CCSXHGenericView* iTOC1View;
       
   242     CCSXHGenericView* iKywdTOC1View;
       
   243     
       
   244     CCSXHLegacyTopicView* iLegacyTopicView;
       
   245     CCSXHLegacyTopicView* iLegacyContextTopicView;
       
   246     
       
   247     //This class will be used for both normal and context html topics    
       
   248     CCSXHHtmlTopicView* iHtmlTopicView;
       
   249 	
       
   250 	CCSXHGenericView* iKywdTOC2View;
       
   251 	CCSXHGenericView* iTOC2View;
       
   252 	CCSXHGenericView* iAppHelpsTOC1View;
       
   253 	CCSXHGenericView* iAppHelpsTOC2View;
       
   254 	
       
   255 	static CCSXHAppUi* iInstance;
       
   256 	CCSXHRuntimeAppWatcher* iRuntimeWatcher;
       
   257 	
       
   258 #ifdef FF_HELP_TUTORIAL_MERGE
       
   259 
       
   260         //AIW Service Handler
       
   261         //Owned
       
   262         CAiwServiceHandler* iServiceHandler;
       
   263 
       
   264         //Tutorial exist or not
       
   265         TBool iTutorialExists;
       
   266 
       
   267         //Help Content Text
       
   268         TCoeHelpContext iTCoeHelpContext;
       
   269 #endif
       
   270     };
       
   271 
       
   272 
       
   273 
       
   274 #endif /* INC_CSXHAPPUI_H_HEADER_INCLUDED_BC054CBF */