browserui/browser/BrowserAppInc/BrowserDisplay.h
branchRCL_3
changeset 65 8e6fa1719340
parent 0 84ad3b177aa3
equal deleted inserted replaced
64:6385c4c93049 65:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *      Access to display components
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef BROWSER_DISPLAY_H
       
    22 #define BROWSER_DISPLAY_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include <bldvariant.hrh>
       
    26 #include <aknenv.h>
       
    27 #include "Display.h"
       
    28 #include "WlanObserver.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 class MApiProvider;
       
    33 class CBrowserProgressIndicator;
       
    34 class CAknNavigationDecorator;
       
    35 class CAknIndicatorContainer;
       
    36 class CBrowserWindow;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 class CBrowserDisplay : public CBase, public MDisplay
       
    41 	{
       
    42 	public :	// constructor, destructor
       
    43 
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         */
       
    47  		static CBrowserDisplay* NewL( MApiProvider& aApiProvider,
       
    48  		    CBrowserWindow& aWindow );
       
    49 
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53  		virtual ~CBrowserDisplay();
       
    54 
       
    55 	public :	// functions from MDisplay
       
    56 
       
    57         /**
       
    58         * Return Status Pane. Can be NULL.
       
    59         * @return Status Pane.
       
    60         */
       
    61         virtual CEikStatusPane* StatusPane() const;
       
    62 
       
    63         /**
       
    64         * Get Navi Pane; leave on error.
       
    65         * @return Navi Pane. Never NULL.
       
    66         */
       
    67         virtual CAknNavigationControlContainer* NaviPaneL() const;
       
    68 
       
    69         /**
       
    70         * Set title pane text.
       
    71         * @param aTitle Title text to be displayed.
       
    72         */
       
    73         virtual void SetTitleL( const TDesC& aTitle );
       
    74 
       
    75         /**
       
    76         * Set title pane text from resource.
       
    77         * @param aTitle Resource id of title text to be displayed.
       
    78         */
       
    79         virtual void SetTitleL( TInt aResourceId );
       
    80 
       
    81 		/**
       
    82 		* Starts animation.
       
    83 		* @param aBearerType Determines what is to be animated.
       
    84 		*/
       
    85 		virtual void StartProgressAnimationL(/* TApBearerType aBearerType*/ );
       
    86 
       
    87 		/**
       
    88 		* Stops animation.
       
    89 		*/
       
    90 		virtual void StopProgressAnimationL();
       
    91 
       
    92 		/**
       
    93 		* Shows or hides secure indicator depending on aState.
       
    94 		* @param aState EAknIndicatorStateOff/EAknIndicatorStateOn.
       
    95 		*/
       
    96 		virtual void UpdateSecureIndicatorL( const TInt aState );
       
    97 
       
    98         /**
       
    99         * Adds transaction id to array.
       
   100         * @param aId Transaction id
       
   101         */
       
   102         virtual void AddTransActIdL( TUint16 aId ) const;
       
   103 
       
   104         /**
       
   105         * Saves maximum and received data with a transction id. 
       
   106         * @since Series60 1.2
       
   107         * @param aId Id of the transaction
       
   108         * @param aRecvdData Amount of data we have received with current transaction Id
       
   109         * @param aMaxData Max size of the transaction
       
   110         */
       
   111         virtual void AddProgressDataL( TUint16 aId, TUint32 aRecvdData, TUint32 aMaxData ) const;
       
   112 
       
   113         /**
       
   114         * Marks particular transaction id to complete status
       
   115         * @since Series60 2.0
       
   116         * @param aId Id of the transaction
       
   117         */
       
   118         virtual void TransActIdComplete( TUint16 aId ) const;
       
   119 
       
   120         /**
       
   121         * Sets Secure indicator on/off, UpdateFullScreenIndicatorsL() needs to be called after indicators are set
       
   122         * @param aState indicator state on/off
       
   123         */
       
   124         void SetFullScreenSecureIndicatorL(const TBool aState);
       
   125 
       
   126         /**
       
   127         * Sets gprs indicator for Full Screen on
       
   128         */
       
   129         virtual void SetGPRSIndicatorOnL();
       
   130 
       
   131         /**
       
   132         * Starts the Wlan Indicator observer
       
   133         */
       
   134         virtual void StartWlanObserverL();
       
   135         
       
   136         /**
       
   137         * Updates the Wlan Indicator to current value
       
   138         */
       
   139         virtual void UpdateWlanIndicator( const TInt aWlanValue );
       
   140 
       
   141         /**
       
   142         * Initialises Full Screen pane indicators
       
   143         */
       
   144         virtual void FSPaneOnL( );
       
   145 
       
   146         /**
       
   147         * Updates Full Screen progress indicator
       
   148         */
       
   149         virtual void UpdateFSProgressIndicator(const TInt aMaxData,  const TInt aReceivedData);
       
   150 
       
   151         /**
       
   152         * Starts Full Screen Wait indicator
       
   153         */
       
   154         virtual void StartFSWaitIndicator();
       
   155 
       
   156         /**
       
   157         * Updates 'downloaded data amount' message on Full Screen pane
       
   158         */
       
   159         virtual void UpdateFSProgressDataL(const TDesC16& aReceivedDataText);
       
   160 
       
   161         /**
       
   162         * Updates initial download indicator on Full Screen pane
       
   163         */
       
   164         virtual void UpdateFSDownloadInitialIndicator(const TBool aState);
       
   165 
       
   166         /**
       
   167         * Initializes Full Screen Indicators
       
   168         */
       
   169         virtual void InitIndicatorsL();
       
   170         
       
   171         /**
       
   172         * Clears the Message Info indicator in the navipane
       
   173         */
       
   174         virtual void ClearMessageInfo();
       
   175 
       
   176         /**
       
   177         * Sets formerly saved page title. SetTitleL's functionality moved here, because page title restoration is
       
   178         * necessary in Full Screen mode
       
   179         */
       
   180         virtual void RestoreTitleL();
       
   181 
       
   182         /**
       
   183         * Notify that new data has arrived to the loaders.
       
   184         * @since Series60_version 2.5
       
   185         * @return none
       
   186         */
       
   187         virtual void NotifyProgress();
       
   188 
       
   189         /**
       
   190 		* Updates the Multiple Windows Indicator
       
   191 		* @param aState Indicator On or Off
       
   192 		* @param aWinCount The number of windows open
       
   193 		* @since Series60 3.0
       
   194 		*/
       
   195         virtual void UpdateMultipleWindowsIndicatorL( 
       
   196                                 const TBool aState, const TInt aNumWindows );
       
   197 
       
   198 	public:
       
   199 
       
   200 		inline MApiProvider& ApiProvider() { return iApiProvider; }
       
   201 
       
   202     private: //for internal use of full screen indicators
       
   203 
       
   204         /**
       
   205         * Selects Editor's IndicatorContainer to use.
       
   206         */
       
   207         CAknIndicatorContainer* SelectIndicContainerEditing();
       
   208 
       
   209         /**
       
   210         * Selects own IndicatorContainer to use. Editor's or our own.
       
   211         */
       
   212         CAknIndicatorContainer* SelectIndicContainerOwn();
       
   213 
       
   214 	protected :	// construction
       
   215 
       
   216 		/**
       
   217 		* Default C++ constructor.
       
   218 		* @param aApiProvider Browser's API provider
       
   219 		*/
       
   220 		CBrowserDisplay( MApiProvider& aApiProvider, CBrowserWindow& aWindow );
       
   221 
       
   222         /**
       
   223         * Symbian OS constructor that can leave.
       
   224         */
       
   225  		void ConstructL();
       
   226 
       
   227 	private :	// data members
       
   228 
       
   229 		CBrowserProgressIndicator* iProgressIndicator; ///< animation for CSD,HSCSD,GPRS connections
       
   230 
       
   231 		MApiProvider& iApiProvider;		///< reference to API provider
       
   232 		CBrowserWindow* iWindow;        ///< owner window, object not owned
       
   233 		CWlanObserver* iWlanObserver;   ///< Wlan status observer
       
   234 
       
   235         CAknNavigationDecorator* iEditorIndicatorContainer; /// Full Screen Editor indicator container
       
   236 
       
   237         HBufC* iTitle; /// Page title, stored because it needs to be restored after downloading in Full Screen mode.
       
   238 	};
       
   239 
       
   240 #endif	// WMLBROWSER_DISPLAY_H
       
   241 
       
   242 // End of file