vpnui/vpnmanagementui/inc/vpnmanagementuiview.h
branchRCL_3
changeset 41 e06095241a65
child 46 29c8f9bc68e1
equal deleted inserted replaced
40:473321461bba 41:e06095241a65
       
     1 /*
       
     2 * Copyright (c) 2003 - 2007 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 the CVpnManagementUiView class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __VPNMANAGEMENTUIVIEW_H__
       
    21 #define __VPNMANAGEMENTUIVIEW_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <aknview.h>
       
    25 #include <eikclb.h>
       
    26 #include <ConeResLoader.h>
       
    27 #include <gsplugininterface.h>
       
    28 #include "vpnmanagementuiviewid.h"
       
    29 #include "vpnapiwrapper.h"
       
    30 #include "vpnuiloader.h"
       
    31 
       
    32 #ifdef __SERIES60_HELP
       
    33 #include    <hlplch.h>   // For HlpLauncher 
       
    34 #endif //__SERIES60_HELP
       
    35 
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CVpnManagementUiContainer;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43  *  CVpnManagementUiView view class.
       
    44  *
       
    45  *  @lib (internal) vpnmanagementui.lib
       
    46  *  @since S60 v3.0
       
    47  */
       
    48 class CVpnManagementUiView : public CGSPluginInterface, public MEikListBoxObserver, public MVpnApiWrapperCaller
       
    49     {
       
    50     public: // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         ~CVpnManagementUiView();
       
    56 
       
    57         /**
       
    58         * NewL
       
    59         */
       
    60         static class CVpnManagementUiView* NewL();
       
    61 
       
    62         /**
       
    63         * NewLC
       
    64         */
       
    65         static class CVpnManagementUiView* NewLC();
       
    66 
       
    67        
       
    68 
       
    69     public: // Functions from base classes
       
    70 
       
    71         /**
       
    72         * Method for getting caption of this plugin. This should be the
       
    73         * localized name of the settings view to be shown in parent view.
       
    74         *
       
    75         * @param aCaption pointer to Caption variable
       
    76         */
       
    77         virtual void GetCaptionL( TDes& aCaption ) const;    
       
    78         
       
    79         /**
       
    80         * Returns Management view id
       
    81         */
       
    82         TUid Id() const;
       
    83 
       
    84         /**
       
    85         * Handles ClientRectChange
       
    86         */
       
    87         void HandleClientRectChange();
       
    88 
       
    89         /**
       
    90         * Returns iContainer 
       
    91         */
       
    92         CCoeControl* Container();
       
    93 
       
    94         /**
       
    95         * Handles Softkey and Options list commands
       
    96         */
       
    97         void HandleCommandL(TInt aCommand);
       
    98 
       
    99         
       
   100         void NotifySynchroniseServerCompleteL(TInt aResult);
       
   101     public:
       
   102     
       
   103         /**
       
   104         * from CGSPluginInterface
       
   105         */
       
   106         
       
   107         /**
       
   108         * Method for checking plugin's Uid. Uid identifies this GS plugin. Use
       
   109         * same Uid as the ECOM plugin implementation Uid.
       
   110         *
       
   111         * @return PluginUid
       
   112         */
       
   113         TUid PluginUid() const;
       
   114 
       
   115         /**
       
   116         * Method for checking, if item has bitmap icon to be shown in list
       
   117         *
       
   118         * @return ETrue if plugin has icon bitmap
       
   119         * @return EFalse if plugin does not have a bitmap
       
   120         */
       
   121         TBool HasBitmap() const;
       
   122 
       
   123         /**
       
   124         * Method for reading bitmap icon.
       
   125         *
       
   126         * @param aBitmap plugin bitmap
       
   127         * @param aMask plugin icon bitmap mask
       
   128         */
       
   129         void GetBitmapL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ) const;
       
   130 
       
   131         /**
       
   132         * Method for reading the ID of the plugin provider category. See 
       
   133         *
       
   134         * @return Plugin provider category ID defined by 
       
   135         *         
       
   136         */
       
   137         TInt PluginProviderCategory() const;
       
   138         
       
   139         /**
       
   140         * Method for checking, if plugin should be visible and used in GS FW.
       
   141         * (for example shown in listbox of the parent view).
       
   142         *
       
   143         * On default plugin is visible. Overwrite this function to enable or
       
   144         * disable your plugin dynamically.
       
   145         *
       
   146         * @return ETrue if plugin should be visible in GS.
       
   147         * @return EFalse if plugin should not be visible in GS.
       
   148         */
       
   149         virtual TBool Visible() const;
       
   150         
       
   151         /**
       
   152         * Creates a new icon of desired type. Override this to provide custom
       
   153         * icons. Othervise default icon is used. Ownership of the created icon
       
   154         * is transferred to the caller.
       
   155         *
       
   156         * Icon type UIDs (use these defined constants):
       
   157         * KGSIconTypeLbxItem  -   ListBox item icon.
       
   158         * KGSIconTypeTab      -   Tab icon.
       
   159         *
       
   160         * @param aIconType UID Icon type UID of the icon to be created.
       
   161         * @return Pointer of the icon. NOTE: Ownership of this icon is
       
   162         *         transferred to the caller.
       
   163         */
       
   164         CGulIcon* CreateIconL( const TUid aIconType );
       
   165         
       
   166         /**
       
   167         * From MUiRunnerObserver
       
   168         */                    
       
   169         void UiComplete( TInt aUirEvent );
       
   170                                   
       
   171         /**
       
   172         * Handles the actual selected list box item
       
   173         */
       
   174         void HandleListBoxSelectionL(); 
       
   175         
       
   176         /**
       
   177         * Shows a information note.
       
   178         * @param aResourceId Resource id of the showed text .
       
   179         */
       
   180         void ShowInfoNoteL( TInt aResourceId );        
       
   181 
       
   182     public: // data
       
   183 
       
   184         /**
       
   185         * To get hold of VpnUiLoader
       
   186         */
       
   187         CVpnUiLoader* iLoader;
       
   188 
       
   189         /**
       
   190         * To get access to list in management view
       
   191         */
       
   192         CVpnManagementUiContainer* iContainer;
       
   193 
       
   194         /**
       
   195         * To store the position of the focus in the management view
       
   196         */
       
   197         TInt iCurrentPosition;
       
   198      
       
   199     private: // functions
       
   200 
       
   201         /**
       
   202         * Constructor.
       
   203         */
       
   204         CVpnManagementUiView();
       
   205 
       
   206         /**
       
   207         * Symbian OS default constructor.
       
   208         */
       
   209         void ConstructL();
       
   210 
       
   211         /**
       
   212         * From AknView, 
       
   213         * Updates the view when opening it
       
   214         */
       
   215         void DoActivateL(const TVwsViewId& aPrevViewId,
       
   216             TUid aCustomMessageId,
       
   217             const TDesC8& aCustomMessage);
       
   218 
       
   219         /**
       
   220         * From AknView,
       
   221         * Saves focus position when closing view
       
   222         */
       
   223         void DoDeactivate();
       
   224 
       
   225         void HandleListBoxEventL(CEikListBox* aListBox,
       
   226             TListBoxEvent aEventType);
       
   227 
       
   228     private: // Data
       
   229         
       
   230         TInt iCurrentItem; // currently selected listbox item
       
   231         TInt iTopItemIndex; // first item in the listbox
       
   232     };
       
   233 
       
   234 #endif // __VPNMANAGEMENTUIVIEW_H__
       
   235 
       
   236 // End of File