wlanutilities/wlansniffer/aiplugin/inc/wsfaiview.h
branchRCL_3
changeset 25 f28ada11abbf
parent 0 56b72877c1cb
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 CWsfAiView
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_WSFAIVIEW_H
       
    20 #define C_WSFAIVIEW_H
       
    21 
       
    22 //  EXTERNAL INCLUDES
       
    23 #include <e32def.h>
       
    24 
       
    25 //  INTERNAL INCLUDES
       
    26 #include "wsfaiuiobserver.h"
       
    27 #include "wsfaiplugincommon.h"
       
    28 
       
    29 
       
    30 //  CONSTANTS
       
    31 //  MACROS
       
    32 //  DATA TYPES
       
    33 //  FORWARD DECLARATIONS
       
    34 class CEikLabel;
       
    35 class MWsfAiPublishObserver;
       
    36 
       
    37 class CWsfAiView : public CBase,
       
    38                    public MWsfAiUiObserver
       
    39     {
       
    40     public:     // Constructors
       
    41         /**
       
    42         * Two-phased constructor
       
    43         * @since S60 5.0 
       
    44         * @param aPublishObserver - reference to the plugin's 
       
    45         *                           abstract interface
       
    46         * @return instance of CWsfAiView class
       
    47         */
       
    48         static CWsfAiView* NewL( MWsfAiPublishObserver& aPublishObserver );
       
    49         
       
    50         /**
       
    51         * Two-phased constructor. Leaves the object on CleanupStack
       
    52         * @since S60 5.0 
       
    53         * @param aPublishObserver - reference to the plugin's 
       
    54         *                           abstract interface
       
    55         * @return instance of CWsfAiView class
       
    56         */
       
    57         static CWsfAiView* NewLC( MWsfAiPublishObserver& aPublishObserver );
       
    58         
       
    59         /**
       
    60         * Destructor of CWsfAiView class
       
    61         * @since S60 5.0     
       
    62         */
       
    63         ~CWsfAiView();
       
    64         
       
    65     private:
       
    66         
       
    67         /**
       
    68         * Default C++ constructor 
       
    69         * @since S60 5.0 
       
    70         * @param aPublishObserver - reference to the plugin's 
       
    71         *                           abstract interface
       
    72         */
       
    73         CWsfAiView( MWsfAiPublishObserver& aPublishObserver );
       
    74         
       
    75         /**
       
    76         * 2nd phase constructor
       
    77         * @since S60 5.0 
       
    78         */
       
    79         void ConstructL();    
       
    80 
       
    81     public: // from MWsfAiUiObserver
       
    82         
       
    83         /**
       
    84         * Update the contents of control
       
    85         * Set the focus on aCurrentImte
       
    86         * @since S60 5.0 
       
    87         * @param aItemTextArray text of the current item
       
    88         * @param aCurrentItem index of the current item
       
    89         */ 
       
    90         void UpdateHotSpotsL( MDesCArray* aItemTextArray, 
       
    91                               TInt aCurrentItem );
       
    92 
       
    93         /**
       
    94         * Gives back the index of the selected item
       
    95         * @since S60 5.0 
       
    96         * @return the index of the selected item
       
    97         */ 
       
    98         TInt SelectedItem();
       
    99         
       
   100         /*
       
   101         * Check if the control is multiline capable control 
       
   102         * @since S60 5.0 
       
   103         * @return Etrue if control is multiline capable control
       
   104         */
       
   105         TBool MultilineControl();
       
   106 
       
   107         /*
       
   108         * Display engine off text in UI
       
   109         * @since S60 5.0 
       
   110         */
       
   111         void DisplayEngineOffL();
       
   112         
       
   113         /*
       
   114         * Set the refressing UI note visible
       
   115         * @since S60 5.0 
       
   116         */
       
   117         void ForceRefreshingL();
       
   118         
       
   119         /*
       
   120         * Set the refressing UI note visible
       
   121         * @since S60 5.0 
       
   122         */
       
   123         void StartConnectingAnimationL();
       
   124         
       
   125         /**
       
   126         * Update the contents of control
       
   127         * @since S60 5.0 
       
   128         * @param aItemTextArray text of the current item
       
   129         */ 
       
   130         void UpdateViewL( MDesCArray* aItemTextArray );
       
   131         
       
   132     private:
       
   133         
       
   134         /*
       
   135         * Parses the string into ui component data
       
   136         * @since S60 5.0 
       
   137         * @param aString - a string into ui
       
   138         * @return - TBool - ETrue if deferred update is executed
       
   139         */
       
   140          TBool ParseStringL( const TDesC& aString );
       
   141              
       
   142         /*
       
   143         * Complete the change for new data - this is 
       
   144         * a callback for deferred update
       
   145         * @since S60 5.0 
       
   146         * @param aPtr pointer to this
       
   147         * @return ETrue if update is completed
       
   148         */
       
   149         static TInt DoCompleteUpdateL( TAny* aPtr );
       
   150 
       
   151         /* 
       
   152         * Commit the update change
       
   153         * @since S60 5.0 
       
   154         */
       
   155         void DoCompleteUpdateL();
       
   156 
       
   157         /** 
       
   158         * Activates refresh timer  
       
   159         * @since S60 5.0 
       
   160         */
       
   161         void ActivateRefreshTimer();
       
   162         
       
   163         /**
       
   164         * 'MakePublishIconsL' and 'MakeTransparentPublishIconsL'
       
   165         * create arrays consisting of icon ids for the icons to publish
       
   166         * @since S60 5.0 
       
   167         */
       
   168         void MakePublishIconsL();
       
   169         
       
   170         /** 
       
   171         * 'MakePublishIconsL' and 'MakeTransparentPublishIconsL'
       
   172         * create arrays consisting of icon ids for the icons to publish
       
   173         * @since S60 5.0 
       
   174         */
       
   175         void MakeTransparentPublishIconsL();
       
   176 
       
   177     private:    // Data
       
   178 
       
   179         /**
       
   180         * Coe env for loading string from resource
       
   181         * Not Own.
       
   182         */
       
   183         CCoeEnv* iEnv;
       
   184 
       
   185         /**
       
   186         * Publish images in array
       
   187         * Own.
       
   188         */
       
   189         CArrayFix< TInt >* iPublishIconArray;
       
   190 
       
   191         /**
       
   192          * Timer for update
       
   193          * Own.
       
   194          */
       
   195         CPeriodic*     iDeferredUpdater;
       
   196         
       
   197         /**
       
   198         * Times callback
       
   199         * Own. 
       
   200         */
       
   201         TCallBack*     iDeferredUpdateCallBack;
       
   202         
       
   203         /**
       
   204         * Title text label
       
   205         * Own.
       
   206         */
       
   207         CEikLabel* iTextLabel;
       
   208         
       
   209         /**
       
   210         * The label text
       
   211         */ 
       
   212         TName        iCurrentText;
       
   213         
       
   214         /**
       
   215         * ID constants for Secure Icon 
       
   216         */
       
   217         TWsfPluginIcons iUpdateSecureIconDeferred;
       
   218 
       
   219         /**
       
   220         * ID constants for Signal Strength Icon 
       
   221         */
       
   222         TWsfPluginIcons iUpdateSignalStrengthIconDeferred;
       
   223 
       
   224         /**
       
   225         * ID constants for Status Icon 
       
   226         */
       
   227         TWsfPluginIcons iUpdateStatusIconDeferred;
       
   228         
       
   229         /**
       
   230         * ID constants for Status Icon saved to remember after refreshing
       
   231         */
       
   232         TWsfPluginIcons iSavedUpdateStatusIconDeferred;
       
   233         
       
   234         /**
       
   235         * Pointer to Publish Observer interface
       
   236         * Not Own. 
       
   237         */
       
   238         MWsfAiPublishObserver* iPublishObserver;
       
   239         
       
   240         /**
       
   241         * Constants for 'WLAN scanning off' text
       
   242         * Own.
       
   243         */
       
   244         HBufC* iStatusScanningOff;
       
   245         
       
   246         /**
       
   247         * Constants for 'Refreshing' text
       
   248         * Own.
       
   249         */
       
   250         HBufC* iStatusRefreshing;
       
   251 
       
   252         /**
       
   253         * Constants for 'Connecting' text
       
   254         * Own.
       
   255         */
       
   256         HBufC* iStatusConnecting;
       
   257     };
       
   258 
       
   259 
       
   260 
       
   261 #endif      //  C_WSFAIVIEW_H
       
   262 
       
   263 // End of file