wlanutilities/wlansniffer/mainapplication/inc/wsfmainview.h
branchRCL_3
changeset 25 f28ada11abbf
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Class header for CWsfMainView
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_WSFMAINVIEW_H
       
    19 #define C_WSFMAINVIEW_H
       
    20 
       
    21 //  EXTERNAL INCLUDES
       
    22 #include <aknview.h>
       
    23 #include <aknlists.h>
       
    24 
       
    25 //  INTERNAL INCLUDES
       
    26 #include "wsfmainviewcontroller.h"
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class CWsfMainViewContainer;        
       
    30 class CWsfMainViewModel;
       
    31 
       
    32 
       
    33 
       
    34 //  CLASS DEFINITION
       
    35 /**
       
    36  * The view class of the Main view.
       
    37  * @since S60 5.0 
       
    38  */
       
    39 NONSHARABLE_CLASS( CWsfMainView ): public CAknView, 
       
    40                                    public MEikListBoxObserver
       
    41     {
       
    42     public:
       
    43 
       
    44         /**
       
    45          * Two-phased constructor
       
    46          * @since S60 5.0 
       
    47          * @param aIsEmbedded check application started 
       
    48          *        as an embedded application
       
    49          * @return instance of CWsfMainView class
       
    50          */
       
    51         static CWsfMainView* NewL( TBool aIsEmbedded );
       
    52 
       
    53         /**
       
    54          * Two-phased constructor. Leaves the object on CleanupStack
       
    55          * @since S60 5.0 
       
    56          * @param aIsEmbedded check application started 
       
    57          *        as an embedded application
       
    58          * @return instance of CWsfMainView class
       
    59          */
       
    60         static CWsfMainView* NewLC( TBool aIsEmbedded );
       
    61 
       
    62 
       
    63         /**
       
    64         * Destructor of CWsfMainView class
       
    65         * @since S60 5.0     
       
    66         */
       
    67         ~CWsfMainView(); 
       
    68     
       
    69     private:
       
    70 
       
    71         /**
       
    72         * 2nd phase constructor
       
    73         * @since S60 5.0 
       
    74         */
       
    75         void ConstructL( TBool aIsEmbedded );
       
    76 
       
    77         /**
       
    78         * Default C++ constructor 
       
    79         * @since S60 5.0 
       
    80         */
       
    81         CWsfMainView();
       
    82 
       
    83 
       
    84     public: //From CAknView
       
    85         
       
    86         /**
       
    87         * From CAknView returns Uid of View
       
    88         * @since S60 5.0 
       
    89         * @return TUid uid of the view
       
    90         */
       
    91         TUid Id() const;
       
    92 
       
    93         /**
       
    94         * From MEikMenuObserver delegate commands from the menu
       
    95         * @since S60 5.0 
       
    96         * @param aCommand a command emitted by the menu 
       
    97         */
       
    98         void HandleCommandL( TInt aCommand );
       
    99 
       
   100         /**
       
   101         * From CAknView reaction if size change
       
   102         * @since S60 5.0 
       
   103         */
       
   104         void HandleClientRectChange();
       
   105         
       
   106 
       
   107     private:    //From CAknView
       
   108 
       
   109         /**
       
   110         * From CAknView activate the view
       
   111         * @since S60 5.0 
       
   112         * @param aPrevViewId 
       
   113         * @param aCustomMessageId 
       
   114         * @param aCustomMessage 
       
   115         */
       
   116         void DoActivateL( const TVwsViewId& aPrevViewId, 
       
   117                           TUid aCustomMessageId,
       
   118                           const TDesC8& aCustomMessage );
       
   119 
       
   120         /**
       
   121         * From CAknView deactivate the view (free resources)
       
   122         * @since S60 5.0 
       
   123         */
       
   124         void DoDeactivate();
       
   125 
       
   126     private: // from MEikMenuObserver
       
   127         
       
   128         /** 
       
   129         * From MEikCommandObserver
       
   130         * Control the menu pane commands
       
   131         * @since S60 5.0 
       
   132         * @param aResourceId resource id of the menu pane to be modified
       
   133         * @param aMenuPane pointer to menu pane to be modified
       
   134         */
       
   135         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   136 
       
   137     protected: 
       
   138         /**
       
   139         * From MEikListBoxObserver.
       
   140         * Handles listbox events.
       
   141         * @since S60 5.0     
       
   142         * @param aListBox listbox pointer.
       
   143         * @param aEventType event type.
       
   144         */
       
   145         void HandleListBoxEventL( CEikListBox* aListBox, 
       
   146                                   TListBoxEvent aEventType );
       
   147 
       
   148     public:  //New functions
       
   149         
       
   150         /**
       
   151         * Return controller interface
       
   152         * @since S60 5.0     
       
   153         * @return controiller interface
       
   154         */
       
   155         MWsfMainViewControllerIf& Controller();
       
   156         
       
   157         /**
       
   158          * Sets the iSelectionKey True
       
   159          * @since S60 5.0 
       
   160          */
       
   161         void SelectionKeyPressed();
       
   162         
       
   163         /**
       
   164          * Checks if Browser is using the active WLAN connection
       
   165          */
       
   166         void UpdateBrowserUsageInfoL();
       
   167 
       
   168     private:  //New functions
       
   169         
       
   170         /**
       
   171         * Check if the Browser application is already running and 
       
   172         * using the selected connection.
       
   173         * @since S60 5.0 
       
   174         * @return IapId that browser is using
       
   175         */
       
   176         TInt BrowserIapIdL();
       
   177         
       
   178     private:
       
   179 
       
   180         /**
       
   181         * Main view's controller
       
   182         */
       
   183         TWsfMainViewController iController;
       
   184         
       
   185         /**
       
   186         * Main view's container
       
   187         * Own.
       
   188         */
       
   189         CWsfMainViewContainer* iContainer;
       
   190         
       
   191         /**
       
   192         * Main view's model
       
   193         * Own.
       
   194         */
       
   195         CWsfMainViewModel* iModel;
       
   196 
       
   197         /**
       
   198         * Indicates FSelectionKey is pressed or not.
       
   199         */
       
   200         TBool iSelectionKey;
       
   201         
       
   202         /**
       
   203          * IapId that browser is using
       
   204          */
       
   205         TInt iBrowserIapId;
       
   206         
       
   207     };
       
   208 
       
   209 
       
   210 #endif // C_WSFMAINVIEW_H