vpnui/vpnmanagementui/inc/vpnmanagementuipolicyview.h
branchRCL_3
changeset 41 e06095241a65
parent 0 33413c0669b9
equal deleted inserted replaced
40:473321461bba 41:e06095241a65
       
     1 /*
       
     2 * Copyright (c) 2003 - 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 the CVpnManagementUiPolicyView class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __VPNMANAGEMENTUIPOLICYVIEW_H__
       
    20 #define __VPNMANAGEMENTUIPOLICYVIEW_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknview.h>
       
    24 #include "vpnapiwrapper.h"
       
    25 #include "vpnmanagementuiviewid.h"
       
    26 
       
    27 class CVpnManagementUiPolicyContainer;
       
    28 /**
       
    29 *  CVpnManagementUiPolicyView view class.
       
    30 * 
       
    31 *  @lib vpnmanagementui.dll
       
    32 */
       
    33 class CVpnManagementUiPolicyView : public CAknView
       
    34     {
       
    35     public: 
       
    36 
       
    37         /**
       
    38         * Destructor.
       
    39         */
       
    40         ~CVpnManagementUiPolicyView();
       
    41 
       
    42         /**
       
    43         * NewL
       
    44         */
       
    45         static class CVpnManagementUiPolicyView* NewL(const TRect& aRect, CVpnUiLoader& aLoader);
       
    46 
       
    47         /**
       
    48         * NewLC
       
    49         */
       
    50         static class CVpnManagementUiPolicyView* NewLC(const TRect& aRect, CVpnUiLoader& aLoader);
       
    51 
       
    52         /**
       
    53         * Returns Policy view id
       
    54         */
       
    55         TUid Id() const;
       
    56 
       
    57         /**
       
    58         * Handles ClientRectChange
       
    59         */
       
    60         void HandleClientRectChange();
       
    61 
       
    62         /**
       
    63         * Returns iPolicyContainer 
       
    64         */
       
    65         CCoeControl* Container();
       
    66 
       
    67         /**
       
    68         * Handles Softkey and Options list commands
       
    69         */
       
    70         void HandleCommandL(TInt aCommand);
       
    71 
       
    72         /**
       
    73         * Creates the whole of policy details view
       
    74         * Appends strings from both resources and VpnAPI to one	
       
    75         * message body text and displays it.
       
    76         */
       
    77         void PolicyDetailsL(TInt aIndex);
       
    78 
       
    79         void ReadResourceL(HBufC& aText, TInt aResource);
       
    80 
       
    81         /**
       
    82         * Sets appropriate MSK for view
       
    83         */
       
    84 		void SetMiddleSoftKeyL(TBool aDrawNow);
       
    85 
       
    86 
       
    87     public: // data
       
    88 
       
    89         /**
       
    90         * To get hold of VpnUiLoader
       
    91         */
       
    92         CVpnUiLoader& iLoader;
       
    93 
       
    94         /**
       
    95         * To get access to policy list in policy view
       
    96         */
       
    97         CVpnManagementUiPolicyContainer* iPolicyContainer;
       
    98 
       
    99         /**
       
   100         * To store the position of the focus in the Policy view
       
   101         */
       
   102         TInt iCurrentPosition;
       
   103 
       
   104     private: // functions
       
   105 
       
   106         /**
       
   107         * Constructor.
       
   108         */
       
   109         CVpnManagementUiPolicyView(CVpnUiLoader& aLoader);
       
   110 
       
   111         /**
       
   112         * Symbian OS default constructor.
       
   113         */
       
   114         void ConstructL();
       
   115 
       
   116         /**
       
   117         * From AknView, 
       
   118         * Updates the view when opening it
       
   119         */
       
   120         void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
       
   121             const TDesC8& aCustomMessage);
       
   122 
       
   123         /**
       
   124         * From AknView,
       
   125         * Saves focus position when closing view
       
   126         */
       
   127         void DoDeactivate();
       
   128 
       
   129         /**
       
   130         * Updates Options list with correct items depending on 
       
   131         * whether the listbox is empty or if it has any marked items
       
   132         */
       
   133         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
       
   134 
       
   135         TBool NotAssociatedToIapL(TInt aIndex, TVpnPolicyName& aPolicyName);
       
   136 
       
   137         /**
       
   138         * Sets MSK  
       
   139         */
       
   140 		void SetMiddleSoftKeyLabelL(TInt aResourceId, TInt aCommandId);
       
   141 		
       
   142     private: // Data
       
   143 
       
   144        /**
       
   145         * Stores top item in the listbox
       
   146         */
       
   147         TInt iTopItem;
       
   148     };
       
   149 
       
   150 
       
   151 #endif // __VPNMANAGEMENTUIPOLICYVIEW_H__