wlanutilities/wlansniffer/mainapplication/inc/wsfdetailscontainer.h
branchRCL_3
changeset 24 63be7eb3fc78
parent 23 b852595f5cbe
child 25 f28ada11abbf
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
     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 CWsfDetailsContainer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_WSFDETAILSCONTAINER_H
       
    19 #define C_WSFDETAILSCONTAINER_H
       
    20 
       
    21 //  EXTERNAL INCLUDES
       
    22 #include <aknlists.h>
       
    23 #include <AknNaviDecoratorObserver.h>
       
    24 
       
    25 //  INTERNAL INCLUDES
       
    26 #include "wsfdetailscontainerif.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CAknNavigationDecorator;
       
    30 class CAknNavigationControlContainer;
       
    31 class MWsfDetailsViewControllerPartner;
       
    32 class CWsfDetailsViewModel;
       
    33 class CWsfActiveTimeUpdater;
       
    34 class MWsfActiveTimerHandler;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38 * CWsfDetailsContainer  container control class.
       
    39 * 
       
    40 * @since S60 5.0
       
    41 * @lib wlansniffer.exe
       
    42 */
       
    43 class CWsfDetailsContainer : public CCoeControl, 
       
    44                              public MWsfDetailsContainerIf,
       
    45                              public MAknNaviDecoratorObserver
       
    46 
       
    47     {
       
    48     public: // Constructors and destructor
       
    49     
       
    50         /**
       
    51          * Two-phased constructor
       
    52          * @since S60 5.0 
       
    53          * @param aRect gives the correct TRect for construction.
       
    54          * @param aController reference for the MWsfActiveTimerHandler
       
    55          * @return instance of CWsfDetailsContainer class  
       
    56          */
       
    57         static CWsfDetailsContainer* NewL( 
       
    58                                       const TRect& aRect,
       
    59                                       MWsfActiveTimerHandler& aController );
       
    60         
       
    61         /**
       
    62          * Two-phased constructor. Leaves the object on CleanupStack
       
    63          * @since S60 5.0 
       
    64          * @param aRect gives the correct TRect for construction.
       
    65          * @param aController reference for the MWsfActiveTimerHandler
       
    66          * @return instance of CWsfDetailsContainer class  
       
    67          */
       
    68         static CWsfDetailsContainer* NewLC( 
       
    69                                       const TRect& aRect,
       
    70                                       MWsfActiveTimerHandler& aController );
       
    71         
       
    72         /**
       
    73          * Destructor of CWsfDetailsContainer class
       
    74          * @since S60 5.0     
       
    75          */
       
    76         ~CWsfDetailsContainer();
       
    77 
       
    78     private:  // Constructors and destructor
       
    79 
       
    80         /**
       
    81          * Default C++ constructor 
       
    82          * @since S60 5.0 
       
    83          */
       
    84         CWsfDetailsContainer();
       
    85 
       
    86         /**
       
    87          * 2nd phase constructor
       
    88          * @since S60 5.0 
       
    89          * @param aRect gives the correct TRect for construction.
       
    90          * @param aController reference for the MWsfActiveTimerHandler
       
    91          */
       
    92         void ConstructL( const TRect& aRect,
       
    93                          MWsfActiveTimerHandler& aController );
       
    94 
       
    95     public: // New functions
       
    96 
       
    97         /**
       
    98         * Set partner interface to container
       
    99         * @param aPartner - partner interface
       
   100         */
       
   101         void SetPartner( MWsfDetailsViewControllerPartner& aPartner );
       
   102         
       
   103         /**
       
   104         * Set Model to container
       
   105         * @param aModel
       
   106         */
       
   107         void SetDetailsModel( CWsfDetailsViewModel* aModel );
       
   108 
       
   109     public: // from CCoeControl
       
   110     
       
   111         /**
       
   112         * Handles key events.
       
   113         * @since S60 5.0
       
   114         * @param aKeyEvent The key event
       
   115         * @param aType The type of key event: EEventKey, EEventKeyUp or 
       
   116         *        EEventKeyDown
       
   117         * @return Indicates whether or not the key event was used 
       
   118         *         by this control
       
   119         */
       
   120         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
   121                                      TEventCode aType );
       
   122 
       
   123         /**
       
   124         * Gets an indexed component of a compound control
       
   125         * @since S60 5.0
       
   126         * @param aIndex The index of the control
       
   127         * @return The component control with an index of aIndex
       
   128         */
       
   129         CCoeControl* ComponentControl( TInt aIndex ) const;
       
   130         
       
   131         /**
       
   132         * Handles a change to the control's resources.
       
   133         * @since S60 5.0
       
   134         * @param aType A message UID value
       
   135         */        
       
   136         void HandleResourceChange( TInt aType );        
       
   137 
       
   138         
       
   139     public:  // From MWsfDetailsContainerIf
       
   140     
       
   141         /**
       
   142         * Refresh the content of Navi pane and 
       
   143         * Push it to stack.
       
   144         * @since S60 5.0
       
   145         * @param aPaneText Text to be show on pane
       
   146         */
       
   147         void UpdateNaviPaneL( const TDesC& aPaneText );
       
   148 
       
   149         /**
       
   150         * Refresh the content list box
       
   151         * @since S60 5.0
       
   152         * @param aItemTextArray Items to be show on listbox
       
   153         */
       
   154         void UpdateListBoxL( MDesCArray* aItemTextArray );
       
   155     
       
   156 
       
   157     private: // Methods from CoeControl
       
   158     
       
   159         /**
       
   160         * Responds to changes to the size and position of 
       
   161         * the contents of this control.
       
   162         * @since S60 5.0
       
   163         */
       
   164         void SizeChanged();
       
   165 
       
   166         /**
       
   167         * Gets the number of controls contained in a compound control.
       
   168         * @since S60 5.0
       
   169         * @return The number of component controls contained by this control
       
   170         */
       
   171         TInt CountComponentControls() const;
       
   172         
       
   173         /**
       
   174         * Responds to a change in focus
       
   175         * @since S60 5.0
       
   176         * @param aDrawNow Contains the value that was passed to it 
       
   177         *                 by SetFocus(). 
       
   178         */        
       
   179         void FocusChanged( TDrawNow aDrawNow );
       
   180     
       
   181         
       
   182     private: // From MAknNaviDecoratorObserver
       
   183     
       
   184         /**
       
   185          * Handles events in the navipane
       
   186          * @since S60 5.0
       
   187          * @param aEventID The id of the event
       
   188          */
       
   189         void HandleNaviDecoratorEventL( TInt aEventID );        
       
   190 
       
   191         
       
   192     private: // New methods
       
   193     
       
   194         /**
       
   195         * Gets the title panes.
       
   196         * @since S60 5.0
       
   197         */
       
   198         void GetPanesL();
       
   199 
       
   200         /**
       
   201         * Pop the NaviPane from stack.
       
   202         * @since S60 5.0
       
   203         */
       
   204         void PopNaviPane();
       
   205 
       
   206         
       
   207     private: // data       
       
   208     
       
   209         /**
       
   210         * Listbox contains details a connection
       
   211         * Own.
       
   212         */
       
   213         CAknSingleHeadingStyleListBox* iListBox;
       
   214         
       
   215         /**
       
   216         * Partner reference
       
   217         * Ref.
       
   218         */
       
   219         MWsfDetailsViewControllerPartner* iPartner;
       
   220 
       
   221         /**
       
   222         * For NaviPane.
       
   223         * Own.
       
   224         */
       
   225         CAknNavigationDecorator* iNaviDecorator;
       
   226 
       
   227         /**
       
   228         * For NaviPane.
       
   229         * Ref.
       
   230         */
       
   231         CAknNavigationControlContainer* iNaviPane;
       
   232         
       
   233         /**
       
   234         * For CWsfDetailsViewModel.
       
   235         * Ref.
       
   236         */
       
   237         CWsfDetailsViewModel* iDetailsModel;
       
   238         
       
   239         /**
       
   240         * For CWsfActiveTimeUpdater.
       
   241         * Own.
       
   242         */
       
   243         CWsfActiveTimeUpdater* iActiveUpdater;
       
   244     };
       
   245 
       
   246 #endif // C_WSFDETAILSCONTAINER_H
       
   247 
       
   248 // End of File
       
   249