1 /* |
|
2 * Copyright (c) 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: AppUi class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __HTIADMIN_APPUI_H__ |
|
20 #define __HTIADMIN_APPUI_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknappui.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CHtiAdminAppView; |
|
27 class CHtiCfg; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * An instance of class CHtiAdminAppUi is the UserInterface part of the AVKON |
|
33 * application framework for the HtiAdmin application |
|
34 */ |
|
35 class CHtiAdminAppUi : public CAknAppUi |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Perform the second phase construction of a CHtiAdminAppUi object. |
|
40 * This needs to be public due to the way the framework constructs the AppUi |
|
41 */ |
|
42 void ConstructL(); |
|
43 |
|
44 /** |
|
45 * Perform the first phase of two phase construction. |
|
46 * This needs to be public due to the way the framework constructs the AppUi |
|
47 */ |
|
48 CHtiAdminAppUi(); |
|
49 |
|
50 |
|
51 /** |
|
52 * Destroy the object and release all memory objects. |
|
53 */ |
|
54 ~CHtiAdminAppUi(); |
|
55 |
|
56 /** |
|
57 * Tries to find the HTIFramework.exe process and open a handle to it. |
|
58 * @param aPrs on return contains an open handle to the HTIFramework.exe |
|
59 * process if process found and opened successfully |
|
60 * @return ETrue if process found and opened successfully, |
|
61 * otherwise EFalse |
|
62 */ |
|
63 TBool OpenHtiProcess( RProcess& aPrs ); |
|
64 |
|
65 /** |
|
66 * Updates the version text in the display. |
|
67 */ |
|
68 void UpdateVersion(); |
|
69 |
|
70 /** |
|
71 * Updates the HTI Framework process status in the display. |
|
72 */ |
|
73 void UpdateStatusL(); |
|
74 |
|
75 /** |
|
76 * Updates the HTI auto start status in the display. |
|
77 */ |
|
78 void UpdateAutoStartStatus(); |
|
79 |
|
80 /** |
|
81 * Updates the selected communication in the display. |
|
82 */ |
|
83 void UpdateSelectedComm(); |
|
84 |
|
85 /** |
|
86 * Kills the HtiWatchDog process if it is running. |
|
87 */ |
|
88 void KillHtiWatchDogL(); |
|
89 |
|
90 /** |
|
91 * Stops the timer issuing the periodical HTI Framework process |
|
92 * status checks. |
|
93 */ |
|
94 void KillTimer(); |
|
95 |
|
96 /** |
|
97 * The method called by the periodic timer. |
|
98 * @param aPtr pointer to this CHtiAdminAppUi instance |
|
99 * @return zero if the callback function should not be called again, |
|
100 * otherwise non-zero. Current implementation returns always ETrue. |
|
101 */ |
|
102 static TInt TimerCallBackL( TAny* aPtr ); |
|
103 |
|
104 public: // from CAknAppUi |
|
105 /** |
|
106 * Handle user menu selections |
|
107 * @param aCommand the enumerated code for the option selected |
|
108 */ |
|
109 void HandleCommandL( TInt aCommand ); |
|
110 |
|
111 /** |
|
112 * Updates the HTI Framework status information and starts the |
|
113 * periodical status polling when application comes to foreground - |
|
114 * stops the polling when going to background. |
|
115 * @param aForeground ETrue if the application is in the foreground, |
|
116 * otherwise EFalse |
|
117 */ |
|
118 void HandleForegroundEventL( TBool aForeground ); |
|
119 |
|
120 public: // from MEikMenuObserver |
|
121 /** |
|
122 * Used to initialize user menu content dynamically |
|
123 * @param aResourceId the resource id of the menu pane being initialised |
|
124 * @param aMenuPane the in-memory representation of the menu pane |
|
125 */ |
|
126 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane *aMenuPane ); |
|
127 |
|
128 private: |
|
129 void ShowBTListQueryL(); |
|
130 void ShowIPListQueryL(); |
|
131 void ShowCommsListQueryL(); |
|
132 void ShowCommsDBListQueryL(); |
|
133 void HandleBtByAddress(); |
|
134 void HandleBtByName(); |
|
135 void HandleBtSearch(); |
|
136 void HandleIPConnect(); |
|
137 void HandleIPListen(); |
|
138 |
|
139 void StartTimer(); |
|
140 |
|
141 private: |
|
142 |
|
143 // The application view |
|
144 CHtiAdminAppView* iAppView; |
|
145 |
|
146 // Timer triggering periodic checking of HTIFramework process status |
|
147 CPeriodic* iPeriodic; |
|
148 |
|
149 // For reading and writing HTI configuration files |
|
150 CHtiCfg* iHtiCfg; |
|
151 }; |
|
152 |
|
153 #endif // __HTIADMIN_APPUI_H__ |
|
154 |
|
155 // End of File |
|