connectionutilities/ConnectionDialogs/inc/ActiveIAPListing.h
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Declaration of Active Iap Listing class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __ACTIVEIAPLISTING_H__
       
    21 #define __ACTIVEIAPLISTING_H__
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <agentdialog.h>
       
    27 
       
    28 
       
    29 // FORWARD DECLARATION
       
    30 class CCommsDatabase;
       
    31 class CConnectionInfoArray;
       
    32 class CAknWaitDialog;
       
    33 #ifndef __WINS__
       
    34 class CWlanMgmtClient;
       
    35 #endif
       
    36 
       
    37 
       
    38 enum TLanType
       
    39     {
       
    40     ENotDefined,
       
    41     ELan,
       
    42     EEasyWLan,
       
    43     EWLan
       
    44     };
       
    45 
       
    46 
       
    47 
       
    48 // CLASS DECLARATION
       
    49 
       
    50 
       
    51 /**
       
    52  * CActiveIAPListing class,
       
    53  */     
       
    54 NONSHARABLE_CLASS( CActiveIAPListing ) : public CActive
       
    55     {
       
    56     public:
       
    57         /**
       
    58         * StartSearchIAPsL setactive and starts active object
       
    59         */    
       
    60         void BaseStartSearchIAPsL( TInt aResourceId );
       
    61 
       
    62         /**
       
    63         * Destructor
       
    64         */    
       
    65         virtual ~CActiveIAPListing();
       
    66     
       
    67         /**
       
    68         * Timer callback of iPeridoc.
       
    69         */
       
    70         static TInt Tick( TAny* aObject );    
       
    71     
       
    72         /**
       
    73         * Cancels the active object
       
    74         */
       
    75         void Cancel();
       
    76         
       
    77         /**
       
    78         * Gives back, refresh interval of scan for network
       
    79         */
       
    80         TInt GetRefreshInterval( const TUid aRepositoryUid, TUint32 aKey );
       
    81 
       
    82               
       
    83     protected:
       
    84         /**
       
    85         * ConstructL 
       
    86         */
       
    87         void BaseConstructL();
       
    88     
       
    89         /**
       
    90         * Constructor
       
    91         * @param  aPlugin a pointer to notifier plugin    
       
    92         * @param aIAPId iap id
       
    93         * @param aPrefs preferences pointer        
       
    94         */    
       
    95         CActiveIAPListing( const TConnectionPrefs& aPrefs );
       
    96     
       
    97         /**
       
    98         * Starts Timer
       
    99         * @param aTickInterval refersh interval
       
   100         */
       
   101         void StartTimerL( TInt aTickInterval );
       
   102     
       
   103         /**
       
   104         * Stops Timer
       
   105         */
       
   106         void StopTimer();                                            
       
   107         
       
   108         /**
       
   109         * DoCancel from CActive
       
   110         */    
       
   111         virtual void DoCancel();
       
   112 
       
   113         /**
       
   114         * RunL from CActive
       
   115         */
       
   116         virtual void RunL();
       
   117   
       
   118         void CreateArraysL( TInt aResourceId, TBool aChangeConnection, 
       
   119                             TUint32 aIAPId );
       
   120 
       
   121 
       
   122         /**
       
   123         * BuildConnectionListL
       
   124         * @param    -
       
   125         */
       
   126         void BuildConnectionListL( TInt aResourceId, TBool aChangeConnection, 
       
   127                                    TUint32 aIAPId );
       
   128 
       
   129 
       
   130         /**
       
   131         * Get the type of LAN of the access point.
       
   132         * @param aServiceId The Service ID of the access point
       
   133         * @param aIsInfrastructure  Output, it tells if the connection mode is 
       
   134         *                           'Infrastructure'
       
   135         * @return one of the TLanType enumerations
       
   136         */
       
   137         TLanType GetTypeOfLanL( TUint32 aServiceId, TBool& aIsInfrastructure );
       
   138 
       
   139         
       
   140         /**
       
   141         * Merges iWlanIAPs and iAvailableIaps
       
   142         */
       
   143         void MergeArraysL( TInt aResourceId );
       
   144     
       
   145         /**
       
   146         * SortNameListL
       
   147         * @param -
       
   148         */
       
   149         void SortNameListL( TInt aResourceId );
       
   150 
       
   151     protected:
       
   152     
       
   153         // Pointer to Comms database owned
       
   154         CCommsDatabase* iDb;
       
   155     
       
   156         // Timer, to refresh iaps of networks. Owned.
       
   157         CPeriodic* iPeriodic;
       
   158             
       
   159         CAknWaitDialog* iWaitDialog;    
       
   160               
       
   161 #ifndef __WINS__
       
   162     
       
   163         // used for wlan networks info, owned
       
   164         CWlanMgmtClient* iWlanMgmt;
       
   165     
       
   166 #endif // !__WINS__
       
   167 
       
   168         // contains all iaps from db except wlan iaps, owned
       
   169         CConnectionInfoArray *iIAPs;   
       
   170 
       
   171         // contains all wlan iaps from db, owned
       
   172         CConnectionInfoArray *iWlanIAPs;   
       
   173     
       
   174         // all available iaps, owned
       
   175         CConnectionInfoArray *iActIAPs;   
       
   176     
       
   177         // Available iaps from WlanMgmnt
       
   178         RArray<TUint> iAvailableIaps;
       
   179     
       
   180         // used for complete runl, not owned.
       
   181         TRequestStatus* iClientStatus;  
       
   182     
       
   183         TBool iIsWLANFeatureSupported;
       
   184     
       
   185         // Selected preferences
       
   186         TConnectionPrefs iPrefs;        
       
   187     };     
       
   188 
       
   189 
       
   190 #endif
       
   191 
       
   192 // End of File