|
1 /* |
|
2 * Copyright (c) 2002 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: view class |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CONNECTIONMONITORUI_VIEW_H |
|
21 #define CONNECTIONMONITORUI_VIEW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <aknview.h> |
|
25 #include <aknlists.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // UID of view |
|
30 const TUid KConnectionsViewId = {2}; |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CConnectionMonitorUiContainer; |
|
34 class CConnectionArray; |
|
35 class CActiveWrapper; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * CConnectionMonitorUiView view class. |
|
40 */ |
|
41 class CConnectionMonitorUiView : public CAknView, public MEikListBoxObserver |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 /** |
|
45 * Constructor |
|
46 * @param aConnectionArray array contains connection infos |
|
47 * @param aMonitor Connection Monitor engine session |
|
48 * @param aActiveWrapper the for refreshing |
|
49 */ |
|
50 #ifdef RD_CONTROL_PANEL |
|
51 CConnectionMonitorUiView( CConnectionArray* const aConnectionArray, |
|
52 RConnectionMonitor* aMonitor, |
|
53 TBool aIsEmbedded, |
|
54 CActiveWrapper* aActiveWrapper ); |
|
55 #else |
|
56 CConnectionMonitorUiView( CConnectionArray* const aConnectionArray, |
|
57 RConnectionMonitor* aMonitor, |
|
58 CActiveWrapper* aActiveWrapper ); |
|
59 #endif // RD_CONTROL_PANEL |
|
60 |
|
61 /** |
|
62 * EPOC default constructor. |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 ~CConnectionMonitorUiView(); |
|
70 |
|
71 public: // Functions from base classes |
|
72 /** |
|
73 * From AknView |
|
74 */ |
|
75 TUid Id() const; |
|
76 |
|
77 /** |
|
78 * From AknView |
|
79 */ |
|
80 void HandleCommandL( TInt aCommand ); |
|
81 |
|
82 /** |
|
83 * From MEikMenuObserver |
|
84 * Dynamic handling of menus. |
|
85 */ |
|
86 virtual void DynInitMenuPaneL( TInt aResourceId, |
|
87 CEikMenuPane* aMenuPane ); |
|
88 |
|
89 /** |
|
90 * Observe the connection stat and set the right Soft Keys. |
|
91 */ |
|
92 void ConnectionKeyObserver() const; |
|
93 |
|
94 |
|
95 protected: |
|
96 /** |
|
97 * from MEikListBoxObserver |
|
98 */ |
|
99 void HandleListBoxEventL( CEikListBox* aListBox, |
|
100 TListBoxEvent aEventType ); |
|
101 |
|
102 protected: |
|
103 /** |
|
104 * From AknView |
|
105 */ |
|
106 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
107 TUid aCustomMessageId, |
|
108 const TDesC8& aCustomMessage ); |
|
109 |
|
110 /** |
|
111 * From AknView |
|
112 */ |
|
113 void DoDeactivate(); |
|
114 |
|
115 /** |
|
116 * Sets the tile pane to the given resource. |
|
117 * @param aResourceId the id of resource string |
|
118 */ |
|
119 void SetTitlePaneTextL( TInt aResourceId ); |
|
120 |
|
121 private: |
|
122 /** |
|
123 * Brings up details view. |
|
124 */ |
|
125 void BringupDetailsViewL(); |
|
126 |
|
127 /** |
|
128 * Check if selecred connection is Alilve or not |
|
129 * @return if the selected connection is alive ETrue, oterwise EFalse |
|
130 */ |
|
131 TBool IsSelectedConnectionAlive() const; |
|
132 |
|
133 /** |
|
134 * Check if selecred connection is Suspended or not |
|
135 * @return if the selected connection is alive ETrue, oterwise EFalse |
|
136 */ |
|
137 TBool IsSelectedConnectionSuspended() const; |
|
138 |
|
139 private: // Data |
|
140 /** |
|
141 * Continer instance of view. |
|
142 */ |
|
143 CConnectionMonitorUiContainer* iContainer; // Owned |
|
144 |
|
145 /** |
|
146 * Constant pointe to array of connections. |
|
147 */ |
|
148 CConnectionArray* const iConnectionArray; // Not Owned |
|
149 |
|
150 /** |
|
151 * Pointer to RConnectionMonitor for deleting connection(s). |
|
152 */ |
|
153 RConnectionMonitor* iMonitor; // Not Owned |
|
154 |
|
155 /** |
|
156 * ETrue if Help is supported, EFalse otherwise. |
|
157 */ |
|
158 TBool isHelpSupported; |
|
159 |
|
160 #ifdef RD_CONTROL_PANEL |
|
161 |
|
162 /** |
|
163 * ETrue: The application is launched in embedded mode. |
|
164 * EFalse: The application is launched in standalone mode. |
|
165 */ |
|
166 TBool iIsEmbedded; |
|
167 |
|
168 #endif // RD_CONTROL_PANEL |
|
169 |
|
170 /** |
|
171 * The active object for info. refreshing. NOT Owned. |
|
172 */ |
|
173 CActiveWrapper* iActiveWrapper; |
|
174 }; |
|
175 |
|
176 #endif // CONNECTIONMONITORUI_VIEW_H |
|
177 |
|
178 // End of File |