|
1 /* |
|
2 * Copyright (c) 2007 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 for LogContainer. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __ECMTGUI_LOGVIEW_H__ |
|
20 #define __ECMTGUI_LOGVIEW_H__ |
|
21 |
|
22 #include <aknlists.h> |
|
23 #include <aknview.h> |
|
24 |
|
25 class CEcmtGuiLogContainer; |
|
26 |
|
27 |
|
28 /** |
|
29 * View class for the LogContainer. |
|
30 * |
|
31 * @since S60 v3.1 |
|
32 */ |
|
33 class CEcmtGuiLogView : public CAknView |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 */ |
|
41 static CEcmtGuiLogView* NewL(); |
|
42 |
|
43 public: //New functions |
|
44 |
|
45 /** |
|
46 * Getter for log container reference. |
|
47 * |
|
48 * @return A reference to CEcmtGuiLogContainer. |
|
49 */ |
|
50 CEcmtGuiLogContainer& LogContainer(); |
|
51 |
|
52 /** |
|
53 * Loads log message from resource and adds it to the listbox. |
|
54 * |
|
55 * @param aMsgResId A resource id of the message. |
|
56 */ |
|
57 void LogMessageL( TInt aMsgResId ); |
|
58 |
|
59 /** |
|
60 * Adds log message to the listbox. |
|
61 * |
|
62 * @param aMsg Log message string. |
|
63 */ |
|
64 void LogMessageL( const TDesC& aMsg ); |
|
65 |
|
66 /** |
|
67 * Clears the log. |
|
68 */ |
|
69 void ClearLogL(); |
|
70 |
|
71 /** |
|
72 * Setter for iConnected. |
|
73 * |
|
74 * @param aConnected A new value for iConnected. |
|
75 */ |
|
76 void SetConnected( TBool aConnected ); |
|
77 |
|
78 /** |
|
79 * Getter for Ecmt Server connectivity state. |
|
80 * |
|
81 * @return Boolean representing is Ecmt Server in connected state. |
|
82 */ |
|
83 TBool IsConnected(); |
|
84 |
|
85 /** |
|
86 * Called by HandleResourceChangeL() from CEcmtGuiAppUi when layout |
|
87 * is changed. |
|
88 * |
|
89 * @param aType Type of resources that have changed |
|
90 */ |
|
91 void HandleSizeChange( TInt aType ); |
|
92 |
|
93 public: // From MEikAutoMenuObserver |
|
94 |
|
95 /** |
|
96 * From MEikAutoMenuObserver. |
|
97 * Dynamically initialises a menu pane. |
|
98 * |
|
99 * @param aResourceId Menu pane resource id. |
|
100 * @param aMenuPane The in-memory representation of the menu pane. |
|
101 */ |
|
102 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane); |
|
103 |
|
104 private: //From CAknView. |
|
105 |
|
106 /** |
|
107 * From CAknView. |
|
108 * Returns views id. |
|
109 * |
|
110 * @return Id for this view. |
|
111 */ |
|
112 TUid Id() const; |
|
113 |
|
114 /** |
|
115 * From CAknView. |
|
116 * Handles commands |
|
117 * |
|
118 * @param aCommand A command to be handled. |
|
119 */ |
|
120 void HandleCommandL( TInt aCommand ); |
|
121 |
|
122 /** |
|
123 * From CAknView. |
|
124 * Activates view |
|
125 * |
|
126 * @param aPrevViewId Specifies the view previously active. |
|
127 * @param aCustomMessageId Specifies the message type. |
|
128 * @param aCustomMessage The activation message. |
|
129 */ |
|
130 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
131 TUid aCustomMessageId, |
|
132 const TDesC8& aCustomMessage ); |
|
133 |
|
134 /** |
|
135 * From CAknView. |
|
136 * Deactivates view. |
|
137 */ |
|
138 void DoDeactivate(); |
|
139 |
|
140 private: |
|
141 |
|
142 /** |
|
143 * By default Symbian 2nd phase constructor is private. |
|
144 */ |
|
145 void ConstructL(); |
|
146 |
|
147 /** |
|
148 * C++ default constructor. |
|
149 */ |
|
150 CEcmtGuiLogView(); |
|
151 |
|
152 /** |
|
153 * Destructor. |
|
154 */ |
|
155 ~CEcmtGuiLogView(); |
|
156 |
|
157 private: |
|
158 |
|
159 /** |
|
160 * Container. |
|
161 * Own. |
|
162 */ |
|
163 CEcmtGuiLogContainer* iContainer; |
|
164 |
|
165 /** |
|
166 * List for log messages. Container modifies this. |
|
167 * Own. |
|
168 */ |
|
169 CDesCArrayFlat* iMessageList; |
|
170 |
|
171 /** |
|
172 * Boolean indicating is Ecmt Server in connected state. |
|
173 */ |
|
174 TBool iConnected; |
|
175 |
|
176 |
|
177 }; |
|
178 |
|
179 #endif // __ECMTGUI_LOGVIEW_H__ |