|
1 /* |
|
2 * Copyright (c) 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: Displays a selection list of VPN policies |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CMPLUGINVPN_POLICYSELECTION_DLG_H |
|
19 #define CMPLUGINVPN_POLICYSELECTION_DLG_H |
|
20 |
|
21 // includes |
|
22 #include <e32base.h> |
|
23 #include <ConeResLoader.h> |
|
24 #include <vpnapi.h> |
|
25 |
|
26 // forward declarations |
|
27 class CCmPluginBaseEng; |
|
28 |
|
29 /** |
|
30 * CmPluginPacketDataSettingsDlg dialog class |
|
31 * |
|
32 * |
|
33 * |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CmPluginVpnPolicySelectionDlg ) : public CBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 static CmPluginVpnPolicySelectionDlg* NewL( |
|
41 CCmPluginBaseEng& aCmPluginBaseEng ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CmPluginVpnPolicySelectionDlg(); |
|
47 |
|
48 public: // New functions |
|
49 |
|
50 /** |
|
51 * Shows the VPN policies in and a popup list and if a selection is |
|
52 * made, EVpnServicePolicyName is set |
|
53 * |
|
54 * @since S60 3.2 |
|
55 * @return ETrue if a selection was made |
|
56 */ |
|
57 TBool ShowPolicySelectionListL(); |
|
58 |
|
59 /** |
|
60 * Shows the VPN policies in and a radio button list and if a selection is |
|
61 * made, EVpnServicePolicyName is set |
|
62 * |
|
63 * @since S60 3.2 |
|
64 * @return ETrue if a selection was made |
|
65 */ |
|
66 TBool ShowPolicySelectionDlgL(); |
|
67 |
|
68 private: // Constructor |
|
69 |
|
70 /** |
|
71 * Constructor. |
|
72 */ |
|
73 CmPluginVpnPolicySelectionDlg( CCmPluginBaseEng& aCmPluginBaseEng ); |
|
74 |
|
75 /** |
|
76 * Second phase constructor. Leaves on failure. |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 private: // New functions |
|
81 |
|
82 /** |
|
83 * Loads a resource file. |
|
84 * |
|
85 * @since S60 3.2 |
|
86 * @param aResFileName the resource file name. |
|
87 */ |
|
88 void LoadResourceL( const TDesC& aResFileName ); |
|
89 |
|
90 /** |
|
91 * Pop-up note that VPN client is inaccessible |
|
92 * |
|
93 * @since S60 3.2 |
|
94 */ |
|
95 void VpnClientInaccessibleL(); |
|
96 |
|
97 private: // data members |
|
98 |
|
99 /** |
|
100 * base class reference, NOT OWNED |
|
101 */ |
|
102 CCmPluginBaseEng& iCmPluginBaseEng; |
|
103 |
|
104 /** |
|
105 * resource reader |
|
106 */ |
|
107 RConeResourceLoader iResourceReader; |
|
108 |
|
109 /** |
|
110 * VPN server |
|
111 */ |
|
112 RVpnServ iVpnServ; |
|
113 |
|
114 /** |
|
115 * array of VPN policies - OWNED |
|
116 */ |
|
117 CArrayFixFlat<TVpnPolicyInfo>* iPolicyInfoList; |
|
118 |
|
119 /** |
|
120 * flag for when vpn is not accessible. used to make sure the |
|
121 * dialog indicating it is inaccessible is not displayed both |
|
122 * on connect and close |
|
123 */ |
|
124 TBool iVpnClientUnaccessible; |
|
125 |
|
126 /** |
|
127 * the number of VPN policies |
|
128 */ |
|
129 TInt iNumPolicies; |
|
130 }; |
|
131 |
|
132 #endif // CMPLUGINVPN_POLICYSELECTION_DLG_H |