summaryrefslogtreecommitdiff
authorkorovkin <korovkin>2006-04-20 12:37:33 (UTC)
committer korovkin <korovkin>2006-04-20 12:37:33 (UTC)
commitfce7a143353e2bdd41d878c6f0a1224e0f2a158e (patch) (unidiff)
tree41fc68d13e148b8979dde51401ce160f10197a6c
parent6d3a8eaf3b92f8eec9908eed91568342fac5de1d (diff)
downloadopie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.zip
opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.tar.gz
opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.tar.bz2
Added services configuration dialog.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/.cvsignore4
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp30
-rw-r--r--noncore/net/opietooth/manager/bluebase.h1
-rw-r--r--noncore/net/opietooth/manager/bluetoothbase.ui43
-rw-r--r--noncore/net/opietooth/manager/btconfhandler.cpp391
-rw-r--r--noncore/net/opietooth/manager/btconfhandler.h126
-rw-r--r--noncore/net/opietooth/manager/manager.pro9
-rw-r--r--noncore/net/opietooth/manager/servicesdialog.cpp120
-rw-r--r--noncore/net/opietooth/manager/servicesdialog.h30
-rw-r--r--noncore/net/opietooth/manager/servicesdialogbase.ui658
10 files changed, 1387 insertions, 25 deletions
diff --git a/noncore/net/opietooth/manager/.cvsignore b/noncore/net/opietooth/manager/.cvsignore
index 019226e..ca2d996 100644
--- a/noncore/net/opietooth/manager/.cvsignore
+++ b/noncore/net/opietooth/manager/.cvsignore
@@ -8,8 +8,12 @@ moc_*
8scandialog.cpp 8scandialog.cpp
9scandialog.h 9scandialog.h
10rfcommassigndialogbase.cpp 10rfcommassigndialogbase.cpp
11rfcommassigndialogbase.h 11rfcommassigndialogbase.h
12rfcommdialogitembase.cpp 12rfcommdialogitembase.cpp
13rfcommdialogitembase.h 13rfcommdialogitembase.h
14servicesdialogbase.cpp
15servicesdialogbase.h
16obexftpdialogbase.cpp
17obexftpdialogbase.h
14.moc* 18.moc*
15.obj 19.obj
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 924d191..13954c5 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -19,12 +19,13 @@
19#include "scandialog.h" 19#include "scandialog.h"
20#include "hciconfwrapper.h" 20#include "hciconfwrapper.h"
21#include "devicehandler.h" 21#include "devicehandler.h"
22#include "btconnectionitem.h" 22#include "btconnectionitem.h"
23#include "rfcommassigndialogimpl.h" 23#include "rfcommassigndialogimpl.h"
24#include "forwarder.h" 24#include "forwarder.h"
25#include "servicesdialog.h"
25#include <termios.h> 26#include <termios.h>
26#include <string.h> 27#include <string.h>
27#include <errno.h> 28#include <errno.h>
28 29
29/* OPIE */ 30/* OPIE */
30#include <qpe/qpeapplication.h> 31#include <qpe/qpeapplication.h>
@@ -93,12 +94,13 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
93 connect( m_localDevice, SIGNAL( connections(ConnectionState::ValueList) ), 94 connect( m_localDevice, SIGNAL( connections(ConnectionState::ValueList) ),
94 this, SLOT( addConnectedDevices(ConnectionState::ValueList) ) ); 95 this, SLOT( addConnectedDevices(ConnectionState::ValueList) ) );
95 connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ), 96 connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ),
96 this, SLOT( addSignalStrength(const QString&,const QString&) ) ); 97 this, SLOT( addSignalStrength(const QString&,const QString&) ) );
97 connect(runButton, SIGNAL(clicked()), this, SLOT(doForward())); 98 connect(runButton, SIGNAL(clicked()), this, SLOT(doForward()));
98 connect(encCheckBox, SIGNAL(toggled(bool)), this, SLOT(doEncrypt(bool))); 99 connect(encCheckBox, SIGNAL(toggled(bool)), this, SLOT(doEncrypt(bool)));
100 connect(servicesEditButton, SIGNAL(clicked()), this, SLOT(editServices()));
99 101
100 // let hold be rightButtonClicked() 102 // let hold be rightButtonClicked()
101 QPEApplication::setStylusOperation( devicesView->viewport(), QPEApplication::RightOnHold); 103 QPEApplication::setStylusOperation( devicesView->viewport(), QPEApplication::RightOnHold);
102 QPEApplication::setStylusOperation( connectionsView->viewport(), QPEApplication::RightOnHold); 104 QPEApplication::setStylusOperation( connectionsView->viewport(), QPEApplication::RightOnHold);
103 105
104 //Load all icons needed 106 //Load all icons needed
@@ -124,18 +126,12 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
124 writeToHciConfig(); 126 writeToHciConfig();
125 addConnectedDevices(); 127 addConnectedDevices();
126 readSavedDevices(); 128 readSavedDevices();
127 addServicesToDevices(); 129 addServicesToDevices();
128 QTimer::singleShot( 3000, this, SLOT( addServicesToDevices() ) ); 130 QTimer::singleShot( 3000, this, SLOT( addServicesToDevices() ) );
129 forwarder = NULL; 131 forwarder = NULL;
130 serDevName->setText(tr("/dev/ircomm0"));
131 for (unsigned int i = 0; i < (sizeof(speeds) / sizeof(speeds[0])); i++) {
132 serSpeed->insertItem(speeds[i].str);
133 }
134 serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1);
135 encCheckBox->setChecked(true);
136} 132}
137 133
138/** 134/**
139 * Reads all options from the config file 135 * Reads all options from the config file
140 */ 136 */
141void BlueBase::readConfig() 137void BlueBase::readConfig()
@@ -250,12 +246,18 @@ void BlueBase::initGui()
250 pagescanCheckBox->setChecked( m_enablePagescan ); 246 pagescanCheckBox->setChecked( m_enablePagescan );
251 inquiryscanCheckBox->setChecked( m_enableInquiryscan ); 247 inquiryscanCheckBox->setChecked( m_enableInquiryscan );
252 deviceNameLine->setText( m_deviceName ); 248 deviceNameLine->setText( m_deviceName );
253 passkeyLine->setText( m_defaultPasskey ); 249 passkeyLine->setText( m_defaultPasskey );
254 // set info tab 250 // set info tab
255 setInfo(); 251 setInfo();
252 serDevName->setText(tr("/dev/ircomm0"));
253 for (unsigned int i = 0; i < (sizeof(speeds) / sizeof(speeds[0])); i++) {
254 serSpeed->insertItem(speeds[i].str);
255 }
256 serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1);
257 encCheckBox->setChecked(true);
256} 258}
257 259
258 260
259/** 261/**
260 * Get the status informations and returns it 262 * Get the status informations and returns it
261 * @return QString the status informations gathered 263 * @return QString the status informations gathered
@@ -757,7 +759,23 @@ void BlueBase::forwardExit(Opie::Core::OProcess* proc)
757 */ 759 */
758void BlueBase::doEncrypt(bool doit) 760void BlueBase::doEncrypt(bool doit)
759{ 761{
760 passkeyLine->setEchoMode((doit)? QLineEdit::Password: QLineEdit::Normal); 762 passkeyLine->setEchoMode((doit)? QLineEdit::Password: QLineEdit::Normal);
761} 763}
762 764
765/**
766 * Start services edit dialog
767 */
768void BlueBase::editServices()
769{
770 QString conf = "/etc/default/bluetooth";
771//// Use for debugging purposes
772//// QString conf = "/mnt/net/opie/bin/bluetooth";
773 ServicesDialog svcEdit(conf, this, "ServicesDialog", true,
774 WStyle_ContextHelp);
775
776 if (QPEApplication::execDialog(&svcEdit) == QDialog::Accepted)
777 {
778 }
779}
780
763//eof 781//eof
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index 9cbea56..d3e21f4 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -93,12 +93,13 @@ namespace OpieTooth {
93 void startServiceActionHold( QListViewItem *, const QPoint &, int ); 93 void startServiceActionHold( QListViewItem *, const QPoint &, int );
94 void deviceActive( const QString& mac, bool connected ); 94 void deviceActive( const QString& mac, bool connected );
95 void applyConfigChanges(); 95 void applyConfigChanges();
96 void doForward(); 96 void doForward();
97 void doEncrypt(bool); 97 void doEncrypt(bool);
98 void forwardExit(Opie::Core::OProcess* proc); 98 void forwardExit(Opie::Core::OProcess* proc);
99 void editServices();
99 void addSignalStrength(); 100 void addSignalStrength();
100 void addSignalStrength( const QString& mac, const QString& strengh ); 101 void addSignalStrength( const QString& mac, const QString& strengh );
101 void rfcommDialog(); 102 void rfcommDialog();
102 103
103 }; 104 };
104 105
diff --git a/noncore/net/opietooth/manager/bluetoothbase.ui b/noncore/net/opietooth/manager/bluetoothbase.ui
index 5539181..350da63 100644
--- a/noncore/net/opietooth/manager/bluetoothbase.ui
+++ b/noncore/net/opietooth/manager/bluetoothbase.ui
@@ -8,13 +8,13 @@
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>273</width> 14 <width>269</width>
15 <height>368</height> 15 <height>368</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Form1</string> 20 <string>Form1</string>
@@ -191,33 +191,22 @@
191 <cstring>tab</cstring> 191 <cstring>tab</cstring>
192 </property> 192 </property>
193 <attribute> 193 <attribute>
194 <name>title</name> 194 <name>title</name>
195 <string>Config</string> 195 <string>Config</string>
196 </attribute> 196 </attribute>
197 <grid> 197 <vbox>
198 <property stdset="1"> 198 <property stdset="1">
199 <name>margin</name> 199 <name>margin</name>
200 <number>4</number> 200 <number>2</number>
201 </property> 201 </property>
202 <property stdset="1"> 202 <property stdset="1">
203 <name>spacing</name> 203 <name>spacing</name>
204 <number>2</number> 204 <number>2</number>
205 </property> 205 </property>
206 <widget row="1" column="0" > 206 <widget>
207 <class>QPushButton</class>
208 <property stdset="1">
209 <name>name</name>
210 <cstring>rfcommBindButton</cstring>
211 </property>
212 <property stdset="1">
213 <name>text</name>
214 <string>&amp;Edit RFCOMM Bind Table</string>
215 </property>
216 </widget>
217 <widget row="0" column="0" >
218 <class>QGroupBox</class> 207 <class>QGroupBox</class>
219 <property stdset="1"> 208 <property stdset="1">
220 <name>name</name> 209 <name>name</name>
221 <cstring>GroupBox1</cstring> 210 <cstring>GroupBox1</cstring>
222 </property> 211 </property>
223 <property stdset="1"> 212 <property stdset="1">
@@ -344,13 +333,35 @@
344 <name>text</name> 333 <name>text</name>
345 <string>Apply</string> 334 <string>Apply</string>
346 </property> 335 </property>
347 </widget> 336 </widget>
348 </grid> 337 </grid>
349 </widget> 338 </widget>
350 </grid> 339 <widget>
340 <class>QPushButton</class>
341 <property stdset="1">
342 <name>name</name>
343 <cstring>servicesEditButton</cstring>
344 </property>
345 <property stdset="1">
346 <name>text</name>
347 <string>Edit Services Configuration</string>
348 </property>
349 </widget>
350 <widget>
351 <class>QPushButton</class>
352 <property stdset="1">
353 <name>name</name>
354 <cstring>rfcommBindButton</cstring>
355 </property>
356 <property stdset="1">
357 <name>text</name>
358 <string>&amp;Edit RFCOMM Bind Table</string>
359 </property>
360 </widget>
361 </vbox>
351 </widget> 362 </widget>
352 <widget> 363 <widget>
353 <class>QWidget</class> 364 <class>QWidget</class>
354 <property stdset="1"> 365 <property stdset="1">
355 <name>name</name> 366 <name>name</name>
356 <cstring>tab</cstring> 367 <cstring>tab</cstring>
diff --git a/noncore/net/opietooth/manager/btconfhandler.cpp b/noncore/net/opietooth/manager/btconfhandler.cpp
new file mode 100644
index 0000000..0048993
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btconfhandler.cpp
@@ -0,0 +1,391 @@
1/* $Id$ */
2/* Bluetooth services configuration file handler */
3/***************************************************************************
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 ***************************************************************************/
11#include "btconfhandler.h"
12#include <string.h>
13#include <stdlib.h>
14#include <getopt.h>
15#include <qstring.h>
16#include <qstringlist.h>
17#include <qfile.h>
18#include <qtextstream.h>
19#include <opie2/odebug.h>
20
21//Keywords
22static QCString k_hcidEnable("HCID_ENABLE=");
23static QCString k_hiddEnable("HIDD_ENABLE=");
24static QCString k_sdpdEnable("SDPD_ENABLE=");
25static QCString k_rfcommEnable("RFCOMM_ENABLE=");
26static QCString k_dundEnable("DUND_ENABLE=");
27static QCString k_pandEnable("PAND_ENABLE=");
28static QCString k_pandOpts("PAND_OPTIONS=");
29static QCString k_dundOpts("DUND_OPTIONS=");
30
31const struct option pandCLOpts[] = //Pand command line options
32{
33 { "listen", 0, NULL, 's' },
34 { "encrypt", 0, NULL, 'E' },
35 { "secure", 0, NULL, 'S' },
36 { "master", 0, NULL, 'M' },
37 { "nosdp", 0, NULL, 'D' },
38 { "role", 1, NULL, 'r' },
39 { "persist", 0, NULL, 'p' },
40 { "cache", 0, NULL, 'C' },
41 { NULL, 0, NULL, 0 } //Marker of the end
42};
43
44const struct option dundCLOpts[] = //Pand command line options
45{
46 { "listen", 0, NULL, 's' },
47 { "nosdp", 0, NULL, 'D' },
48 { "persist", 0, NULL, 'p' },
49 { "cache", 0, NULL, 'C' },
50 { "msdun", 0, NULL, 'X' },
51 { "channel", 1, NULL, 'P' },
52 { "pppd", 1, NULL, 'd' },
53 { NULL, 0, NULL, 0 } //Marker of the end
54};
55
56using namespace OpieTooth;
57BTConfHandler::BTConfHandler(const QString& conf): confName(conf)
58{
59 hcidEnable = false;
60 hiddEnable = false;
61 sdpdEnable = false;
62 rfcommEnable = false;
63
64 //dund parameters
65 dundEnable = false;
66 dundDisableSDP = false;
67 dundPersist = false;
68 dundPersistPeriod = "";
69 dundCache = false;
70 dundCachePeriod = "";
71 dundMsdun = false;
72 dundMsdunTimeout = "";
73 dundChannel = "1";
74 dundPPPd = false;
75 dundPPPdPath = "";
76 dundPPPdOptions = "";
77
78 //pandparameters
79 pandEnable = false;
80 pandEncrypt = false;
81 pandSecure = false;
82 pandMaster = false;
83 pandDisableSDP = false;
84 pandRole = "";
85 pandPersist = false;
86 pandPersistPeriod = "";
87 pandCache = false;
88 pandCachePeriod = "";
89
90 readConfig(confName);
91}
92
93BTConfHandler::~BTConfHandler()
94{
95}
96
97/**
98 * getBoolArg
99 * Gets boolean argument from a string str with a keyword key
100 */
101bool BTConfHandler::getBoolArg(QString& str, QCString& keyword)
102{
103 QString arg = str.mid(keyword.length(), str.length() - keyword.length());
104 return (bool)(arg == "true");
105}
106
107/**
108 * getStringArg
109 * Gets string argument from a string str with a keyword key
110 */
111QString BTConfHandler::getStringArg(QString& str, QCString& keyword)
112{
113 QString arg = str.mid(keyword.length(), str.length() - keyword.length());
114 if (arg.left(1) == "\"")
115 arg.remove(0, 1);
116 if (arg.right(1) == "\"")
117 arg.remove(arg.length() - 1, 1);
118 return arg;
119}
120
121/**
122 * parsePanParameters
123 * Function gets PAND parameters from the command line conf
124 */
125void BTConfHandler::parsePanParameters(const QString& conf)
126{
127 int i; //just an index variable
128 int argc;
129 QStringList panList = QStringList::split(" ", conf);
130 argc = panList.count();
131 char* argv[argc + 1];
132 int shOpt;
133 i = 1;
134 optind = 0;
135 argv[0] = strdup("pand");
136 for (QStringList::Iterator arg = panList.begin();
137 arg != panList.end() && i < argc + 1; arg++, i++) {
138 argv[i] = strdup((*arg));
139 }
140 do {
141 shOpt = getopt_long(argc + 1, argv, "sESMDr:p:C:", pandCLOpts, NULL);
142 switch(shOpt) {
143 case 'E':
144 pandEncrypt = true;
145 break;
146 case 'S':
147 pandSecure = true;
148 break;
149 case 'M':
150 pandMaster = true;
151 break;
152 case 'D':
153 pandDisableSDP = true;
154 break;
155 case 'r':
156 if (optarg)
157 pandRole = optarg;
158 else
159 pandRole = "NG";
160 break;
161 case 'p':
162 pandPersist = true;
163 if (optarg)
164 pandPersistPeriod = optarg;
165 break;
166 case 'C':
167 pandCache = true;
168 if (optarg)
169 pandCachePeriod = optarg;
170 break;
171 case 's':
172 case '?':
173 default:
174 break;
175 }
176 } while (shOpt != -1);
177 for (i = 0; i < argc + 1; i++) {
178 free(argv[i]);
179 }
180}
181
182/**
183 * parseDunParameters
184 * Function gets PAND parameters from the command line conf
185 */
186void BTConfHandler::parseDunParameters(const QString& conf)
187{
188 int i; //just an index variable
189 int argc;
190 QStringList dunList = QStringList::split(" ", conf);
191 argc = dunList.count();
192 char* argv[argc + 1];
193 int shOpt;
194 i = 1;
195 optind = 0;
196 argv[0] = strdup("dund");
197 for (QStringList::Iterator arg = dunList.begin();
198 arg != dunList.end() && i < argc + 1; arg++, i++) {
199 argv[i] = strdup((*arg));
200 }
201 do {
202 shOpt = getopt_long(argc + 1, argv, "sDp:C:X:P:d:", dundCLOpts, NULL);
203 switch(shOpt) {
204 case 'D':
205 dundDisableSDP = true;
206 break;
207 case 'p':
208 dundPersist = true;
209 if (optarg)
210 dundPersistPeriod = optarg;
211 break;
212 case 'C':
213 dundCache = true;
214 if (optarg)
215 dundCachePeriod = optarg;
216 break;
217 case 'X':
218 dundMsdun = true;
219 if (optarg)
220 dundMsdunTimeout = optarg;
221 break;
222 case 'P':
223 if (optarg)
224 dundChannel = optarg;
225 else
226 dundChannel = "1";
227 break;
228 case 'd':
229 dundPPPd = true;
230 if (optarg)
231 dundPPPdPath = optarg;
232 break;
233 case 's':
234 case '?':
235 default:
236 break;
237 }
238 } while (shOpt != -1);
239 if (optind < argc + 1) {
240 for (i = optind; i < argc + 1; i++) {
241 if (!dundPPPdOptions.isEmpty())
242 dundPPPdOptions += " ";
243 dundPPPdOptions += argv[i];
244 }
245 }
246 for (i = 0; i < argc + 1; i++) {
247 free(argv[i]);
248 }
249}
250
251/**
252 * readConfig
253 * Reads configuration file with conf as a file name
254 * return true on success and false on failure
255 */
256bool BTConfHandler::readConfig(const QString& conf)
257{
258 QFile btConf(conf); //File we read
259 QString tmp; //temporary string
260 if (btConf.open(IO_ReadOnly)) {
261 QTextStream inStream(&btConf);
262 list = QStringList::split("\n", inStream.read(), true);
263 for (QStringList::Iterator line = list.begin();
264 line != list.end(); line++) {
265 QString tmpLine = (*line).simplifyWhiteSpace();
266 if (tmpLine.startsWith("#"))
267 continue;
268 else if (tmpLine.startsWith(k_hcidEnable))
269 hcidEnable = getBoolArg(tmpLine, k_hcidEnable);
270 else if (tmpLine.startsWith(k_hiddEnable))
271 hiddEnable = getBoolArg(tmpLine, k_hiddEnable);
272 else if (tmpLine.startsWith(k_sdpdEnable))
273 sdpdEnable = getBoolArg(tmpLine, k_sdpdEnable);
274 else if (tmpLine.startsWith(k_rfcommEnable))
275 rfcommEnable = getBoolArg(tmpLine, k_rfcommEnable);
276 else if (tmpLine.startsWith(k_dundEnable))
277 dundEnable = getBoolArg(tmpLine, k_dundEnable);
278 else if (tmpLine.startsWith(k_pandEnable))
279 pandEnable = getBoolArg(tmpLine, k_pandEnable);
280 else if (tmpLine.startsWith(k_pandOpts)) {
281 tmp = getStringArg(tmpLine, k_pandOpts);
282 parsePanParameters(tmp);
283 }
284 else if (tmpLine.startsWith(k_dundOpts)) {
285 tmp = getStringArg(tmpLine, k_dundOpts);
286 parseDunParameters(tmp);
287 }
288 }
289 return true;
290 }
291 return false;
292}
293
294/**
295 * writeConfig
296 * Writes configuration file with conf as a file name
297 * return true on success and false on failure
298 */
299bool BTConfHandler::saveConfig()
300{
301 QFile btConf(confName); //File we read
302 if (!btConf.open(IO_WriteOnly))
303 return false;
304 QTextStream stream(&btConf);
305 for (QStringList::Iterator line = list.begin();
306 line != list.end(); line++) {
307 QString tmpLine = (*line).simplifyWhiteSpace();
308 if (tmpLine.startsWith(k_hcidEnable))
309 (*line) = k_hcidEnable + ((hcidEnable)? "true": "false");
310 else if (tmpLine.startsWith(k_hiddEnable))
311 (*line) = k_hiddEnable + ((hiddEnable)? "true": "false");
312 else if (tmpLine.startsWith(k_sdpdEnable))
313 (*line) = k_sdpdEnable + ((sdpdEnable)? "true": "false");
314 else if (tmpLine.startsWith(k_rfcommEnable))
315 (*line) = k_rfcommEnable + ((rfcommEnable)? "true": "false");
316 else if (tmpLine.startsWith(k_dundEnable))
317 (*line) = k_dundEnable + ((dundEnable)? "true": "false");
318 else if (tmpLine.startsWith(k_pandEnable))
319 (*line) = k_pandEnable + ((pandEnable)? "true": "false");
320 else if (tmpLine.startsWith(k_pandOpts)) {
321 (*line) = k_pandOpts + "\"--listen";
322 (*line) += " --role " + pandRole;
323 if (pandEncrypt)
324 (*line) += " --encrypt";
325 if (pandSecure)
326 (*line) += " --secure";
327 if (pandMaster)
328 (*line) += " --master";
329 if (pandDisableSDP)
330 (*line) += " --nosdp";
331 if (pandPersist) {
332 if (pandPersistPeriod.isEmpty())
333 (*line) += " --persist";
334 else {
335 (*line) += " -p ";
336 (*line) += pandPersistPeriod;
337 }
338 }
339 if (pandCache) {
340 if (pandCachePeriod.isEmpty())
341 (*line) += " --cache";
342 else {
343 (*line) += " -C ";
344 (*line) += pandCachePeriod;
345 }
346 }
347 (*line) += "\"";
348 }
349 else if (tmpLine.startsWith(k_dundOpts)) {
350 (*line) = k_dundOpts + "\"--listen";
351 (*line) += " --channel " + dundChannel;
352 if (dundDisableSDP)
353 (*line) += " --nosdp";
354 if (dundPersist) {
355 if (dundPersistPeriod.isEmpty())
356 (*line) += " --persist";
357 else {
358 (*line) += " -p ";
359 (*line) += dundPersistPeriod;
360 }
361 }
362 if (dundCache) {
363 if (dundCachePeriod.isEmpty())
364 (*line) += " --cache";
365 else {
366 (*line) += " -C ";
367 (*line) += dundCachePeriod;
368 }
369 }
370 if (dundPPPd)
371 (*line) += " --pppd " + dundPPPdPath;
372 if (dundMsdun) {
373 if (dundMsdunTimeout.isEmpty())
374 (*line) += " --msdun";
375 else {
376 (*line) += " -X ";
377 (*line) += dundMsdunTimeout;
378 }
379 }
380 if (!dundPPPdOptions.isEmpty()) {
381 (*line) += " ";
382 (*line) += dundPPPdOptions;
383 }
384 (*line) += "\"";
385 }
386 stream << (*line) << endl;
387 }
388 return true;
389}
390
391//eof
diff --git a/noncore/net/opietooth/manager/btconfhandler.h b/noncore/net/opietooth/manager/btconfhandler.h
new file mode 100644
index 0000000..5638d00
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btconfhandler.h
@@ -0,0 +1,126 @@
1/* $Id$ */
2/* Bluetooth services configuration file handler */
3/***************************************************************************
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 ***************************************************************************/
11
12#ifndef _BTCONFHANDLER_H_
13#define _BTCONFHANDLER_H_
14#include <qstring.h>
15#include <qstringlist.h>
16
17namespace OpieTooth {
18 class BTConfHandler {
19 public:
20 BTConfHandler(const QString& conf);
21 ~BTConfHandler();
22 bool saveConfig();
23
24 bool getHcidEnable() { return hcidEnable; }
25 void setHcidEnable(bool arg) { hcidEnable = arg; }
26
27 bool getHiddEnable() { return hiddEnable; }
28 void setHiddEnable(bool arg) { hiddEnable = arg; }
29
30 bool getSdpdEnable() { return sdpdEnable; }
31 void setSdpdEnable(bool arg) { sdpdEnable = arg; }
32
33 bool getRfcommEnable() { return rfcommEnable; }
34 void setRfcommEnable(bool arg) { rfcommEnable = arg; }
35
36 //DUND parameter
37 bool getDundEnable() { return dundEnable; }
38 void setDundEnable(bool arg) { dundEnable = arg; }
39 bool getDunDisableSDP() { return dundDisableSDP; }
40 void setDunDisableSDP(bool arg) { dundDisableSDP = arg; }
41 bool getDunPersist() { return dundPersist; }
42 void setDunPersist(bool arg) { dundPersist = arg; }
43 QString getDunPersistPeriod() { return dundPersistPeriod; }
44 void setDunPersistPeriod(QString& arg) { dundPersistPeriod = arg; }
45 bool getDunCache() { return dundCache; }
46 void setDunCache(bool arg) { dundCache = arg; }
47 QString getDunCachePeriod() { return dundCachePeriod; }
48 void setDunCachePeriod(QString& arg) { dundCachePeriod = arg; }
49 bool getDunMsdun() { return dundMsdun; }
50 void setDunMsdun(bool arg) { dundMsdun = arg; }
51 QString getDunMsdunTimeout() { return dundMsdunTimeout; }
52 void setDunMsdunTimeout(QString& arg) { dundMsdunTimeout = arg; }
53 QString getDunChannel() { return dundChannel; }
54 void setDunChannel(QString& arg) { dundChannel = arg; }
55 bool getDunPPPd() { return dundPPPd; }
56 void setDunPPPd(bool arg) { dundPPPd = arg; }
57 QString getDunPPPdPath() { return dundPPPdPath; }
58 void setDunPPPdPath(QString& arg) { dundPPPdPath = arg; }
59 QString getDunPPPdOptions() { return dundPPPdOptions; }
60 void setDunPPPdOptions(QString& arg) { dundPPPdOptions = arg; }
61
62 //PAND parameters
63 bool getPanEnable() { return pandEnable; }
64 void setPanEnable(bool arg) { pandEnable = arg; }
65 bool getPanEncrypt() { return pandEncrypt; }
66 void setPanEncrypt(bool arg) { pandEncrypt = arg; }
67 bool getPanSecure() { return pandSecure; }
68 void setPanSecure(bool arg) { pandSecure = arg; }
69 bool getPanMaster() { return pandMaster; }
70 void setPanMaster(bool arg) { pandMaster = arg; }
71 bool getPanDisableSDP() { return pandDisableSDP; }
72 void setPanDisableSDP(bool arg) { pandDisableSDP = arg; }
73 QString getPanRole() { return pandRole; }
74 void setPanRole(QString& arg) { pandRole = arg; }
75 bool getPanPersist() { return pandPersist; }
76 void setPanPersist(bool arg) { pandPersist = arg; }
77 QString getPanPersistPeriod() { return pandPersistPeriod; }
78 void setPanPersistPeriod(QString& arg) { pandPersistPeriod = arg; }
79 bool getPanCache() { return pandCache; }
80 void setPanCache(bool arg) { pandCache = arg; }
81 QString getPanCachePeriod() { return pandCachePeriod; }
82 void setPanCachePeriod(QString& arg) { pandCachePeriod = arg; }
83
84 QString& getConfName() { return confName; }
85 protected:
86 bool getBoolArg(QString& str, QCString& keyword);
87 QString getStringArg(QString& str, QCString& keyword);
88 bool readConfig(const QString& conf);
89 void parsePanParameters(const QString& conf);
90 void parseDunParameters(const QString& conf);
91 protected:
92 bool hcidEnable;
93 bool hiddEnable;
94 bool sdpdEnable;
95 bool rfcommEnable;
96 //DUND parameters
97 bool dundEnable;
98 bool dundDisableSDP;
99 bool dundPersist;
100 QString dundPersistPeriod;
101 bool dundCache;
102 QString dundCachePeriod;
103 bool dundMsdun;
104 QString dundMsdunTimeout;
105 QString dundChannel;
106 bool dundPPPd;
107 QString dundPPPdPath;
108 QString dundPPPdOptions;
109
110 //PAND parameters
111 bool pandEnable;
112 bool pandEncrypt;
113 bool pandSecure;
114 bool pandMaster;
115 bool pandDisableSDP;
116 bool pandPersist;
117 QString pandPersistPeriod;
118 bool pandCache;
119 QString pandCachePeriod;
120 QString pandRole;
121 QStringList list; //list of strings we read from configuration file
122 QString confName; //Configuration filename
123 };
124};
125#endif
126//eof
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro
index dc43f40..09bd10e 100644
--- a/noncore/net/opietooth/manager/manager.pro
+++ b/noncore/net/opietooth/manager/manager.pro
@@ -5,30 +5,33 @@ HEADERS = btconnectionitem.h btdeviceitem.h \
5 scandialog.h btlistitem.h filistitem.h \ 5 scandialog.h btlistitem.h filistitem.h \
6 hciconfwrapper.h bticonloader.h \ 6 hciconfwrapper.h bticonloader.h \
7 pppdialog.h dundialog.h pandialog.h \ 7 pppdialog.h dundialog.h pandialog.h \
8 obexdialog.h obexftpdialog.h \ 8 obexdialog.h obexftpdialog.h \
9 rfcommassigndialogimpl.h rfcommassigndialogitem.h \ 9 rfcommassigndialogimpl.h rfcommassigndialogitem.h \
10 devicehandler.h rfcpopup.h obexpopup.h obexftpopup.h \ 10 devicehandler.h rfcpopup.h obexpopup.h obexftpopup.h \
11 rfcommhelper.h panpopup.h dunpopup.h rfcommconfhandler.h 11 rfcommhelper.h panpopup.h dunpopup.h rfcommconfhandler.h \
12 servicesdialog.h btconfhandler.h
12 13
13SOURCES = btconnectionitem.cpp btdeviceitem.cpp \ 14SOURCES = btconnectionitem.cpp btdeviceitem.cpp \
14 btserviceitem.cpp filelistitem.cpp stdpopups.cpp \ 15 btserviceitem.cpp filelistitem.cpp stdpopups.cpp \
15 popuphelper.cpp main.cpp \ 16 popuphelper.cpp main.cpp \
16 bluebase.cpp scandialog.cpp \ 17 bluebase.cpp scandialog.cpp \
17 btlistitem.cpp hciconfwrapper.cpp \ 18 btlistitem.cpp hciconfwrapper.cpp \
18 bticonloader.cpp pppdialog.cpp dundialog.cpp pandialog.cpp \ 19 bticonloader.cpp pppdialog.cpp dundialog.cpp pandialog.cpp \
19 rfcommassigndialogimpl.cpp rfcommassigndialogitem.cpp \ 20 rfcommassigndialogimpl.cpp rfcommassigndialogitem.cpp \
20 obexdialog.cpp devicehandler.cpp \ 21 obexdialog.cpp devicehandler.cpp \
21 rfcpopup.cpp obexpopup.cpp obexftpopup.cpp obexftpdialog.cpp \ 22 rfcpopup.cpp obexpopup.cpp obexftpopup.cpp obexftpdialog.cpp \
22 rfcommhelper.cpp panpopup.cpp dunpopup.cpp rfcommconfhandler.cpp 23 rfcommhelper.cpp panpopup.cpp dunpopup.cpp rfcommconfhandler.cpp \
24 servicesdialog.cpp btconfhandler.cpp
23INCLUDEPATH += $(OPIEDIR)/include 25INCLUDEPATH += $(OPIEDIR)/include
24INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib 26INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib
25DEPENDPATH += $(OPIEDIR)/include 27DEPENDPATH += $(OPIEDIR)/include
26LIBS += -lqpe -lbluetooth -lopietooth1 -lopiecore2 -lopieui2 -lopenobex 28LIBS += -lqpe -lbluetooth -lopietooth1 -lopiecore2 -lopieui2 -lopenobex
27INTERFACES = bluetoothbase.ui devicedialog.ui rfcommassigndialogbase.ui \ 29INTERFACES = bluetoothbase.ui devicedialog.ui rfcommassigndialogbase.ui \
28 rfcommdialogitembase.ui obexftpdialogbase.ui 30 rfcommdialogitembase.ui obexftpdialogbase.ui \
31 servicesdialogbase.ui
29 32
30 TARGET = bluetooth-manager 33 TARGET = bluetooth-manager
31 34
32include( $(OPIEDIR)/include.pro ) 35include( $(OPIEDIR)/include.pro )
33 36
34!isEmpty( LIBOBEXFTP_INC_DIR ) { 37!isEmpty( LIBOBEXFTP_INC_DIR ) {
diff --git a/noncore/net/opietooth/manager/servicesdialog.cpp b/noncore/net/opietooth/manager/servicesdialog.cpp
new file mode 100644
index 0000000..114c360
--- a/dev/null
+++ b/noncore/net/opietooth/manager/servicesdialog.cpp
@@ -0,0 +1,120 @@
1/* $Id$ */
2/* Bluetooth services configuration dialog */
3/***************************************************************************
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 ***************************************************************************/
11#include "servicesdialog.h"
12#include "btconfhandler.h"
13#include <opie2/odebug.h>
14#include <qstring.h>
15#include <qcheckbox.h>
16#include <qlineedit.h>
17#include <qcombobox.h>
18using namespace Opie::Core;
19
20using namespace OpieTooth;
21
22ServicesDialog::ServicesDialog(const QString& conf,
23 QWidget* parent, const char* name, bool modal, WFlags fl) :
24 ServicesDialogBase(parent, name, modal, fl),
25 cfg(conf)
26{
27 int i; //just an index
28 QString role;
29 hcidEnableCBox->setChecked(cfg.getHcidEnable());
30 hiddEnableCBox->setChecked(cfg.getHiddEnable());
31 sdpdEnableCBox->setChecked(cfg.getSdpdEnable());
32 rfcommEnableCBox->setChecked(cfg.getRfcommEnable());
33 dundEnableCBox->setChecked(cfg.getDundEnable());
34 dundDisableSDPCBox->setChecked(cfg.getDunDisableSDP());
35 dundPersistCBox->setChecked(cfg.getDunPersist());
36 dundPersistEdit->setText(cfg.getDunPersistPeriod());
37 dundCacheCBox->setChecked(cfg.getDunCache());
38 dundCacheEdit->setText(cfg.getDunCachePeriod());
39 for (i = 1; i < 32; i++)
40 dundChannelCBox->insertItem(QString::number(i));
41 role = cfg.getDunChannel();
42 for (i = 0; i < dundChannelCBox->count(); i++) {
43 if (role == dundChannelCBox->text(i)) {
44 dundChannelCBox->setCurrentItem(i);
45 break;
46 }
47 }
48 dundMsdunCBox->setChecked(cfg.getDunMsdun());
49 dundMsdunTimeoutEdit->setText(cfg.getDunMsdunTimeout());
50 dundPPPdCBox->setChecked(cfg.getDunPPPd());
51 dundPPPdPathEdit->setText(cfg.getDunPPPdPath());
52 dundPPPdOptionsEdit->setText(cfg.getDunPPPdOptions());
53
54 pandEnableCBox->setChecked(cfg.getPanEnable());
55 pandEncryptCBox->setChecked(cfg.getPanEncrypt());
56 pandSecureCBox->setChecked(cfg.getPanSecure());
57 pandMasterCBox->setChecked(cfg.getPanMaster());
58 role = cfg.getPanRole();
59 for (i = 0; i < pandRoleComboBox->count(); i++) {
60 if (role == pandRoleComboBox->text(i)) {
61 pandRoleComboBox->setCurrentItem(i);
62 break;
63 }
64 }
65 pandDisableSDPCBox->setChecked(cfg.getPanDisableSDP());
66 pandPersistCBox->setChecked(cfg.getPanPersist());
67 pandPersistEdit->setText(cfg.getPanPersistPeriod());
68 pandCacheCBox->setChecked(cfg.getPanCache());
69 pandCacheEdit->setText(cfg.getPanCachePeriod());
70}
71
72ServicesDialog::~ServicesDialog()
73{
74}
75
76void ServicesDialog::accept()
77{
78 QString tmp;
79 odebug << "save configuration" << oendl;
80 cfg.setHcidEnable(hcidEnableCBox->isChecked());
81 cfg.setHiddEnable(hiddEnableCBox->isChecked());
82 cfg.setSdpdEnable(sdpdEnableCBox->isChecked());
83 cfg.setRfcommEnable(rfcommEnableCBox->isChecked());
84 cfg.setDundEnable(dundEnableCBox->isChecked());
85 cfg.setDunDisableSDP(dundDisableSDPCBox->isChecked());
86 cfg.setDunPersist(dundPersistCBox->isChecked());
87 tmp = dundPersistEdit->text();
88 cfg.setDunPersistPeriod(tmp);
89 cfg.setDunCache(dundCacheCBox->isChecked());
90 tmp = dundCacheEdit->text();
91 cfg.setDunCachePeriod(tmp);
92 tmp = dundChannelCBox->currentText();
93 cfg.setDunChannel(tmp);
94 cfg.setDunMsdun(dundMsdunCBox->isChecked());
95 tmp = dundMsdunTimeoutEdit->text();
96 cfg.setDunMsdunTimeout(tmp);
97 cfg.setDunPPPd(dundPPPdCBox->isChecked());
98 tmp = dundPPPdPathEdit->text();
99 cfg.setDunPPPdPath(tmp);
100 tmp = dundPPPdOptionsEdit->text();
101 cfg.setDunPPPdOptions(tmp);
102
103 cfg.setPanEnable(pandEnableCBox->isChecked());
104 cfg.setPanEncrypt(pandEncryptCBox->isChecked());
105 cfg.setPanSecure(pandSecureCBox->isChecked());
106 cfg.setPanMaster(pandMasterCBox->isChecked());
107 cfg.setPanDisableSDP(pandDisableSDPCBox->isChecked());
108 tmp = pandRoleComboBox->currentText();
109 cfg.setPanRole(tmp);
110 cfg.setPanPersist(pandPersistCBox->isChecked());
111 tmp = pandPersistEdit->text();
112 cfg.setPanPersistPeriod(tmp);
113 cfg.setPanCache(pandCacheCBox->isChecked());
114 tmp = pandCacheEdit->text();
115 cfg.setPanCachePeriod(tmp);
116 cfg.saveConfig();
117 ServicesDialogBase::accept();
118}
119
120//eof
diff --git a/noncore/net/opietooth/manager/servicesdialog.h b/noncore/net/opietooth/manager/servicesdialog.h
new file mode 100644
index 0000000..b42f290
--- a/dev/null
+++ b/noncore/net/opietooth/manager/servicesdialog.h
@@ -0,0 +1,30 @@
1/* $Id$ */
2/* Bluetooth services configuration dialog */
3/***************************************************************************
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 ***************************************************************************/
11#ifndef _SERVICESDIALOG_H_
12#define _SERVICESDIALOG_H_
13#include "servicesdialogbase.h"
14#include "btconfhandler.h"
15namespace OpieTooth {
16 class ServicesDialog : public ServicesDialogBase {
17 Q_OBJECT
18 public:
19 ServicesDialog(const QString& conf,
20 QWidget* parent = 0, const char* name = 0, bool modal = TRUE,
21 WFlags fl = 0);
22 ~ServicesDialog();
23 public:
24 BTConfHandler cfg; //configuration file
25 protected slots:
26 virtual void accept();
27 };
28};
29#endif
30//eof
diff --git a/noncore/net/opietooth/manager/servicesdialogbase.ui b/noncore/net/opietooth/manager/servicesdialogbase.ui
new file mode 100644
index 0000000..410e513
--- a/dev/null
+++ b/noncore/net/opietooth/manager/servicesdialogbase.ui
@@ -0,0 +1,658 @@
1<!DOCTYPE UI><UI>
2<class>ServicesDialogBase</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>ServicesDialogBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>258</width>
15 <height>368</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>sizePolicy</name>
20 <sizepolicy>
21 <hsizetype>7</hsizetype>
22 <vsizetype>7</vsizetype>
23 </sizepolicy>
24 </property>
25 <property stdset="1">
26 <name>baseSize</name>
27 <size>
28 <width>240</width>
29 <height>320</height>
30 </size>
31 </property>
32 <property stdset="1">
33 <name>caption</name>
34 <string>Configure Services</string>
35 </property>
36 <property>
37 <name>layoutMargin</name>
38 </property>
39 <property>
40 <name>layoutSpacing</name>
41 </property>
42 <vbox>
43 <property stdset="1">
44 <name>margin</name>
45 <number>0</number>
46 </property>
47 <property stdset="1">
48 <name>spacing</name>
49 <number>0</number>
50 </property>
51 <widget>
52 <class>QTabWidget</class>
53 <property stdset="1">
54 <name>name</name>
55 <cstring>servicesTab</cstring>
56 </property>
57 <property stdset="1">
58 <name>tabShape</name>
59 <enum>Rounded</enum>
60 </property>
61 <property>
62 <name>layoutMargin</name>
63 </property>
64 <property>
65 <name>layoutSpacing</name>
66 </property>
67 <widget>
68 <class>QWidget</class>
69 <property stdset="1">
70 <name>name</name>
71 <cstring>tab</cstring>
72 </property>
73 <attribute>
74 <name>title</name>
75 <string>HCID</string>
76 </attribute>
77 <vbox>
78 <property stdset="1">
79 <name>margin</name>
80 <number>0</number>
81 </property>
82 <property stdset="1">
83 <name>spacing</name>
84 <number>0</number>
85 </property>
86 <widget>
87 <class>QGroupBox</class>
88 <property stdset="1">
89 <name>name</name>
90 <cstring>GroupBox3</cstring>
91 </property>
92 <property stdset="1">
93 <name>title</name>
94 <string>Host Controller Interface</string>
95 </property>
96 <property>
97 <name>layoutMargin</name>
98 </property>
99 <property>
100 <name>layoutSpacing</name>
101 </property>
102 <grid>
103 <property stdset="1">
104 <name>margin</name>
105 <number>11</number>
106 </property>
107 <property stdset="1">
108 <name>spacing</name>
109 <number>6</number>
110 </property>
111 <widget row="0" column="0" >
112 <class>QCheckBox</class>
113 <property stdset="1">
114 <name>name</name>
115 <cstring>hcidEnableCBox</cstring>
116 </property>
117 <property stdset="1">
118 <name>text</name>
119 <string>Enable</string>
120 </property>
121 </widget>
122 </grid>
123 </widget>
124 </vbox>
125 </widget>
126 <widget>
127 <class>QWidget</class>
128 <property stdset="1">
129 <name>name</name>
130 <cstring>tab</cstring>
131 </property>
132 <attribute>
133 <name>title</name>
134 <string>SDPD</string>
135 </attribute>
136 <vbox>
137 <property stdset="1">
138 <name>margin</name>
139 <number>0</number>
140 </property>
141 <property stdset="1">
142 <name>spacing</name>
143 <number>0</number>
144 </property>
145 <widget>
146 <class>QGroupBox</class>
147 <property stdset="1">
148 <name>name</name>
149 <cstring>GroupBox4</cstring>
150 </property>
151 <property stdset="1">
152 <name>title</name>
153 <string>Service Discovery Protocol </string>
154 </property>
155 <grid>
156 <property stdset="1">
157 <name>margin</name>
158 <number>11</number>
159 </property>
160 <property stdset="1">
161 <name>spacing</name>
162 <number>6</number>
163 </property>
164 <widget row="0" column="0" >
165 <class>QCheckBox</class>
166 <property stdset="1">
167 <name>name</name>
168 <cstring>sdpdEnableCBox</cstring>
169 </property>
170 <property stdset="1">
171 <name>text</name>
172 <string>Enable</string>
173 </property>
174 </widget>
175 </grid>
176 </widget>
177 </vbox>
178 </widget>
179 <widget>
180 <class>QWidget</class>
181 <property stdset="1">
182 <name>name</name>
183 <cstring>tab</cstring>
184 </property>
185 <attribute>
186 <name>title</name>
187 <string>HIDD</string>
188 </attribute>
189 <grid>
190 <property stdset="1">
191 <name>margin</name>
192 <number>0</number>
193 </property>
194 <property stdset="1">
195 <name>spacing</name>
196 <number>0</number>
197 </property>
198 <widget row="0" column="0" >
199 <class>QGroupBox</class>
200 <property stdset="1">
201 <name>name</name>
202 <cstring>GroupBox6</cstring>
203 </property>
204 <property stdset="1">
205 <name>title</name>
206 <string>Human Interface Devices</string>
207 </property>
208 <grid>
209 <property stdset="1">
210 <name>margin</name>
211 <number>11</number>
212 </property>
213 <property stdset="1">
214 <name>spacing</name>
215 <number>6</number>
216 </property>
217 <widget row="0" column="0" >
218 <class>QCheckBox</class>
219 <property stdset="1">
220 <name>name</name>
221 <cstring>hiddEnableCBox</cstring>
222 </property>
223 <property stdset="1">
224 <name>text</name>
225 <string>Enable</string>
226 </property>
227 </widget>
228 </grid>
229 </widget>
230 </grid>
231 </widget>
232 <widget>
233 <class>QWidget</class>
234 <property stdset="1">
235 <name>name</name>
236 <cstring>tab</cstring>
237 </property>
238 <attribute>
239 <name>title</name>
240 <string>RFCOMM</string>
241 </attribute>
242 <vbox>
243 <property stdset="1">
244 <name>margin</name>
245 <number>0</number>
246 </property>
247 <property stdset="1">
248 <name>spacing</name>
249 <number>0</number>
250 </property>
251 <widget>
252 <class>QGroupBox</class>
253 <property stdset="1">
254 <name>name</name>
255 <cstring>GroupBox5</cstring>
256 </property>
257 <property stdset="1">
258 <name>title</name>
259 <string>RFCOMM</string>
260 </property>
261 <property>
262 <name>layoutMargin</name>
263 </property>
264 <property>
265 <name>layoutSpacing</name>
266 </property>
267 <grid>
268 <property stdset="1">
269 <name>margin</name>
270 <number>11</number>
271 </property>
272 <property stdset="1">
273 <name>spacing</name>
274 <number>6</number>
275 </property>
276 <widget row="0" column="0" >
277 <class>QCheckBox</class>
278 <property stdset="1">
279 <name>name</name>
280 <cstring>rfcommEnableCBox</cstring>
281 </property>
282 <property stdset="1">
283 <name>text</name>
284 <string>Enable</string>
285 </property>
286 </widget>
287 </grid>
288 </widget>
289 </vbox>
290 </widget>
291 <widget>
292 <class>QWidget</class>
293 <property stdset="1">
294 <name>name</name>
295 <cstring>tab</cstring>
296 </property>
297 <attribute>
298 <name>title</name>
299 <string>DUND</string>
300 </attribute>
301 <vbox>
302 <property stdset="1">
303 <name>margin</name>
304 <number>0</number>
305 </property>
306 <property stdset="1">
307 <name>spacing</name>
308 <number>0</number>
309 </property>
310 <widget>
311 <class>QGroupBox</class>
312 <property stdset="1">
313 <name>name</name>
314 <cstring>GroupBox7</cstring>
315 </property>
316 <property stdset="1">
317 <name>title</name>
318 <string>DialUp Network</string>
319 </property>
320 <property>
321 <name>layoutMargin</name>
322 </property>
323 <property>
324 <name>layoutSpacing</name>
325 </property>
326 <grid>
327 <property stdset="1">
328 <name>margin</name>
329 <number>4</number>
330 </property>
331 <property stdset="1">
332 <name>spacing</name>
333 <number>2</number>
334 </property>
335 <widget row="0" column="0" rowspan="1" colspan="3" >
336 <class>QCheckBox</class>
337 <property stdset="1">
338 <name>name</name>
339 <cstring>dundEnableCBox</cstring>
340 </property>
341 <property stdset="1">
342 <name>text</name>
343 <string>Enable</string>
344 </property>
345 </widget>
346 <widget row="1" column="3" >
347 <class>QCheckBox</class>
348 <property stdset="1">
349 <name>name</name>
350 <cstring>dundCacheCBox</cstring>
351 </property>
352 <property stdset="1">
353 <name>text</name>
354 <string>Cache</string>
355 </property>
356 </widget>
357 <widget row="1" column="0" rowspan="1" colspan="2" >
358 <class>QCheckBox</class>
359 <property stdset="1">
360 <name>name</name>
361 <cstring>dundPersistCBox</cstring>
362 </property>
363 <property stdset="1">
364 <name>text</name>
365 <string>Persist</string>
366 </property>
367 </widget>
368 <widget row="1" column="2" >
369 <class>QLineEdit</class>
370 <property stdset="1">
371 <name>name</name>
372 <cstring>dundPersistEdit</cstring>
373 </property>
374 </widget>
375 <widget row="1" column="4" >
376 <class>QLineEdit</class>
377 <property stdset="1">
378 <name>name</name>
379 <cstring>dundCacheEdit</cstring>
380 </property>
381 </widget>
382 <widget row="0" column="3" rowspan="1" colspan="2" >
383 <class>QCheckBox</class>
384 <property stdset="1">
385 <name>name</name>
386 <cstring>dundDisableSDPCBox</cstring>
387 </property>
388 <property stdset="1">
389 <name>text</name>
390 <string>Disable SDP</string>
391 </property>
392 </widget>
393 <widget row="2" column="0" rowspan="1" colspan="5" >
394 <class>QLabel</class>
395 <property stdset="1">
396 <name>name</name>
397 <cstring>dundPPPdLabel</cstring>
398 </property>
399 <property stdset="1">
400 <name>text</name>
401 <string>PPPD Options:</string>
402 </property>
403 </widget>
404 <widget row="3" column="0" rowspan="1" colspan="5" >
405 <class>QLineEdit</class>
406 <property stdset="1">
407 <name>name</name>
408 <cstring>dundPPPdOptionsEdit</cstring>
409 </property>
410 </widget>
411 <widget row="4" column="0" rowspan="1" colspan="5" >
412 <class>QCheckBox</class>
413 <property stdset="1">
414 <name>name</name>
415 <cstring>dundPPPdCBox</cstring>
416 </property>
417 <property stdset="1">
418 <name>text</name>
419 <string>Specify pppd path</string>
420 </property>
421 </widget>
422 <widget row="7" column="1" rowspan="1" colspan="4" >
423 <class>QLineEdit</class>
424 <property stdset="1">
425 <name>name</name>
426 <cstring>dundMsdunTimeoutEdit</cstring>
427 </property>
428 </widget>
429 <widget row="7" column="0" >
430 <class>QLabel</class>
431 <property stdset="1">
432 <name>name</name>
433 <cstring>dundMsdunLabel</cstring>
434 </property>
435 <property stdset="1">
436 <name>text</name>
437 <string>Timeout: </string>
438 </property>
439 </widget>
440 <widget row="6" column="0" rowspan="1" colspan="5" >
441 <class>QCheckBox</class>
442 <property stdset="1">
443 <name>name</name>
444 <cstring>dundMsdunCBox</cstring>
445 </property>
446 <property stdset="1">
447 <name>text</name>
448 <string>Enable Microsoft dialup networking</string>
449 </property>
450 </widget>
451 <widget row="5" column="0" rowspan="1" colspan="5" >
452 <class>QLineEdit</class>
453 <property stdset="1">
454 <name>name</name>
455 <cstring>dundPPPdPathEdit</cstring>
456 </property>
457 </widget>
458 <widget row="8" column="0" rowspan="1" colspan="2" >
459 <class>QLabel</class>
460 <property stdset="1">
461 <name>name</name>
462 <cstring>dundChannelLabel</cstring>
463 </property>
464 <property stdset="1">
465 <name>text</name>
466 <string>Channel:</string>
467 </property>
468 </widget>
469 <widget row="8" column="2" rowspan="1" colspan="3" >
470 <class>QComboBox</class>
471 <property stdset="1">
472 <name>name</name>
473 <cstring>dundChannelCBox</cstring>
474 </property>
475 </widget>
476 </grid>
477 </widget>
478 </vbox>
479 </widget>
480 <widget>
481 <class>QWidget</class>
482 <property stdset="1">
483 <name>name</name>
484 <cstring>tab</cstring>
485 </property>
486 <attribute>
487 <name>title</name>
488 <string>PAND</string>
489 </attribute>
490 <vbox>
491 <property stdset="1">
492 <name>margin</name>
493 <number>0</number>
494 </property>
495 <property stdset="1">
496 <name>spacing</name>
497 <number>0</number>
498 </property>
499 <widget>
500 <class>QGroupBox</class>
501 <property stdset="1">
502 <name>name</name>
503 <cstring>GroupBox6_2</cstring>
504 </property>
505 <property stdset="1">
506 <name>title</name>
507 <string>Personal Area Network</string>
508 </property>
509 <property>
510 <name>layoutMargin</name>
511 </property>
512 <property>
513 <name>layoutSpacing</name>
514 </property>
515 <grid>
516 <property stdset="1">
517 <name>margin</name>
518 <number>4</number>
519 </property>
520 <property stdset="1">
521 <name>spacing</name>
522 <number>2</number>
523 </property>
524 <widget row="0" column="0" rowspan="1" colspan="3" >
525 <class>QCheckBox</class>
526 <property stdset="1">
527 <name>name</name>
528 <cstring>pandEnableCBox</cstring>
529 </property>
530 <property stdset="1">
531 <name>text</name>
532 <string>Enable</string>
533 </property>
534 </widget>
535 <widget row="1" column="2" >
536 <class>QCheckBox</class>
537 <property stdset="1">
538 <name>name</name>
539 <cstring>pandSecureCBox</cstring>
540 </property>
541 <property stdset="1">
542 <name>text</name>
543 <string>Secure</string>
544 </property>
545 </widget>
546 <widget row="2" column="2" >
547 <class>QCheckBox</class>
548 <property stdset="1">
549 <name>name</name>
550 <cstring>pandDisableSDPCBox</cstring>
551 </property>
552 <property stdset="1">
553 <name>text</name>
554 <string>Disable SDP</string>
555 </property>
556 </widget>
557 <widget row="3" column="0" >
558 <class>QCheckBox</class>
559 <property stdset="1">
560 <name>name</name>
561 <cstring>pandPersistCBox</cstring>
562 </property>
563 <property stdset="1">
564 <name>text</name>
565 <string>Persist</string>
566 </property>
567 </widget>
568 <widget row="3" column="1" rowspan="1" colspan="2" >
569 <class>QLineEdit</class>
570 <property stdset="1">
571 <name>name</name>
572 <cstring>pandPersistEdit</cstring>
573 </property>
574 </widget>
575 <widget row="4" column="0" >
576 <class>QCheckBox</class>
577 <property stdset="1">
578 <name>name</name>
579 <cstring>pandCacheCBox</cstring>
580 </property>
581 <property stdset="1">
582 <name>text</name>
583 <string>Cache</string>
584 </property>
585 </widget>
586 <widget row="4" column="1" rowspan="1" colspan="2" >
587 <class>QLineEdit</class>
588 <property stdset="1">
589 <name>name</name>
590 <cstring>pandCacheEdit</cstring>
591 </property>
592 </widget>
593 <widget row="2" column="0" rowspan="1" colspan="2" >
594 <class>QCheckBox</class>
595 <property stdset="1">
596 <name>name</name>
597 <cstring>pandMasterCBox</cstring>
598 </property>
599 <property stdset="1">
600 <name>text</name>
601 <string>Master</string>
602 </property>
603 </widget>
604 <widget row="1" column="0" >
605 <class>QCheckBox</class>
606 <property stdset="1">
607 <name>name</name>
608 <cstring>pandEncryptCBox</cstring>
609 </property>
610 <property stdset="1">
611 <name>text</name>
612 <string>Encrypt</string>
613 </property>
614 </widget>
615 <widget row="5" column="0" >
616 <class>QLabel</class>
617 <property stdset="1">
618 <name>name</name>
619 <cstring>pandRoleLabel</cstring>
620 </property>
621 <property stdset="1">
622 <name>text</name>
623 <string>Role: </string>
624 </property>
625 </widget>
626 <widget row="5" column="1" rowspan="1" colspan="2" >
627 <class>QComboBox</class>
628 <item>
629 <property>
630 <name>text</name>
631 <string>PANU</string>
632 </property>
633 </item>
634 <item>
635 <property>
636 <name>text</name>
637 <string>NAP</string>
638 </property>
639 </item>
640 <item>
641 <property>
642 <name>text</name>
643 <string>GN</string>
644 </property>
645 </item>
646 <property stdset="1">
647 <name>name</name>
648 <cstring>pandRoleComboBox</cstring>
649 </property>
650 </widget>
651 </grid>
652 </widget>
653 </vbox>
654 </widget>
655 </widget>
656 </vbox>
657</widget>
658</UI>