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 #include "vpnextapi.h" |
|
24 |
|
25 |
|
26 /** |
|
27 * CServerSettingsContainer container control class. |
|
28 * |
|
29 * @lib vpnmanagementui.lib |
|
30 * @since S60 v3.0 |
|
31 */ |
|
32 class CServerSettingsContainer : public CAknSettingItemList |
|
33 { |
|
34 public: // functions |
|
35 |
|
36 /** |
|
37 * NewL |
|
38 * |
|
39 * @since S60 3.2 |
|
40 * @param aLoader VPN UI loader for common view handling. |
|
41 * @param aServerIndex index of selected server or KErrNotFound. |
|
42 * @return self |
|
43 */ |
|
44 static CServerSettingsContainer* NewL( |
|
45 CVpnUiLoader& aLoader, TInt aServerIndex); |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CServerSettingsContainer(); |
|
50 |
|
51 /** |
|
52 * From CAknSettingItemList |
|
53 */ |
|
54 CAknSettingItem* CreateSettingItemL( TInt aSettingId ); |
|
55 |
|
56 /** |
|
57 * ServerNameExistsL |
|
58 * @return ETrue name already in use |
|
59 */ |
|
60 TBool ServerNameExistsL( const TDesC& aText ) const; |
|
61 /** |
|
62 * ChangeSettingValueL |
|
63 * Opens Setting page for currently selected setting item |
|
64 */ |
|
65 void ChangeSettingValueL(); |
|
66 |
|
67 |
|
68 const TAgileProvisionApiServerSettings& 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 TAgileProvisionApiServerSettings 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 |
|