vpnui/vpnmanagementui/inc/vpnmanagementuiview.h
changeset 0 33413c0669b9
child 38 9f4e37332ce5
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     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         // from MAcuApiWrapperCaller
       
   100         void NotifyPolicyImportComplete(TInt aResult);
       
   101         
       
   102     public:
       
   103     
       
   104         /**
       
   105         * from CGSPluginInterface
       
   106         */
       
   107         
       
   108         /**
       
   109         * Method for checking plugin's Uid. Uid identifies this GS plugin. Use
       
   110         * same Uid as the ECOM plugin implementation Uid.
       
   111         *
       
   112         * @return PluginUid
       
   113         */
       
   114         TUid PluginUid() const;
       
   115 
       
   116         /**
       
   117         * Method for checking, if item has bitmap icon to be shown in list
       
   118         *
       
   119         * @return ETrue if plugin has icon bitmap
       
   120         * @return EFalse if plugin does not have a bitmap
       
   121         */
       
   122         TBool HasBitmap() const;
       
   123 
       
   124         /**
       
   125         * Method for reading bitmap icon.
       
   126         *
       
   127         * @param aBitmap plugin bitmap
       
   128         * @param aMask plugin icon bitmap mask
       
   129         */
       
   130         void GetBitmapL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ) const;
       
   131 
       
   132         /**
       
   133         * Method for reading the ID of the plugin provider category. See 
       
   134         *
       
   135         * @return Plugin provider category ID defined by 
       
   136         *         
       
   137         */
       
   138         TInt PluginProviderCategory() const;
       
   139         
       
   140         /**
       
   141         * Method for checking, if plugin should be visible and used in GS FW.
       
   142         * (for example shown in listbox of the parent view).
       
   143         *
       
   144         * On default plugin is visible. Overwrite this function to enable or
       
   145         * disable your plugin dynamically.
       
   146         *
       
   147         * @return ETrue if plugin should be visible in GS.
       
   148         * @return EFalse if plugin should not be visible in GS.
       
   149         */
       
   150         virtual TBool Visible() const;
       
   151         
       
   152         /**
       
   153         * Creates a new icon of desired type. Override this to provide custom
       
   154         * icons. Othervise default icon is used. Ownership of the created icon
       
   155         * is transferred to the caller.
       
   156         *
       
   157         * Icon type UIDs (use these defined constants):
       
   158         * KGSIconTypeLbxItem  -   ListBox item icon.
       
   159         * KGSIconTypeTab      -   Tab icon.
       
   160         *
       
   161         * @param aIconType UID Icon type UID of the icon to be created.
       
   162         * @return Pointer of the icon. NOTE: Ownership of this icon is
       
   163         *         transferred to the caller.
       
   164         */
       
   165         CGulIcon* CreateIconL( const TUid aIconType );
       
   166         
       
   167         /**
       
   168         * From MUiRunnerObserver
       
   169         */                    
       
   170         void UiComplete( TInt aUirEvent );
       
   171                                   
       
   172         /**
       
   173         * Handles the actual selected list box item
       
   174         */
       
   175         void HandleListBoxSelectionL(); 
       
   176         
       
   177         /**
       
   178         * Shows a information note.
       
   179         * @param aResourceId Resource id of the showed text .
       
   180         */
       
   181         void ShowInfoNoteL( TInt aResourceId );        
       
   182 
       
   183     public: // data
       
   184 
       
   185         /**
       
   186         * To get hold of VpnUiLoader
       
   187         */
       
   188         CVpnUiLoader* iLoader;
       
   189 
       
   190         /**
       
   191         * To get access to list in management view
       
   192         */
       
   193         CVpnManagementUiContainer* iContainer;
       
   194 
       
   195         /**
       
   196         * To store the position of the focus in the management view
       
   197         */
       
   198         TInt iCurrentPosition;
       
   199      
       
   200     private: // functions
       
   201 
       
   202         /**
       
   203         * Constructor.
       
   204         */
       
   205         CVpnManagementUiView();
       
   206 
       
   207         /**
       
   208         * Symbian OS default constructor.
       
   209         */
       
   210         void ConstructL();
       
   211 
       
   212         /**
       
   213         * From AknView, 
       
   214         * Updates the view when opening it
       
   215         */
       
   216         void DoActivateL(const TVwsViewId& aPrevViewId,
       
   217             TUid aCustomMessageId,
       
   218             const TDesC8& aCustomMessage);
       
   219 
       
   220         /**
       
   221         * From AknView,
       
   222         * Saves focus position when closing view
       
   223         */
       
   224         void DoDeactivate();
       
   225 
       
   226         void HandleListBoxEventL(CEikListBox* aListBox,
       
   227             TListBoxEvent aEventType);
       
   228 
       
   229     private: // Data
       
   230         
       
   231         TInt iCurrentItem; // currently selected listbox item
       
   232         TInt iTopItemIndex; // first item in the listbox
       
   233     };
       
   234 
       
   235 #endif // __VPNMANAGEMENTUIVIEW_H__
       
   236 
       
   237 // End of File