wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontroller.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 TWsfMainViewController
       
    15 *
       
    16 */
       
    17           
       
    18 #ifndef T_WSFMAINVIEWCONTROLLER_H
       
    19 #define T_WSFMAINVIEWCONTROLLER_H
       
    20 
       
    21 //  EXTERNAL INCLUDES
       
    22 #include <e32def.h>
       
    23 
       
    24 
       
    25 //  INTERNAL INCLUDES
       
    26 #include "wsfsession.h"
       
    27 #include "wsfwlaninfo.h"
       
    28 #include "wsfmainviewcontrollerif.h"
       
    29 #include "wsfmainviewpartner.h"
       
    30 #include "wsfmainviewcontrollerpartner.h"
       
    31 
       
    32 
       
    33 //  FORWARD DECLARATIONS
       
    34 class CWsfMainViewModel;
       
    35 class CWsfMainViewContainer;
       
    36 class CWsfWlanInfoArray;
       
    37 class MWsfMainViewPartner;
       
    38 
       
    39 //  CLASS DEFINITION
       
    40 /**
       
    41  * TWsfMainViewController acts as a view level controller
       
    42  * @since S60 5.0
       
    43  */
       
    44 class TWsfMainViewController : public MWsfMainViewControllerIf, 
       
    45                                public MWsfMainViewControllerPartner
       
    46     {
       
    47 
       
    48     public:     // New methods
       
    49 
       
    50 
       
    51         /**
       
    52         * Set view level model
       
    53         * @since S60 5.0
       
    54         * @param aModel - model pointer
       
    55         */
       
    56         void SetModel( CWsfMainViewModel* aModel );
       
    57 
       
    58         /**
       
    59         * Set view level view
       
    60         * @param aContainer - container pointer
       
    61         */
       
    62         void SetContainer( CWsfMainViewContainer* aContainer );
       
    63 
       
    64         /**
       
    65         * Updates available WLAN list to the display
       
    66         * @param aWlanList - Current Wlan Array
       
    67         */
       
    68         void UpdateHotSpotsL( CWsfWlanInfoArray* aWlanList );
       
    69 
       
    70         /**
       
    71          * Updates the local copy of the selected wlaninfo
       
    72          * @since S60 5.0
       
    73          */
       
    74         void UpdateSelectedItemL();
       
    75 
       
    76         
       
    77     public: //From MWsfMainViewControllerIf
       
    78 
       
    79         /**
       
    80          * Updates WLAN list with values passed as parameter
       
    81          * @param aWlanArray list of WLAN
       
    82          * @since S60 5.0
       
    83          */
       
    84         void UpdateWlanListL( CWsfWlanInfoArray* aWlanArray );
       
    85 
       
    86         /**
       
    87          * Updates WLAN list with values passed as parameter
       
    88          * when the main view is on the background
       
    89          * @param aWlanArray list of WLAN
       
    90          * @since S60 5.2
       
    91          */
       
    92         void UpdateWlanListInBackgroundL ( CWsfWlanInfoArray* aWlanArray );
       
    93 
       
    94         /**
       
    95          * Request to refresh the mainview
       
    96          * @since S60 5.0
       
    97          */
       
    98         void RefreshL();
       
    99         
       
   100         /**
       
   101          * Request to refresh the mainview
       
   102          * @return Details of selected WLAN
       
   103          * @since S60 5.0
       
   104          */
       
   105         TWsfWlanInfo* SelectedItem();
       
   106 
       
   107         /**
       
   108          * Sets partner object
       
   109          * @aPartner The partner
       
   110          * @since S60 5.0
       
   111          */
       
   112         void SetPartner( MWsfMainViewPartner& aPartner );
       
   113 
       
   114 
       
   115     public: //MWsfMainViewControllerPartner
       
   116 
       
   117         /**
       
   118          * Handles up key presses
       
   119          * @since S60 5.0
       
   120          */
       
   121         void HandleUpKeyPressedL();
       
   122 
       
   123         /**
       
   124          * Handles down key presses
       
   125          * @since S60 5.0
       
   126          */
       
   127         void HandleDownKeyPressedL();
       
   128 
       
   129         /**
       
   130          * Handles selection key presses
       
   131          * @since S60 5.0
       
   132          */
       
   133         void HandleSelectionKeyPressedL();
       
   134 
       
   135     private:   
       
   136         
       
   137         /**
       
   138         * Updated navipane
       
   139         */
       
   140         void UpdateNaviPaneL();
       
   141         
       
   142 
       
   143     private:    // Data
       
   144     
       
   145         //Ref: View level model
       
   146         CWsfMainViewModel* iModel;
       
   147 
       
   148         //Ref: View level view
       
   149         CWsfMainViewContainer* iContainer;
       
   150 
       
   151         //Ref: Partner
       
   152         MWsfMainViewPartner* iPartner;
       
   153         
       
   154         // Temporary storage for the current wlaninfo
       
   155         TWsfWlanInfo iSelectedItem;
       
   156         
       
   157         // Indicates whether a real wlaninfo is selected
       
   158         TBool iValidItem;
       
   159     };
       
   160 
       
   161 //  INLINE FUNCTIONS
       
   162 
       
   163 #endif      // T_WSFMAINVIEWCONTROLLER_H
       
   164 
       
   165 // End of file
       
   166