connectionutilities/ConnectionDialogs/cconndlg/inc/ActiveSelectConnectionPlugin.h
changeset 20 9c97ad6591ae
parent 18 fcbbe021d614
child 21 b8e8e15e80f2
child 23 7ec726f93df1
child 28 860702281757
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
     1 /*
       
     2 * Copyright (c) 2002 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 SelectConnection 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __ACTIVESELECTCONNECTIONPLUGIN_H__
       
    21 #define __ACTIVESELECTCONNECTIONPLUGIN_H__
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <agentdialog.h>
       
    27 #include <cmmanagerext.h>
       
    28 #include <rmpm.h>
       
    29 #include "ActiveBase.h"
       
    30 
       
    31 
       
    32 // FORWARD DECLARATION
       
    33 class CSelectConnectionDialog;
       
    34 class CConnectionInfoArray;
       
    35 class MEikSrvNotifierBase2;
       
    36 class CGulIcon;
       
    37 class TSortSnapUtils;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42  * CActiveSelectConnectionPlugin class,
       
    43  * an active object for selection plugin
       
    44  */     
       
    45 NONSHARABLE_CLASS( CActiveSelectConnectionPlugin ) : public CActiveBase
       
    46     {
       
    47     public:
       
    48         /**
       
    49         * NewL function
       
    50         * @param  aPlugin a pointer to notifier plugin
       
    51         * @param aIAPId iap id
       
    52         * @param aPrefs preferences pointer    
       
    53         */
       
    54         static CActiveSelectConnectionPlugin* NewL( 
       
    55                                                 MEikSrvNotifierBase2* aPlugin,
       
    56                                                 const TUint32 aElementId,
       
    57                                                 TUint32 aBearerSet );
       
    58     
       
    59         /**
       
    60         * Setactive and starts active object
       
    61         */    
       
    62         void ShowSelectConnectionL();
       
    63 
       
    64         /**
       
    65         * Destructor
       
    66         */    
       
    67         virtual ~CActiveSelectConnectionPlugin();
       
    68     
       
    69         /**
       
    70         * Cancels the active object
       
    71         */
       
    72         void Cancel();
       
    73 
       
    74         /**
       
    75         * Sets the preferred iap into db.
       
    76         * calls iActivePlugin    
       
    77         * @param aIAPId id of the preferred iap
       
    78         * @param aDestinationId id of the preferred Destination
       
    79         */
       
    80         TUint32 GetElementIDL( TUint32 aIAPId, TUint32 aDestinationId );
       
    81 
       
    82 
       
    83     protected:
       
    84         /**
       
    85         * ConstructL 
       
    86         */
       
    87         void ConstructL();
       
    88     
       
    89         /**
       
    90         * Constructor
       
    91         * @param  aPlugin a pointer to notifier plugin    
       
    92         * @param aIAPId iap id
       
    93         * @param aPrefs preferences pointer        
       
    94         */    
       
    95         CActiveSelectConnectionPlugin( MEikSrvNotifierBase2* aPlugin,
       
    96                                        const TUint32 aElementId,
       
    97                                        TUint32 aBearerSet );
       
    98     
       
    99         /**
       
   100         * DoCancel from CActive
       
   101         */    
       
   102         virtual void DoCancel();
       
   103 
       
   104         /**
       
   105         * RunL from CActive
       
   106         */
       
   107         virtual void RunL();
       
   108 
       
   109         /**
       
   110         * BuildConnectionListL
       
   111         * @param    -
       
   112         */
       
   113         void BuildConnectionListL();
       
   114 
       
   115         void AddSearchForWLanItemL();
       
   116 
       
   117         void AddDestinationItemsL();
       
   118         void AddDestinationItemL( RCmDestinationExt aDestination, 
       
   119                                   TUint32 aDestId, TBool aFirstItem, 
       
   120                                   TBool aDefaultDest,
       
   121                                   TSortSnapUtils& aSortSnapUtils );
       
   122 
       
   123         void AddUncategorizedItemL( TSortSnapUtils& aSortSnapUtils );
       
   124         
       
   125         /**
       
   126         * Gives back, refresh interval of scan for network
       
   127         */
       
   128         TInt GetRefreshIntervalL();
       
   129         
       
   130         /**
       
   131         * Counts the number of ad-hoc WLAN iaps
       
   132         */
       
   133         TInt CountAdhocWlanIapsL();
       
   134 
       
   135     protected:
       
   136         // contains all iaps from db, owned
       
   137         CConnectionInfoArray *iItems;   
       
   138 
       
   139         // Selected preferences
       
   140         TUint32 iBearerSet;
       
   141 
       
   142         // Requested bearer set preference
       
   143         TUint32 iReqBearerSet;
       
   144         
       
   145         // Selected preferences
       
   146         TUint32 iElementId;
       
   147 
       
   148         // a pointer to notifer, not owned
       
   149         MEikSrvNotifierBase2* iPlugin;
       
   150     
       
   151         ///< Pointer to the dialog, not owned 
       
   152         CSelectConnectionDialog* iDialogConn;
       
   153     
       
   154         TBool iIsWLANFeatureSupported;
       
   155 
       
   156         TInt iRefreshInterval;
       
   157 
       
   158         TInt iHighlightedItem;
       
   159 
       
   160         CArrayPtr< CGulIcon >* iIcons;
       
   161 
       
   162         RMPM iMPM;
       
   163 
       
   164         RCmManagerExt iCmManagerExt;
       
   165 
       
   166         TUint iDefaultDestId;
       
   167 
       
   168         TUint iDefaultCMId;
       
   169     };     
       
   170 
       
   171 
       
   172 #endif
       
   173 
       
   174 // End of File