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: Wizard used for adding connection methods |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef T_TCMWIZARD_H |
|
19 #define T_TCMWIZARD_H |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32def.h> |
|
23 #include <AknProgressDialog.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CAknWaitDialog; |
|
27 class CCmDestinationImpl; |
|
28 class CCmManagerImpl; |
|
29 class CCmPluginBase; |
|
30 |
|
31 /** |
|
32 * Connection Method wizard |
|
33 * |
|
34 * Wizard used for creating a new Connection Method. |
|
35 * |
|
36 * @lib cmmanager.lib |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CCmWizard ) : public CBase, |
|
40 public MProgressDialogCallback |
|
41 { |
|
42 public: // constructor |
|
43 |
|
44 /** |
|
45 * Constructor. |
|
46 * |
|
47 * @param aCmManager Connection Method Manager implementation passed |
|
48 * for queries. |
|
49 */ |
|
50 CCmWizard( CCmManagerImpl& aCmManager ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CCmWizard(); |
|
56 |
|
57 public: // public methods |
|
58 |
|
59 /** |
|
60 * Key method for creating a new Connection Method. This function |
|
61 * guides the user through several steps and then finally creates |
|
62 * a new Connection Method based on the information the user has given. |
|
63 * @param aTargetDestination Target destination to which the new |
|
64 * connection method will be added. Can be NULL if the |
|
65 * destination is to be selected by the user later on (via a dialog). |
|
66 */ |
|
67 TInt CreateConnectionMethodL |
|
68 ( CCmDestinationImpl* aTargetDestination = NULL ); |
|
69 |
|
70 public: // from MProgressDialogCallback |
|
71 |
|
72 /** |
|
73 * @see MProgressDialogCallback mixin for more details. |
|
74 */ |
|
75 void DialogDismissedL( TInt aButtonId ); |
|
76 |
|
77 private: // internal helper methods |
|
78 |
|
79 /** |
|
80 * Shows a dialog asking the user if he/she wants to have the available |
|
81 * connection methods automatically checked for. |
|
82 * @return ETrue if the user wants the conn methods be automatically |
|
83 * discovered, EFalse if he/she wants to discover them manually. |
|
84 */ |
|
85 TBool AutoCheckForCmsL() const; |
|
86 |
|
87 /** |
|
88 * If automatic CM detection has failed, the user is prompted a dialog |
|
89 * asking if he/she wants to proceed with manual configuration. |
|
90 * @return ETrue if the user wants to proceed with manual configuration, |
|
91 * EFalse otherwise. |
|
92 */ |
|
93 TBool ManualCheckForCmsL() const; |
|
94 |
|
95 /** |
|
96 * Checks for availability of packet data and WLAN bearer types. Shows |
|
97 * a wait dialog until discovery is not complete. |
|
98 * @param aCoverageArray This array is supposed to hold the UIDs of |
|
99 * bearers that have network coverage for the moment. |
|
100 */ |
|
101 void CheckForCmsL( RArray<TUint32>& aCoverageArray ); |
|
102 |
|
103 |
|
104 /** |
|
105 * Finds the target destination to which the currently creted VPN |
|
106 * connection method points. It can be a destination or the destination |
|
107 * which includes the connection method to which the VPN points. |
|
108 * @param aPlugin VPN plugin. |
|
109 * @return the Id of the destination |
|
110 */ |
|
111 TUint32 FindTargetDestinationL( CCmPluginBase* aPlugin ); |
|
112 |
|
113 /** |
|
114 * Finds the parent destination of a connection method. |
|
115 * @param Id of the connection method |
|
116 * @return Id of the destination which contains cmId |
|
117 */ |
|
118 TUint32 FindParentDestinationL( TUint32 aCmId ); |
|
119 |
|
120 private: // data |
|
121 |
|
122 CAknWaitDialog* iCheckConnDlg; ///< Owned. |
|
123 TBool iCheckConnDlgCancelled; |
|
124 |
|
125 CCmManagerImpl& iCmManager; ///< Only a reference == not owned. |
|
126 CActiveSchedulerWait iWait; |
|
127 }; |
|
128 |
|
129 #endif // T_TCMWIZARD_H |
|