1 /* |
|
2 * Copyright (c) 2005-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: MPM class used for disconnect dialog initiation |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file mpmdisconnectdlg.h |
|
20 Mobility Policy Manager disconnect dialog initiation class. |
|
21 */ |
|
22 |
|
23 #ifndef MPMDISCONNECTDLG_H |
|
24 #define MPMDISCONNECTDLG_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 #include <DisconnectDlgClient.h> |
|
29 #include "mpmserversession.h" |
|
30 #include "mpmdialogbase.h" |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * MPM disconnect dialog initiation class definition. |
|
35 * |
|
36 * @lib MPMServer.exe |
|
37 * @since 3.1 |
|
38 */ |
|
39 class CMPMDisconnectDlg : protected CMPMDialogBase |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CMPMDisconnectDlg* NewL( |
|
46 CMPMServerSession& aSession, |
|
47 TInt aOrigError, |
|
48 CArrayPtrFlat<CMPMDisconnectDlg>& aDisconnectQueue ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CMPMDisconnectDlg(); |
|
54 |
|
55 protected: // New functions |
|
56 |
|
57 /** |
|
58 * Start Dlg. |
|
59 * @param aDlg previous same type of dlg in case its response could |
|
60 * be utilized. |
|
61 */ |
|
62 virtual void Start( CMPMDialogBase* aDlg ); |
|
63 |
|
64 /** |
|
65 * User selected Ok in Disconnect Dialog. |
|
66 * @since 3.2 |
|
67 * @param aError Error code from dialog |
|
68 * @param aIapId Id of the Iap from terminated connection |
|
69 */ |
|
70 void UserSelectedOk( TInt aError ); |
|
71 |
|
72 /** |
|
73 * User selected Cancel in Disconnect Dialog. |
|
74 * @since 3.2 |
|
75 * @param aError Error code from dialog |
|
76 */ |
|
77 void UserSelectedCancel( TInt aError ); |
|
78 |
|
79 protected: // Functions from base classes |
|
80 |
|
81 /** |
|
82 * From CActive. Cancels UI dialog. |
|
83 * @since 3.1 |
|
84 */ |
|
85 void DoCancel(); |
|
86 |
|
87 /** |
|
88 * From CActive. Run when UI dialog finished. |
|
89 * @since 3.1 |
|
90 */ |
|
91 void RunL(); |
|
92 |
|
93 /** |
|
94 * From CActive. Run if RunL leaves. |
|
95 * @since 3.1 |
|
96 * @param aError Error that caused leave. |
|
97 * @return KErrNone |
|
98 */ |
|
99 TInt RunError (TInt aError); |
|
100 |
|
101 private: // New methods |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CMPMDisconnectDlg( |
|
107 CMPMServerSession& aSession, |
|
108 TInt aOrigError, |
|
109 CArrayPtrFlat<CMPMDisconnectDlg>& aDisconnectQueue ); |
|
110 |
|
111 /** |
|
112 * 2nd phase constructor. |
|
113 */ |
|
114 void ConstructL(); |
|
115 protected: |
|
116 TInt iUserStatus; |
|
117 TInt iUserIap; |
|
118 |
|
119 private: // Data |
|
120 // Disconnect Dialog Server |
|
121 RDisconnectDlgServer iDlgServ; |
|
122 |
|
123 // Session object reference |
|
124 CMPMServerSession& iSession; |
|
125 |
|
126 // IAP of the closed connection |
|
127 TUint32 iIapId; |
|
128 |
|
129 // Original error code reported by Bearer Manager |
|
130 TInt iOrigError; |
|
131 }; |
|
132 |
|
133 |
|
134 #endif // MPMDISCONNECTDLG_H |
|
135 |
|
136 // End of file |
|