browserui/operatormenu/inc/OperatorMenuAppUi.h
branchRCL_3
changeset 65 8e6fa1719340
equal deleted inserted replaced
64:6385c4c93049 65:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2003 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 the License "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:  Header file for COperatorMenuAppUi
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef OPERATORMENUAPPUI_H
       
    20 #define OPERATORMENUAPPUI_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <eikapp.h>
       
    24 #include <eikdoc.h>
       
    25 #include <eikproc.h>
       
    26 #include <e32std.h>
       
    27 #include <coeccntx.h>
       
    28 #include <aknappui.h>
       
    29 #include <browserlauncher.h>
       
    30 #include <downloadedcontenthandler.h>
       
    31 #include <centralrepository.h>
       
    32 #include <httpcachemanagerinternalcrkeys.h>    
       
    33 #include "OperatorMenuPrivateCRKeys.h"
       
    34 #include <favouriteslimits.h> //KFavouritesMaxUrl
       
    35 #include <browseroverriddensettings.h>
       
    36 
       
    37 // CONSTANTS
       
    38 const TUid KUidBrowserApplication = { 0x10008d39 };				//Browser UID
       
    39 const TUid KUidCacheManager = { 0x101f8557 };			   //Cache manager UID
       
    40 _LIT( KBrowserPath, "Z:\\system\\apps\\Browser\\Browser.app" );	//Browser path
       
    41 
       
    42 // FORWARD DECLARATIONS
       
    43 class COperatorMenuContainer; 
       
    44 class COperatorMenuAppUi;
       
    45 
       
    46 // CLASS DECLARATION
       
    47 
       
    48 /**
       
    49 * Class responsible for delayed browser lunching.
       
    50 * 
       
    51 * @since Series 60 2.0
       
    52 */
       
    53 class COperatorDelayedStarter : public CActive
       
    54 {
       
    55 public:
       
    56 	COperatorDelayedStarter(COperatorMenuAppUi* aOperatorMenuAppUi);
       
    57 	~COperatorDelayedStarter();
       
    58 	//Start() puts the class to the active scheduler
       
    59 	void Start();
       
    60 	// From CActive
       
    61 	void RunL();
       
    62 	void DoCancel();
       
    63 private:
       
    64 	COperatorMenuAppUi* iOperatorMenuAppUi;
       
    65 };
       
    66 /**
       
    67 * Application UI class.
       
    68 * Provides support for the EIKON control architecture
       
    69 * 
       
    70 * @since Series 60 2.0
       
    71 */
       
    72 class COperatorMenuAppUi :	public	CAknAppUi, 
       
    73 							public	MDownloadedContentHandler, 
       
    74 									MApaEmbeddedDocObserver
       
    75     {
       
    76     public: // Constructors and destructor
       
    77 
       
    78 		/**
       
    79 		* Default Constructor
       
    80 		*/
       
    81 		COperatorMenuAppUi();
       
    82 			
       
    83         /**
       
    84         * Destructor.
       
    85         */      
       
    86         ~COperatorMenuAppUi();
       
    87         
       
    88     public: // New functions
       
    89 
       
    90 	public: // From MDownloadedContentHandler
       
    91         /**
       
    92         * Handle downloaded content that has been saved to a file, 
       
    93         * and return ETrue if it was handled successfully.
       
    94         * @param aFileName File name with path.
       
    95         * @param aParamList Generic parameter list.
       
    96         * @param aContinue Output parameter: It must be ETrue if the caller wants 
       
    97         *                  Browser not to terminate after the content is handled.
       
    98         * @return ETrue if the implementer has processed the content. If it is 
       
    99         *                  EFalse, BrowserLauncher opens that content in an 
       
   100         *                  appropriate viewer application.
       
   101         */
       
   102         TBool HandleContentL( const TDesC& aFileName, const CAiwGenericParamList& aParamList, TBool& aContinue );
       
   103 
       
   104         /**
       
   105         * Reserved for future use.
       
   106         */
       
   107         TAny* DownloadedContentHandlerReserved1( TAny* aAnyParam );
       
   108 
       
   109     private:
       
   110 		/**
       
   111 		* EPOC Default Constructor
       
   112 		*/
       
   113         void ConstructL();
       
   114 
       
   115 		/**
       
   116         * From CEikAppUi, takes care of command handling.
       
   117         * @param aCommand command to be handled
       
   118         */
       
   119         void HandleCommandL( TInt aCommand );
       
   120 
       
   121         /**
       
   122         * From CEikAppUi, handles key events.
       
   123         * @param aKeyEvent Event to handled.
       
   124         * @param aType Type of the key event. 
       
   125         * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
       
   126         */
       
   127         virtual TKeyResponse HandleKeyEventL( 
       
   128             const TKeyEvent& aKeyEvent,TEventCode aType );
       
   129 
       
   130     private: //From MApaEmbeddedDocObserver
       
   131 		/**
       
   132 		* From MApaEmbeddedDocObserver, observes when the 
       
   133 		* embedded browser exits
       
   134 		* @param aMode The browser exit mode (ignored in OperatorMenu)
       
   135 		*/
       
   136 		void NotifyExit( TExitMode aMode );
       
   137 
       
   138 	private: //New functions
       
   139 		/**
       
   140 		* Launches browser with operator specific url as start page
       
   141 		* @since Series 60 2.0
       
   142 		*/
       
   143 		void LaunchBrowserEmbeddedWithOperatorUrlL();
       
   144 
       
   145 		/**
       
   146 		* Launches browser in embedded mode with the default 
       
   147 		* Access Point's homepage as start page
       
   148 		* @since Series 60 2.0
       
   149 		*/
       
   150 		void LaunchBrowserEmbeddedWithDefaultAPHomepageL();
       
   151 	public:	
       
   152 		/**
       
   153 		* Launches the browser according to the available parameters 
       
   154 		* ( operator specific url )
       
   155 		* @since Series 60 2.0
       
   156 		*/
       
   157 		void LaunchBrowserL();
       
   158 
       
   159     public: // Functions from MEikStatusPaneObserver
       
   160 
       
   161         /**
       
   162         * Handles status pane size change.
       
   163         */
       
   164         void HandleStatusPaneSizeChange();
       
   165 
       
   166 	private: //Data
       
   167 
       
   168 		//OperatorMenu App view container (not shown in final App)
       
   169         COperatorMenuContainer* iAppContainer;
       
   170         
       
   171         // Access central repository of HttpCacheManager
       
   172         CRepository* iRepository;
       
   173         
       
   174         // Access central repository of OperatorMenu
       
   175         CRepository* iRepositoryOp;
       
   176 
       
   177 		//Buffer where the url is read
       
   178 		TBuf<KFavouritesMaxUrl>	iUrl;
       
   179 
       
   180         //settings to override
       
   181         TBrowserOverriddenSettings *iOverriddenSettings;
       
   182 
       
   183 		TBool iLaunched;
       
   184 		COperatorDelayedStarter* iDelayedStarter;
       
   185     };
       
   186 
       
   187 #endif
       
   188 
       
   189 // End of File