cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnnextlayerselectdlg.h
changeset 4 77415202bfc8
parent 0 5a93021fdf25
equal deleted inserted replaced
3:f7816ffc66ed 4:77415202bfc8
    18 
    18 
    19 #ifndef CMPVPN_NEXT_LAYER_SELECT_DLG_H
    19 #ifndef CMPVPN_NEXT_LAYER_SELECT_DLG_H
    20 #define CMPVPN_NEXT_LAYER_SELECT_DLG_H
    20 #define CMPVPN_NEXT_LAYER_SELECT_DLG_H
    21 
    21 
    22 #include <e32base.h>
    22 #include <e32base.h>
    23 #include <eikmobs.h>  // MEikMenuObserver
    23 #include <aknlistquerydialog.h> // CAknListQueryDialog
    24 #include <aknPopup.h> // CAknPopupList
       
    25 
    24 
    26 #include <ConeResLoader.h> // resource reader
    25 #include <ConeResLoader.h> // resource reader
    27 
    26 
    28 class CEikFormattedCellListBox;
       
    29 class CEikMenuBar;
       
    30 class CEikonEnv;
    27 class CEikonEnv;
    31 class CCmPluginBaseEng;
    28 class CCmPluginBaseEng;
    32 class CCmManagerImpl;
    29 class CCmManagerImpl;
    33 class CGulIcon;
    30 class CGulIcon;
    34 
    31 
    39  *
    36  *
    40  *  
    37  *  
    41  *
    38  *
    42  *  @since S60 v3.2
    39  *  @since S60 v3.2
    43  */
    40  */
    44 NONSHARABLE_CLASS( CmPluginVpnNextLayerSelectDlg ) : public CAknPopupList, 
    41 NONSHARABLE_CLASS( CmPluginVpnNextLayerSelectDlg ) : public CAknListQueryDialog
    45                                                      public MEikMenuObserver
       
    46     {
    42     {
    47     public: // Constructors and destructor
    43     public: // Constructors and destructor
    48     
    44     
    49         static CmPluginVpnNextLayerSelectDlg* NewL( 
    45         static CmPluginVpnNextLayerSelectDlg* NewL( 
    50                                         CCmPluginBaseEng& aCmPluginBaseEng,
    46                                         CCmPluginBaseEng& aCmPluginBaseEng,
    54         
    50         
    55         /**
    51         /**
    56         * Destructor.
    52         * Destructor.
    57         */
    53         */
    58         virtual ~CmPluginVpnNextLayerSelectDlg();
    54         virtual ~CmPluginVpnNextLayerSelectDlg();
    59     
    55 
       
    56 
    60     private: // Constructor
    57     private: // Constructor
    61     
    58     
    62         /**
    59         /**
    63         * Constructor.
    60         * Constructor.
    64         */      
    61         */      
    65         CmPluginVpnNextLayerSelectDlg( CCmPluginBaseEng& aCmPluginBaseEng,
    62         CmPluginVpnNextLayerSelectDlg( CCmPluginBaseEng& aCmPluginBaseEng,
    66                                        RArray<TUint32>& aBindableMethods,
    63                                        RArray<TUint32>& aBindableMethods,
    67                                        TBool& aSnapSelected,
    64                                        TBool& aSnapSelected,
    68                                        TUint32& aNextLayerId );
    65                                        TUint32& aNextLayerId,
       
    66                                        TInt aDummyIndex );
    69         
    67         
    70         /**
    68         /**
    71         * Second phase constructor. Leaves on failure.
    69         * Second phase constructor. Leaves on failure.
    72         */      
    70         */      
    73         void ConstructL();
    71         void ConstructL();
    74 
    72         
    75     public: // From MEikMenuObserver
    73     public: // new
    76         
    74         
    77         /**
    75         static TInt CancelAsynchronouslyL( TAny* aObject );
    78          * See base class
    76                                              
       
    77         
       
    78     protected: // From CAknListQueryDialog
       
    79     
       
    80         /**
       
    81         * @see CAknListQueryDialog
       
    82         */
       
    83         virtual void PreLayoutDynInitL();
       
    84         
       
    85         /**
       
    86         * @see CAknListQueryDialog
       
    87         */
       
    88         TBool OkToExitL( TInt aButtonId );
       
    89 
       
    90     public: // From CAknListQueryDialog
       
    91         
       
    92         /**
       
    93          * @see CAknListQueryDialog
    79          */
    94          */
    80         void ProcessCommandL( TInt aCommandId );
    95         void ProcessCommandL( TInt aCommandId );
    81         
    96               
    82         /**
    97         /**
    83          * See base class
    98          * @see CAknListQueryDialog
    84          */
       
    85         void SetEmphasis( CCoeControl* aMenuControl, TBool aEmphasis );
       
    86         
       
    87         /**
       
    88          * See base class
       
    89          */
    99          */
    90         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
   100         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
    91 
   101 
       
   102         /**
       
   103          * @see CAknListQueryDialog
       
   104          */
       
   105         void HandleListBoxEventL( CEikListBox* aListBox, 
       
   106                                   TListBoxEvent aEventType );
       
   107 
       
   108         
    92     public: // From CCoeControl
   109     public: // From CCoeControl
    93     
   110     
    94         /**
   111         /**
    95         * Returns the help context
   112         * Returns the help context
    96         * From CCoeControl
   113         * From CCoeControl
    97         * 
   114         * 
    98         * @since S60 3.2
   115         * @since S60 3.2
    99         * @param aContext the returned help context
   116         * @param aContext the returned help context
   100         */
   117         */
   101         void GetHelpContext( TCoeHelpContext& aContext ) const;
   118         void GetHelpContext( TCoeHelpContext& aContext ) const;
   102         
   119                 
   103          /**
       
   104         * From CCoeControl, makes control visible/invisible.
       
   105         * @param aVisible ETrue if visible, EFalse if invisible.
       
   106         */
       
   107         void MakeVisible( TBool aVisible );
       
   108         
       
   109         /**
   120         /**
   110         * From CCoeControl
   121         * From CCoeControl
   111         *
   122         *
   112         * @since S60 3.2
   123         * @since S60 3.2
   113         * @param aKeyEvent The key event.
   124         * @param aKeyEvent The key event.
   114         * @param aType Key event type.
   125         * @param aType Key event type.
   115         * @return key response (was the key event consumed?).
   126         * @return key response (was the key event consumed?).
   116         */
   127         */
   117         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
   128         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
   118                                      TEventCode aType );
   129                                      TEventCode aType );
   119                                      
   130  
   120         // From MEikListBoxObserver
   131                                         
   121         void HandleListBoxEventL( CEikListBox* aListBox, 
       
   122                                   TListBoxEvent aEventType );
       
   123                                    
       
   124     public: // new functions
       
   125    
       
   126         /**
       
   127         * Display the Options menu
       
   128         *
       
   129         *
       
   130         * @since S60 3.2
       
   131         */
       
   132         void DisplayMenuL();
       
   133 
       
   134         /**
       
   135         * Hide the Options menu.
       
   136         *
       
   137         *
       
   138         * @since S60 3.2
       
   139         */
       
   140         void HideMenu();
       
   141 
       
   142         /**
       
   143         * Is the Options menu opened?
       
   144         *
       
   145         *
       
   146         * @since S60 3.2
       
   147         * @return ETrue if showing
       
   148         */
       
   149         TBool MenuShowing() const;
       
   150         
       
   151     private: // new functions
   132     private: // new functions
   152     
   133     
   153         /*
   134         /*
   154         * Load the given resource file
   135         * Load the given resource file
   155         *
   136         *
   167         * @return the formatted text
   148         * @return the formatted text
   168         */
   149         */
   169         HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
   150         HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
   170                                       TInt aSecondLineResId,
   151                                       TInt aSecondLineResId,
   171                                       TInt aIconIndex );
   152                                       TInt aIconIndex );
   172         
   153                         
   173         
       
   174         
       
   175         /**
   154         /**
   176         */
   155         */
   177         HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
   156         HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
   178                                       const TDesC& aSecondLineText,
   157                                       const TDesC& aSecondLineText,
   179                                       TInt aIconIndex );
   158                                       TInt aIconIndex );
   200         * @return ETrue if selection made EFalse if cancelled
   179         * @return ETrue if selection made EFalse if cancelled
   201         */
   180         */
   202         TBool ShowCMSelectionDlgL( TUint32 aDestinationId, 
   181         TBool ShowCMSelectionDlgL( TUint32 aDestinationId, 
   203                                    TUint32& aCmId );
   182                                    TUint32& aCmId );
   204 
   183 
   205         void InitialiseL();
       
   206         
       
   207         void SetTextsAndIconsL();
   184         void SetTextsAndIconsL();
   208         
   185         
   209         void AppendDestinationTextsL( CCmDestinationImpl& aDestination,
   186         void AppendDestinationTextsL( CCmDestinationImpl& aDestination,
   210                                  TInt aNumCms,
   187                                  TInt aNumCms,
   211                                  CDesCArray& aItems,
   188                                  CDesCArray& aItems,
   214         void AppendUncatDestinationL( CDesCArray& aItems,
   191         void AppendUncatDestinationL( CDesCArray& aItems,
   215                                       CArrayPtr<CGulIcon>& aIcons );
   192                                       CArrayPtr<CGulIcon>& aIcons );
   216                                     
   193                                     
   217         void AppendEasyWlanL( CDesCArray& aItems,
   194         void AppendEasyWlanL( CDesCArray& aItems,
   218                               CArrayPtr<CGulIcon>& aIcons );
   195                               CArrayPtr<CGulIcon>& aIcons );
   219                            
   196                                    
   220 
   197 
   221     private: // data members
   198     private: // data members
   222   
   199   
   223         /**
   200         /**
   224          * Eikon environment
   201          * Eikon environment
   225          */
   202          */
   226         CEikonEnv& iMyEikonEnv;        
   203         CEikonEnv& iMyEikonEnv;        
   227   
   204        
   228         /**
       
   229          * Owned list box
       
   230          */
       
   231         CEikFormattedCellListBox* iMyListBox;
       
   232         
       
   233         /**
       
   234          * Owned menu bar.
       
   235          */
       
   236         CEikMenuBar* iMenuBar;
       
   237         
       
   238         /**
   205         /**
   239          * base class not owned
   206          * base class not owned
   240          */
   207          */
   241         CCmPluginBaseEng& iCmPluginBaseEng;
   208         CCmPluginBaseEng& iCmPluginBaseEng;
   242         
   209         
   273         /**
   240         /**
   274          * Flag to determine if there are uncategorised connection methods
   241          * Flag to determine if there are uncategorised connection methods
   275          */
   242          */
   276         TBool iUncatItems;
   243         TBool iUncatItems;
   277         
   244         
       
   245         /**
       
   246          * One shot active object for asynchronous exiting with Cancel
       
   247          */
       
   248         CAsyncCallBack* iAsyncCancel; 
       
   249         
       
   250         
   278     };
   251     };
   279 #endif // CMPVPN_NEXT_LAYER_SELECT_DLG_H
   252 #endif // CMPVPN_NEXT_LAYER_SELECT_DLG_H