vpnui/vpnmanagementui/inc/vpnmanagementuiserversettingscontainer.h
changeset 0 33413c0669b9
child 22 9f4e37332ce5
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2003-2009 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 CServerSettingsContainer class.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef  __VPNMANAGEMENTUISERVERSETTINGSCONTAINER_H__
       
    19 #define  __VPNMANAGEMENTUISERVERSETTINGSCONTAINER_H__
       
    20 
       
    21 #include <aknsettingitemlist.h>
       
    22 
       
    23 
       
    24 /**
       
    25  *  CServerSettingsContainer container control class.
       
    26  *
       
    27  *  @lib vpnmanagementui.lib
       
    28  *  @since S60 v3.0
       
    29 */
       
    30 class CServerSettingsContainer : public CAknSettingItemList
       
    31     {
       
    32 public: // functions
       
    33     
       
    34     /**
       
    35      * NewL
       
    36      *
       
    37      * @since S60 3.2
       
    38      * @param aLoader VPN UI loader for common view handling.
       
    39      * @param aServerIndex index of selected server or KErrNotFound.     
       
    40      * @return self
       
    41      */        
       
    42 	static CServerSettingsContainer* NewL(
       
    43 	    CVpnUiLoader& aLoader, TInt aServerIndex);
       
    44     /**
       
    45     * Destructor.
       
    46     */
       
    47     ~CServerSettingsContainer();
       
    48         
       
    49     /**
       
    50      * From CAknSettingItemList
       
    51      */   
       
    52     CAknSettingItem* CreateSettingItemL( TInt aSettingId );
       
    53     
       
    54     /**
       
    55      * ServerNameExistsL
       
    56      * @return ETrue name already in use
       
    57      */
       
    58     TBool ServerNameExistsL( const TDesC& aText ) const; 
       
    59     /**
       
    60      * ChangeSettingValueL
       
    61      * Opens Setting page for currently selected setting item
       
    62      */
       
    63     void ChangeSettingValueL();
       
    64     
       
    65     /*** NSSM support is discontinued.
       
    66          Code is kept in comments temporarily because similar UI functionality
       
    67          might be needed for another purpose.
       
    68     const TAcuApiServerDetails& ServerDetailsL(); ***/
       
    69 
       
    70     static HBufC* GetDestinationNameL( TUint aId );
       
    71     static HBufC* GetConnectionMethodNameL( TUint aId );
       
    72 
       
    73     void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    74 
       
    75     TInt ServerIndex() const;
       
    76 
       
    77 private: // functions
       
    78 
       
    79     /**
       
    80     * Default constructor
       
    81     */
       
    82 	CServerSettingsContainer();
       
    83 	
       
    84     /**
       
    85     * Overrided Default constructor
       
    86     */
       
    87 	CServerSettingsContainer(
       
    88 	    CVpnUiLoader& aLoader, TInt aServerIndex );		
       
    89 
       
    90     /**
       
    91     * Symbian OS default constructor.
       
    92     * @param aRect Frame rectangle for container.
       
    93     */
       
    94 	void ConstructL();
       
    95 
       
    96 private: // implementation
       
    97 
       
    98     void UpdateTitleL( TDes& aText );
       
    99 
       
   100 #ifdef __SERIES60_HELP
       
   101     /**
       
   102 	* This function is called when Help application is launched.  
       
   103 	* (other items were commented in a header).
       
   104     */
       
   105 	void GetHelpContext(TCoeHelpContext& aContext) const;
       
   106 #endif //__SERIES60_HELP
       
   107 
       
   108 private: // data
       
   109     
       
   110     /**
       
   111     * To get hold of VpnUiLoader
       
   112     */
       
   113 	CVpnUiLoader& iLoader;
       
   114 	
       
   115 	/// Server details
       
   116     // TAcuApiServerDetails iServerDetails;
       
   117     TBuf<KMaxServerUrlLength> iServerAddressBuffer;
       
   118     
       
   119    /**
       
   120     * To get the index of server list
       
   121     * -1 when user has select Add new server
       
   122 	* Must be public so that view can access
       
   123     */
       
   124 	TInt iServerIndex;
       
   125     };
       
   126 
       
   127 #endif // __VPNMANAGEMENTUISERVERSETTINGSCONTAINER_H__
       
   128 
       
   129 // End of File