|
1 /* |
|
2 * Copyright (c) 2002-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __ECMTGUI_APPUI_H__ |
|
21 #define __ECMTGUI_APPUI_H__ |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <aknviewappui.h> |
|
25 #include "EcmtClient.h" |
|
26 #include "EcmtServerObserver.h" |
|
27 #include <aknnotewrappers.h> |
|
28 /** |
|
29 * @defgroup EcmtGUi Gui |
|
30 * The Gui component is used in the device to show to the user selected |
|
31 * information on the status of the Ecmt Framework. It also launches the |
|
32 * Ecmt Server process using the REcmt class. |
|
33 */ |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CEcmtGuiLogView; |
|
37 class CEcmtGuiSettingsView; |
|
38 class CWlanOddSettingView; |
|
39 |
|
40 //Define this if you want to enable settings under emulator environment |
|
41 //#define _ENABLE_SETINGS_ON_WINS_ |
|
42 // CLASS DECLARATION |
|
43 |
|
44 /** |
|
45 * @ingroup EcmtGui |
|
46 */ |
|
47 class CEcmtGuiAppUi : public CAknViewAppUi, public MEcmtServerObserver |
|
48 { |
|
49 |
|
50 |
|
51 public: |
|
52 void ConstructL(); |
|
53 CEcmtGuiAppUi(); |
|
54 ~CEcmtGuiAppUi(); |
|
55 |
|
56 public: |
|
57 void HandleCommandL(TInt aCommand); |
|
58 void HandleResourceChangeL(TInt aType); |
|
59 |
|
60 /** |
|
61 * From MEcmtServerObserver. Handles the notification messages |
|
62 * received from Ecmt server and displays them in the view. |
|
63 * @param aMsg Notification message from Ecmt server. |
|
64 * @param aError Completion code of message reception from server. |
|
65 * Either KErrNone if notification message was received succesfully |
|
66 * or one of the system wide error codes. |
|
67 */ |
|
68 void HandleEcmtServerNotification( const TDesC& aMsg, TInt aError ); |
|
69 |
|
70 private: |
|
71 /** |
|
72 * Connects to Ecmt using REcmt::Connect() and displays |
|
73 * status on view. |
|
74 */ |
|
75 void ConnectEcmtL(); |
|
76 |
|
77 /** |
|
78 * Disconnects from Ecmt using REcmt::Close() and displays |
|
79 * status on view. |
|
80 */ |
|
81 void DisconnectEcmt(); |
|
82 |
|
83 private: |
|
84 CEcmtGuiLogView* iLogView; |
|
85 CEcmtGuiSettingsView* iSettingsView; |
|
86 /** |
|
87 * pointer to CWlanOddSettingView. used to create new view for wlan odd application |
|
88 */ |
|
89 CWlanOddSettingView* iWlanOdd; |
|
90 |
|
91 REcmt iEcmt; |
|
92 TBool iConnected; |
|
93 enum { KMaxLogMsgLen = 128 }; |
|
94 |
|
95 }; |
|
96 |
|
97 #endif // __ECMTGUI_APPUI_H__ |
|
98 |