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: Implementation of HtiAdmin main. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HTIENGINEWRAPPER_H |
|
19 #define HTIENGINEWRAPPER_H |
|
20 |
|
21 #include <e32cmn.h> |
|
22 #include <qobject.h> |
|
23 #include <qstringlist.h> |
|
24 |
|
25 class CHtiAdminEngine; |
|
26 class QString; |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 /** |
|
32 * class that is used for communicating between Symbian and Qt code. |
|
33 */ |
|
34 class HtiEngineWrapper : public QObject |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 enum AutoStartStatus{ |
|
39 AutoStartDisabled, |
|
40 AutoStartEnabled, |
|
41 AutoStartUnknown |
|
42 }; |
|
43 |
|
44 enum HtiStatus{ |
|
45 Running, |
|
46 Stopped, |
|
47 Panic, |
|
48 Error |
|
49 }; |
|
50 |
|
51 /** |
|
52 * Constructor |
|
53 */ |
|
54 HtiEngineWrapper(); |
|
55 |
|
56 /** |
|
57 * Destructor |
|
58 */ |
|
59 ~HtiEngineWrapper(); |
|
60 |
|
61 |
|
62 bool init(); |
|
63 bool stopHti(); |
|
64 bool startHti(); |
|
65 bool enableBtByAddress(QString& address); |
|
66 bool enableBtByName(QString& address); |
|
67 bool ipListen(QString& port, QString& iap); |
|
68 bool ipConnect(QString& host, QString& port, QString& iap); |
|
69 bool enableSerial(QString& commPort); |
|
70 bool btSearch(); |
|
71 bool enableOtherComm(QString& pluginName); |
|
72 bool setPriorityBackground(); |
|
73 bool setPriorityForeground(); |
|
74 bool setPriorityHigh(); |
|
75 bool setPriorityAbsoluteHigh(); |
|
76 bool watchDogEnable(bool enable); |
|
77 bool autoStartEnable(bool enable); |
|
78 bool consoleEnable(bool enable); |
|
79 bool errorDialogsEnable(bool enable); |
|
80 bool setHtiCfgParam(QString& paramName, QString& paramValue); |
|
81 bool getHtiCfgParam(QString& paramName, QString& paramValue); |
|
82 bool setBtCfgParam(QString& paramName, QString& paramValue); |
|
83 bool getBtCfgParam(QString& paramName, QString& paramValue); |
|
84 bool setSerialCfgParam(QString& paramName, QString& paramValue); |
|
85 bool getSerialCfgParam(QString& paramName, QString& paramValue); |
|
86 bool setIPCfgParam(QString& paramName, QString& paramValue); |
|
87 bool getIPCfgParam(QString& paramName, QString& paramValue); |
|
88 void getVersionIfo(QString& version); |
|
89 bool updateStatuses(); |
|
90 bool listCommPlugins(); |
|
91 bool listIAPs(QStringList& list); |
|
92 bool getSelectedComm(QString& commName); |
|
93 |
|
94 //Called from engine side |
|
95 void updateStatus(HtiStatus status); |
|
96 void updateSelectedComm(const TDesC& aText); |
|
97 void updateAutostartStatus(AutoStartStatus status); |
|
98 void updateConsoleStatus(bool bEnabled); |
|
99 void updateWatchDogStatus(bool bEnabled); |
|
100 void updateCommDetails(const TDesC& aText); |
|
101 |
|
102 |
|
103 |
|
104 signals: |
|
105 void statusChanged(HtiEngineWrapper::HtiStatus status); |
|
106 void commSet(QString& statusText); |
|
107 void commDetails(QString& statusText); |
|
108 void commPluginsRetrieved(QStringList& pluginNames); |
|
109 void autostartSet(HtiEngineWrapper::AutoStartStatus status); |
|
110 void consoleSet(bool enabled); |
|
111 void watchDogSet(bool enabled); |
|
112 |
|
113 private: |
|
114 CHtiAdminEngine* iEngine; |
|
115 QString iSelectedCommText; |
|
116 QString iCommDetailsText; |
|
117 QStringList iPluginNames; |
|
118 |
|
119 }; |
|
120 |
|
121 #endif //HTIENGINEWRAPPER_H |
|