author | korovkin <korovkin> | 2006-04-20 12:37:33 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-04-20 12:37:33 (UTC) |
commit | fce7a143353e2bdd41d878c6f0a1224e0f2a158e (patch) (unidiff) | |
tree | 41fc68d13e148b8979dde51401ce160f10197a6c | |
parent | 6d3a8eaf3b92f8eec9908eed91568342fac5de1d (diff) | |
download | opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.zip opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.tar.gz opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.tar.bz2 |
Added services configuration dialog.
-rw-r--r-- | noncore/net/opietooth/manager/.cvsignore | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 30 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.h | 1 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluetoothbase.ui | 43 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btconfhandler.cpp | 391 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btconfhandler.h | 126 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/manager.pro | 9 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/servicesdialog.cpp | 120 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/servicesdialog.h | 30 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/servicesdialogbase.ui | 658 |
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 | |||
@@ -1,15 +1,19 @@ | |||
1 | Makefile | 1 | Makefile |
2 | Makefile.in | 2 | Makefile.in |
3 | bluetoothbase.cpp | 3 | bluetoothbase.cpp |
4 | bluetoothbase.h | 4 | bluetoothbase.h |
5 | devicedialog.cpp | 5 | devicedialog.cpp |
6 | devicedialog.h | 6 | devicedialog.h |
7 | moc_* | 7 | moc_* |
8 | scandialog.cpp | 8 | scandialog.cpp |
9 | scandialog.h | 9 | scandialog.h |
10 | rfcommassigndialogbase.cpp | 10 | rfcommassigndialogbase.cpp |
11 | rfcommassigndialogbase.h | 11 | rfcommassigndialogbase.h |
12 | rfcommdialogitembase.cpp | 12 | rfcommdialogitembase.cpp |
13 | rfcommdialogitembase.h | 13 | rfcommdialogitembase.h |
14 | servicesdialogbase.cpp | ||
15 | servicesdialogbase.h | ||
16 | obexftpdialogbase.cpp | ||
17 | obexftpdialogbase.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 | |||
@@ -1,351 +1,353 @@ | |||
1 | /* | 1 | /* |
2 | * bluebase.cpp * | 2 | * bluebase.cpp * |
3 | * --------------------- | 3 | * --------------------- |
4 | * | 4 | * |
5 | * copyright : (c) 2002 by Maximilian Reiß | 5 | * copyright : (c) 2002 by Maximilian Reiß |
6 | * email : max.reiss@gmx.de | 6 | * email : max.reiss@gmx.de |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #include "bluebase.h" | 18 | #include "bluebase.h" |
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> |
31 | #include <qpe/resource.h> | 32 | #include <qpe/resource.h> |
32 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
33 | #include <opie2/odebug.h> | 34 | #include <opie2/odebug.h> |
34 | using namespace Opie::Core; | 35 | using namespace Opie::Core; |
35 | 36 | ||
36 | /* QT */ | 37 | /* QT */ |
37 | #include <qframe.h> | 38 | #include <qframe.h> |
38 | #include <qlabel.h> | 39 | #include <qlabel.h> |
39 | #include <qpushbutton.h> | 40 | #include <qpushbutton.h> |
40 | #include <qlayout.h> | 41 | #include <qlayout.h> |
41 | #include <qvariant.h> | 42 | #include <qvariant.h> |
42 | #include <qimage.h> | 43 | #include <qimage.h> |
43 | #include <qpixmap.h> | 44 | #include <qpixmap.h> |
44 | #include <qtabwidget.h> | 45 | #include <qtabwidget.h> |
45 | #include <qscrollview.h> | 46 | #include <qscrollview.h> |
46 | #include <qvbox.h> | 47 | #include <qvbox.h> |
47 | #include <qmessagebox.h> | 48 | #include <qmessagebox.h> |
48 | #include <qcombobox.h> | 49 | #include <qcombobox.h> |
49 | #include <qcheckbox.h> | 50 | #include <qcheckbox.h> |
50 | #include <qlineedit.h> | 51 | #include <qlineedit.h> |
51 | #include <qlistview.h> | 52 | #include <qlistview.h> |
52 | #include <qdir.h> | 53 | #include <qdir.h> |
53 | #include <qpopupmenu.h> | 54 | #include <qpopupmenu.h> |
54 | #include <qtimer.h> | 55 | #include <qtimer.h> |
55 | #include <qlist.h> | 56 | #include <qlist.h> |
56 | #include <qfile.h> | 57 | #include <qfile.h> |
57 | 58 | ||
58 | /* STD */ | 59 | /* STD */ |
59 | #include <remotedevice.h> | 60 | #include <remotedevice.h> |
60 | #include <services.h> | 61 | #include <services.h> |
61 | #include <stdlib.h> | 62 | #include <stdlib.h> |
62 | 63 | ||
63 | using namespace OpieTooth; | 64 | using namespace OpieTooth; |
64 | //Array of possible speeds of the serial port | 65 | //Array of possible speeds of the serial port |
65 | struct SerSpeed { | 66 | struct SerSpeed { |
66 | const char* str; //string value | 67 | const char* str; //string value |
67 | int val; //value itself | 68 | int val; //value itself |
68 | } speeds[] = { | 69 | } speeds[] = { |
69 | { "150", B150 }, { "300", B300 }, { "600", B600 }, { "1200", B1200 }, | 70 | { "150", B150 }, { "300", B300 }, { "600", B600 }, { "1200", B1200 }, |
70 | { "2400", B2400 }, { "4800", B4800 }, { "9600", B9600 }, | 71 | { "2400", B2400 }, { "4800", B4800 }, { "9600", B9600 }, |
71 | { "19200", B19200 }, { "38400", B38400 }, { "57600", B57600 }, | 72 | { "19200", B19200 }, { "38400", B38400 }, { "57600", B57600 }, |
72 | { "115200", B115200} | 73 | { "115200", B115200} |
73 | }; | 74 | }; |
74 | 75 | ||
75 | BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | 76 | BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) |
76 | : BluetoothBase( parent, name, fl ) | 77 | : BluetoothBase( parent, name, fl ) |
77 | { | 78 | { |
78 | m_localDevice = new Manager( "hci0" ); | 79 | m_localDevice = new Manager( "hci0" ); |
79 | 80 | ||
80 | connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); | 81 | connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); |
81 | connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); | 82 | connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); |
82 | 83 | ||
83 | connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); | 84 | connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); |
84 | 85 | ||
85 | connect( devicesView, SIGNAL( clicked(QListViewItem*)), | 86 | connect( devicesView, SIGNAL( clicked(QListViewItem*)), |
86 | this, SLOT( startServiceActionClicked(QListViewItem*) ) ); | 87 | this, SLOT( startServiceActionClicked(QListViewItem*) ) ); |
87 | connect( devicesView, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), | 88 | connect( devicesView, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), |
88 | this, SLOT(startServiceActionHold(QListViewItem*,const QPoint&,int) ) ); | 89 | this, SLOT(startServiceActionHold(QListViewItem*,const QPoint&,int) ) ); |
89 | connect( m_localDevice , SIGNAL( foundServices(const QString&,Services::ValueList) ), | 90 | connect( m_localDevice , SIGNAL( foundServices(const QString&,Services::ValueList) ), |
90 | this, SLOT( addServicesToDevice(const QString&,Services::ValueList) ) ); | 91 | this, SLOT( addServicesToDevice(const QString&,Services::ValueList) ) ); |
91 | connect( m_localDevice, SIGNAL( available(const QString&,bool) ), | 92 | connect( m_localDevice, SIGNAL( available(const QString&,bool) ), |
92 | this, SLOT( deviceActive(const QString&,bool) ) ); | 93 | this, SLOT( deviceActive(const QString&,bool) ) ); |
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 |
105 | m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); | 107 | m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); |
106 | m_onPix = Resource::loadPixmap( "opietooth/connected" ); | 108 | m_onPix = Resource::loadPixmap( "opietooth/connected" ); |
107 | m_findPix = Resource::loadPixmap( "opietooth/find" ); | 109 | m_findPix = Resource::loadPixmap( "opietooth/find" ); |
108 | 110 | ||
109 | QPalette pal = this->palette(); | 111 | QPalette pal = this->palette(); |
110 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); | 112 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); |
111 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); | 113 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); |
112 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); | 114 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); |
113 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); | 115 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); |
114 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); | 116 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); |
115 | this->setPalette( pal ); | 117 | this->setPalette( pal ); |
116 | 118 | ||
117 | setCaption( tr( "Bluetooth Manager" ) ); | 119 | setCaption( tr( "Bluetooth Manager" ) ); |
118 | 120 | ||
119 | readConfig(); | 121 | readConfig(); |
120 | initGui(); | 122 | initGui(); |
121 | 123 | ||
122 | devicesView->setRootIsDecorated(true); | 124 | devicesView->setRootIsDecorated(true); |
123 | m_iconLoader = new BTIconLoader(); | 125 | m_iconLoader = new BTIconLoader(); |
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 | */ |
141 | void BlueBase::readConfig() | 137 | void BlueBase::readConfig() |
142 | { | 138 | { |
143 | 139 | ||
144 | Config cfg( "bluetoothmanager" ); | 140 | Config cfg( "bluetoothmanager" ); |
145 | cfg.setGroup( "bluezsettings" ); | 141 | cfg.setGroup( "bluezsettings" ); |
146 | 142 | ||
147 | m_deviceName = cfg.readEntry( "name" , "No name" ); // name the device should identify with | 143 | m_deviceName = cfg.readEntry( "name" , "No name" ); // name the device should identify with |
148 | m_defaultPasskey = cfg.readEntryCrypt( "passkey" , "" ); // <- hmm, look up how good the trolls did that, maybe too weak | 144 | m_defaultPasskey = cfg.readEntryCrypt( "passkey" , "" ); // <- hmm, look up how good the trolls did that, maybe too weak |
149 | m_useEncryption = cfg.readBoolEntry( "useEncryption" , TRUE ); | 145 | m_useEncryption = cfg.readBoolEntry( "useEncryption" , TRUE ); |
150 | m_enableAuthentification = cfg.readBoolEntry( "enableAuthentification" , TRUE ); | 146 | m_enableAuthentification = cfg.readBoolEntry( "enableAuthentification" , TRUE ); |
151 | m_enablePagescan = cfg.readBoolEntry( "enablePagescan" , TRUE ); | 147 | m_enablePagescan = cfg.readBoolEntry( "enablePagescan" , TRUE ); |
152 | m_enableInquiryscan = cfg.readBoolEntry( "enableInquiryscan" , TRUE ); | 148 | m_enableInquiryscan = cfg.readBoolEntry( "enableInquiryscan" , TRUE ); |
153 | } | 149 | } |
154 | 150 | ||
155 | /** | 151 | /** |
156 | * Writes all options to the config file | 152 | * Writes all options to the config file |
157 | */ | 153 | */ |
158 | void BlueBase::writeConfig() | 154 | void BlueBase::writeConfig() |
159 | { | 155 | { |
160 | 156 | ||
161 | Config cfg( "bluetoothmanager" ); | 157 | Config cfg( "bluetoothmanager" ); |
162 | cfg.setGroup( "bluezsettings" ); | 158 | cfg.setGroup( "bluezsettings" ); |
163 | 159 | ||
164 | cfg.writeEntry( "name" , m_deviceName ); | 160 | cfg.writeEntry( "name" , m_deviceName ); |
165 | cfg.writeEntryCrypt( "passkey" , m_defaultPasskey ); | 161 | cfg.writeEntryCrypt( "passkey" , m_defaultPasskey ); |
166 | cfg.writeEntry( "useEncryption" , m_useEncryption ); | 162 | cfg.writeEntry( "useEncryption" , m_useEncryption ); |
167 | cfg.writeEntry( "enableAuthentification" , m_enableAuthentification ); | 163 | cfg.writeEntry( "enableAuthentification" , m_enableAuthentification ); |
168 | cfg.writeEntry( "enablePagescan" , m_enablePagescan ); | 164 | cfg.writeEntry( "enablePagescan" , m_enablePagescan ); |
169 | cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); | 165 | cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); |
170 | 166 | ||
171 | writeToHciConfig(); | 167 | writeToHciConfig(); |
172 | } | 168 | } |
173 | 169 | ||
174 | /** | 170 | /** |
175 | * Modify the hcid.conf file to our needs | 171 | * Modify the hcid.conf file to our needs |
176 | */ | 172 | */ |
177 | void BlueBase::writeToHciConfig() | 173 | void BlueBase::writeToHciConfig() |
178 | { | 174 | { |
179 | QFile pinFile("/etc/bluetooth/pin"); // /etc/bluetooth/pin file | 175 | QFile pinFile("/etc/bluetooth/pin"); // /etc/bluetooth/pin file |
180 | owarn << "writeToHciConfig" << oendl; | 176 | owarn << "writeToHciConfig" << oendl; |
181 | //Write /etc/bluetooth/hcid.conf file | 177 | //Write /etc/bluetooth/hcid.conf file |
182 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); | 178 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); |
183 | hciconf.load(); | 179 | hciconf.load(); |
184 | hciconf.setPinHelper( QPEApplication::qpeDir() + "bin/bluepin" ); | 180 | hciconf.setPinHelper( QPEApplication::qpeDir() + "bin/bluepin" ); |
185 | hciconf.setName( m_deviceName ); | 181 | hciconf.setName( m_deviceName ); |
186 | hciconf.setEncrypt( m_useEncryption ); | 182 | hciconf.setEncrypt( m_useEncryption ); |
187 | hciconf.setAuth( m_enableAuthentification ); | 183 | hciconf.setAuth( m_enableAuthentification ); |
188 | hciconf.setPscan( m_enablePagescan ); | 184 | hciconf.setPscan( m_enablePagescan ); |
189 | hciconf.setIscan( m_enableInquiryscan ); | 185 | hciconf.setIscan( m_enableInquiryscan ); |
190 | hciconf.save(); | 186 | hciconf.save(); |
191 | // Write /etc/bluetooth/pin (default PIN file) | 187 | // Write /etc/bluetooth/pin (default PIN file) |
192 | pinFile.open(IO_WriteOnly | IO_Truncate); | 188 | pinFile.open(IO_WriteOnly | IO_Truncate); |
193 | pinFile.writeBlock(m_defaultPasskey, m_defaultPasskey.length()); | 189 | pinFile.writeBlock(m_defaultPasskey, m_defaultPasskey.length()); |
194 | pinFile.writeBlock("\n", sizeof("\n")); | 190 | pinFile.writeBlock("\n", sizeof("\n")); |
195 | pinFile.flush(); | 191 | pinFile.flush(); |
196 | pinFile.close(); | 192 | pinFile.close(); |
197 | } | 193 | } |
198 | 194 | ||
199 | 195 | ||
200 | /** | 196 | /** |
201 | * Read the list of already known devices | 197 | * Read the list of already known devices |
202 | */ | 198 | */ |
203 | void BlueBase::readSavedDevices() | 199 | void BlueBase::readSavedDevices() |
204 | { | 200 | { |
205 | 201 | ||
206 | QValueList<RemoteDevice> loadedDevices; | 202 | QValueList<RemoteDevice> loadedDevices; |
207 | DeviceHandler handler; | 203 | DeviceHandler handler; |
208 | loadedDevices = handler.load(); | 204 | loadedDevices = handler.load(); |
209 | 205 | ||
210 | addSearchedDevices( loadedDevices ); | 206 | addSearchedDevices( loadedDevices ); |
211 | } | 207 | } |
212 | 208 | ||
213 | 209 | ||
214 | /** | 210 | /** |
215 | * Write the list of already known devices | 211 | * Write the list of already known devices |
216 | */ | 212 | */ |
217 | void BlueBase::writeSavedDevices() | 213 | void BlueBase::writeSavedDevices() |
218 | { | 214 | { |
219 | QListViewItemIterator it( devicesView ); | 215 | QListViewItemIterator it( devicesView ); |
220 | BTListItem* item; | 216 | BTListItem* item; |
221 | BTDeviceItem* device; | 217 | BTDeviceItem* device; |
222 | RemoteDevice::ValueList list; | 218 | RemoteDevice::ValueList list; |
223 | for ( ; it.current(); ++it ) | 219 | for ( ; it.current(); ++it ) |
224 | { | 220 | { |
225 | item = (BTListItem*)it.current(); | 221 | item = (BTListItem*)it.current(); |
226 | if(item->typeId() != BTListItem::Device ) | 222 | if(item->typeId() != BTListItem::Device ) |
227 | continue; | 223 | continue; |
228 | device = (BTDeviceItem*)item; | 224 | device = (BTDeviceItem*)item; |
229 | 225 | ||
230 | list.append( device->remoteDevice() ); | 226 | list.append( device->remoteDevice() ); |
231 | } | 227 | } |
232 | /* | 228 | /* |
233 | * if not empty save the List through DeviceHandler | 229 | * if not empty save the List through DeviceHandler |
234 | */ | 230 | */ |
235 | if ( list.isEmpty() ) | 231 | if ( list.isEmpty() ) |
236 | return; | 232 | return; |
237 | DeviceHandler handler; | 233 | DeviceHandler handler; |
238 | handler.save( list ); | 234 | handler.save( list ); |
239 | } | 235 | } |
240 | 236 | ||
241 | 237 | ||
242 | /** | 238 | /** |
243 | * Set up the gui | 239 | * Set up the gui |
244 | */ | 240 | */ |
245 | void BlueBase::initGui() | 241 | void BlueBase::initGui() |
246 | { | 242 | { |
247 | StatusLabel->setText( status() ); // maybe move it to getStatus() | 243 | StatusLabel->setText( status() ); // maybe move it to getStatus() |
248 | cryptCheckBox->setChecked( m_useEncryption ); | 244 | cryptCheckBox->setChecked( m_useEncryption ); |
249 | authCheckBox->setChecked( m_enableAuthentification ); | 245 | authCheckBox->setChecked( m_enableAuthentification ); |
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 |
262 | */ | 264 | */ |
263 | QString BlueBase::status()const | 265 | QString BlueBase::status()const |
264 | { | 266 | { |
265 | QString infoString = tr( "<b>Device name : </b> Ipaq" ); | 267 | QString infoString = tr( "<b>Device name : </b> Ipaq" ); |
266 | infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" ); | 268 | infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" ); |
267 | infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" ); | 269 | infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" ); |
268 | 270 | ||
269 | return (infoString); | 271 | return (infoString); |
270 | } | 272 | } |
271 | 273 | ||
272 | 274 | ||
273 | /** | 275 | /** |
274 | * Read the current values from the gui and invoke writeConfig() | 276 | * Read the current values from the gui and invoke writeConfig() |
275 | */ | 277 | */ |
276 | void BlueBase::applyConfigChanges() | 278 | void BlueBase::applyConfigChanges() |
277 | { | 279 | { |
278 | m_deviceName = deviceNameLine->text(); | 280 | m_deviceName = deviceNameLine->text(); |
279 | m_defaultPasskey = passkeyLine->text(); | 281 | m_defaultPasskey = passkeyLine->text(); |
280 | m_useEncryption = cryptCheckBox->isChecked(); | 282 | m_useEncryption = cryptCheckBox->isChecked(); |
281 | m_enableAuthentification = authCheckBox->isChecked(); | 283 | m_enableAuthentification = authCheckBox->isChecked(); |
282 | m_enablePagescan = pagescanCheckBox->isChecked(); | 284 | m_enablePagescan = pagescanCheckBox->isChecked(); |
283 | m_enableInquiryscan = inquiryscanCheckBox->isChecked(); | 285 | m_enableInquiryscan = inquiryscanCheckBox->isChecked(); |
284 | 286 | ||
285 | writeConfig(); | 287 | writeConfig(); |
286 | 288 | ||
287 | QMessageBox::information( this, tr("Test") , tr("Changes were applied.") ); | 289 | QMessageBox::information( this, tr("Test") , tr("Changes were applied.") ); |
288 | } | 290 | } |
289 | 291 | ||
290 | /** | 292 | /** |
291 | * Launch Rfcomm Bind dialog | 293 | * Launch Rfcomm Bind dialog |
292 | * | 294 | * |
293 | */ | 295 | */ |
294 | void BlueBase::rfcommDialog() | 296 | void BlueBase::rfcommDialog() |
295 | { | 297 | { |
296 | RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp ); | 298 | RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp ); |
297 | 299 | ||
298 | if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted ) | 300 | if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted ) |
299 | { | 301 | { |
300 | rfcommAssign.saveConfig(); | 302 | rfcommAssign.saveConfig(); |
301 | } | 303 | } |
302 | } | 304 | } |
303 | 305 | ||
304 | /** | 306 | /** |
305 | * Add fresh found devices from scan dialog to the listing | 307 | * Add fresh found devices from scan dialog to the listing |
306 | * | 308 | * |
307 | */ | 309 | */ |
308 | void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) | 310 | void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) |
309 | { | 311 | { |
310 | BTDeviceItem * deviceItem; | 312 | BTDeviceItem * deviceItem; |
311 | QValueList<RemoteDevice>::ConstIterator it; | 313 | QValueList<RemoteDevice>::ConstIterator it; |
312 | 314 | ||
313 | for( it = newDevices.begin(); it != newDevices.end() ; ++it ) | 315 | for( it = newDevices.begin(); it != newDevices.end() ; ++it ) |
314 | { | 316 | { |
315 | 317 | ||
316 | if (find( (*it) )) // is already inserted | 318 | if (find( (*it) )) // is already inserted |
317 | continue; | 319 | continue; |
318 | 320 | ||
319 | deviceItem = new BTDeviceItem( devicesView , (*it) ); | 321 | deviceItem = new BTDeviceItem( devicesView , (*it) ); |
320 | deviceItem->setPixmap( 1, m_findPix ); | 322 | deviceItem->setPixmap( 1, m_findPix ); |
321 | deviceItem->setExpandable ( true ); | 323 | deviceItem->setExpandable ( true ); |
322 | 324 | ||
323 | // look if device is avail. atm, async | 325 | // look if device is avail. atm, async |
324 | deviceActive( (*it) ); | 326 | deviceActive( (*it) ); |
325 | } | 327 | } |
326 | } | 328 | } |
327 | 329 | ||
328 | 330 | ||
329 | /** | 331 | /** |
330 | * Action that is toggled on entrys on click | 332 | * Action that is toggled on entrys on click |
331 | */ | 333 | */ |
332 | void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) | 334 | void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) |
333 | {} | 335 | {} |
334 | 336 | ||
335 | 337 | ||
336 | /** | 338 | /** |
337 | * Action that are toggled on hold (mostly QPopups i guess) | 339 | * Action that are toggled on hold (mostly QPopups i guess) |
338 | */ | 340 | */ |
339 | void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) | 341 | void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) |
340 | { | 342 | { |
341 | if (!item ) | 343 | if (!item ) |
342 | return; | 344 | return; |
343 | 345 | ||
344 | QPopupMenu *menu = new QPopupMenu(); | 346 | QPopupMenu *menu = new QPopupMenu(); |
345 | 347 | ||
346 | if ( static_cast<BTListItem*>( item )->type() == "device") | 348 | if ( static_cast<BTListItem*>( item )->type() == "device") |
347 | { | 349 | { |
348 | QPopupMenu *groups = new QPopupMenu(); | 350 | QPopupMenu *groups = new QPopupMenu(); |
349 | 351 | ||
350 | menu->insertItem( static_cast<BTDeviceItem*>( item )->name(), 0 ); | 352 | menu->insertItem( static_cast<BTDeviceItem*>( item )->name(), 0 ); |
351 | menu->insertSeparator( 1 ); | 353 | menu->insertSeparator( 1 ); |
@@ -667,97 +669,113 @@ void BlueBase::startScan() | |||
667 | QObject::connect( scan, SIGNAL( selectedDevices(const QValueList<RemoteDevice>&) ), | 669 | QObject::connect( scan, SIGNAL( selectedDevices(const QValueList<RemoteDevice>&) ), |
668 | this, SLOT( addSearchedDevices(const QValueList<RemoteDevice>&) ) ); | 670 | this, SLOT( addSearchedDevices(const QValueList<RemoteDevice>&) ) ); |
669 | 671 | ||
670 | QPEApplication::showDialog( scan ); | 672 | QPEApplication::showDialog( scan ); |
671 | } | 673 | } |
672 | 674 | ||
673 | 675 | ||
674 | /** | 676 | /** |
675 | * Set the informations about the local device in information Tab | 677 | * Set the informations about the local device in information Tab |
676 | */ | 678 | */ |
677 | void BlueBase::setInfo() | 679 | void BlueBase::setInfo() |
678 | { | 680 | { |
679 | StatusLabel->setText( status() ); | 681 | StatusLabel->setText( status() ); |
680 | } | 682 | } |
681 | 683 | ||
682 | 684 | ||
683 | /** | 685 | /** |
684 | * Decontructor | 686 | * Decontructor |
685 | */ | 687 | */ |
686 | BlueBase::~BlueBase() | 688 | BlueBase::~BlueBase() |
687 | { | 689 | { |
688 | writeSavedDevices(); | 690 | writeSavedDevices(); |
689 | delete m_iconLoader; | 691 | delete m_iconLoader; |
690 | } | 692 | } |
691 | 693 | ||
692 | 694 | ||
693 | /** | 695 | /** |
694 | * find searches the ListView for a BTDeviceItem containig | 696 | * find searches the ListView for a BTDeviceItem containig |
695 | * the same Device if found return true else false | 697 | * the same Device if found return true else false |
696 | * @param dev RemoteDevice to find | 698 | * @param dev RemoteDevice to find |
697 | * @return returns true if found | 699 | * @return returns true if found |
698 | */ | 700 | */ |
699 | bool BlueBase::find( const RemoteDevice& rem ) | 701 | bool BlueBase::find( const RemoteDevice& rem ) |
700 | { | 702 | { |
701 | QListViewItemIterator it( devicesView ); | 703 | QListViewItemIterator it( devicesView ); |
702 | BTListItem* item; | 704 | BTListItem* item; |
703 | BTDeviceItem* device; | 705 | BTDeviceItem* device; |
704 | for (; it.current(); ++it ) | 706 | for (; it.current(); ++it ) |
705 | { | 707 | { |
706 | item = (BTListItem*) it.current(); | 708 | item = (BTListItem*) it.current(); |
707 | if ( item->typeId() != BTListItem::Device ) | 709 | if ( item->typeId() != BTListItem::Device ) |
708 | continue; | 710 | continue; |
709 | 711 | ||
710 | device = (BTDeviceItem*)item; | 712 | device = (BTDeviceItem*)item; |
711 | if ( rem.equals( device->remoteDevice() ) ) | 713 | if ( rem.equals( device->remoteDevice() ) ) |
712 | return true; | 714 | return true; |
713 | } | 715 | } |
714 | return false; // not found | 716 | return false; // not found |
715 | } | 717 | } |
716 | 718 | ||
717 | /** | 719 | /** |
718 | * Start process of the cell phone forwarding | 720 | * Start process of the cell phone forwarding |
719 | */ | 721 | */ |
720 | void BlueBase::doForward() | 722 | void BlueBase::doForward() |
721 | { | 723 | { |
722 | if (forwarder && forwarder->isRunning()) { | 724 | if (forwarder && forwarder->isRunning()) { |
723 | runButton->setText("start gateway"); | 725 | runButton->setText("start gateway"); |
724 | forwarder->stop(); | 726 | forwarder->stop(); |
725 | delete forwarder; | 727 | delete forwarder; |
726 | forwarder = NULL; | 728 | forwarder = NULL; |
727 | return; | 729 | return; |
728 | } | 730 | } |
729 | QString str = serDevName->text(); | 731 | QString str = serDevName->text(); |
730 | forwarder = new SerialForwarder(str, speeds[serSpeed->currentItem()].val); | 732 | forwarder = new SerialForwarder(str, speeds[serSpeed->currentItem()].val); |
731 | connect(forwarder, SIGNAL(processExited(Opie::Core::OProcess*)), | 733 | connect(forwarder, SIGNAL(processExited(Opie::Core::OProcess*)), |
732 | this, SLOT(forwardExited(Opie::Core::OProcess*))); | 734 | this, SLOT(forwardExited(Opie::Core::OProcess*))); |
733 | if (forwarder->start(OProcess::NotifyOnExit) < 0) { | 735 | if (forwarder->start(OProcess::NotifyOnExit) < 0) { |
734 | QMessageBox::critical(this, tr("Forwarder Error"), | 736 | QMessageBox::critical(this, tr("Forwarder Error"), |
735 | tr("Forwarder start error:") + tr(strerror(errno))); | 737 | tr("Forwarder start error:") + tr(strerror(errno))); |
736 | return; | 738 | return; |
737 | } | 739 | } |
738 | runButton->setText("stop gateway"); | 740 | runButton->setText("stop gateway"); |
739 | } | 741 | } |
740 | 742 | ||
741 | /** | 743 | /** |
742 | * React on the process end | 744 | * React on the process end |
743 | */ | 745 | */ |
744 | void BlueBase::forwardExit(Opie::Core::OProcess* proc) | 746 | void BlueBase::forwardExit(Opie::Core::OProcess* proc) |
745 | { | 747 | { |
746 | if (proc->exitStatus() != 0) | 748 | if (proc->exitStatus() != 0) |
747 | QMessageBox::critical(this, tr("Forwarder Error"), | 749 | QMessageBox::critical(this, tr("Forwarder Error"), |
748 | tr("Forwarder start error")); | 750 | tr("Forwarder start error")); |
749 | delete proc; | 751 | delete proc; |
750 | forwarder = NULL; | 752 | forwarder = NULL; |
751 | runButton->setText("start gateway"); | 753 | runButton->setText("start gateway"); |
752 | } | 754 | } |
753 | 755 | ||
754 | /** | 756 | /** |
755 | * Encrypt entered passkey | 757 | * Encrypt entered passkey |
756 | * doit - do encryption of the key | 758 | * doit - do encryption of the key |
757 | */ | 759 | */ |
758 | void BlueBase::doEncrypt(bool doit) | 760 | void 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 | */ | ||
768 | void 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 | |||
@@ -3,105 +3,106 @@ | |||
3 | #define BLUEBASE_H | 3 | #define BLUEBASE_H |
4 | 4 | ||
5 | #include <qvariant.h> | 5 | #include <qvariant.h> |
6 | #include <qwidget.h> | 6 | #include <qwidget.h> |
7 | #include <qscrollview.h> | 7 | #include <qscrollview.h> |
8 | #include <qsplitter.h> | 8 | #include <qsplitter.h> |
9 | #include <qlist.h> | 9 | #include <qlist.h> |
10 | #include <qpixmap.h> | 10 | #include <qpixmap.h> |
11 | 11 | ||
12 | #include "bluetoothbase.h" | 12 | #include "bluetoothbase.h" |
13 | 13 | ||
14 | #include "btserviceitem.h" | 14 | #include "btserviceitem.h" |
15 | #include "btdeviceitem.h" | 15 | #include "btdeviceitem.h" |
16 | 16 | ||
17 | #include "popuphelper.h" | 17 | #include "popuphelper.h" |
18 | 18 | ||
19 | #include "bticonloader.h" | 19 | #include "bticonloader.h" |
20 | #include "forwarder.h" | 20 | #include "forwarder.h" |
21 | 21 | ||
22 | #include <remotedevice.h> | 22 | #include <remotedevice.h> |
23 | #include <manager.h> | 23 | #include <manager.h> |
24 | 24 | ||
25 | class QVBox; | 25 | class QVBox; |
26 | class QHBoxLayout; | 26 | class QHBoxLayout; |
27 | class QGridLayout; | 27 | class QGridLayout; |
28 | class QFrame; | 28 | class QFrame; |
29 | class QLabel; | 29 | class QLabel; |
30 | class QPushButton; | 30 | class QPushButton; |
31 | class QTabWidget; | 31 | class QTabWidget; |
32 | class QCheckBox; | 32 | class QCheckBox; |
33 | class BTConnectionItem; | 33 | class BTConnectionItem; |
34 | 34 | ||
35 | 35 | ||
36 | namespace OpieTooth { | 36 | namespace OpieTooth { |
37 | 37 | ||
38 | class BlueBase : public BluetoothBase { | 38 | class BlueBase : public BluetoothBase { |
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
42 | BlueBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 42 | BlueBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
43 | ~BlueBase(); | 43 | ~BlueBase(); |
44 | 44 | ||
45 | static QString appName() { return QString::fromLatin1("bluetooth-manager"); } | 45 | static QString appName() { return QString::fromLatin1("bluetooth-manager"); } |
46 | 46 | ||
47 | protected: | 47 | protected: |
48 | 48 | ||
49 | 49 | ||
50 | private slots: | 50 | private slots: |
51 | void startScan(); | 51 | void startScan(); |
52 | 52 | ||
53 | 53 | ||
54 | private: | 54 | private: |
55 | bool find( const RemoteDevice& device ); | 55 | bool find( const RemoteDevice& device ); |
56 | void readConfig(); | 56 | void readConfig(); |
57 | void writeConfig(); | 57 | void writeConfig(); |
58 | void readSavedDevices(); | 58 | void readSavedDevices(); |
59 | void writeSavedDevices(); | 59 | void writeSavedDevices(); |
60 | void writeToHciConfig(); | 60 | void writeToHciConfig(); |
61 | QString status()const; | 61 | QString status()const; |
62 | void initGui(); | 62 | void initGui(); |
63 | void setInfo(); | 63 | void setInfo(); |
64 | 64 | ||
65 | PopupHelper m_popHelper; | 65 | PopupHelper m_popHelper; |
66 | Manager *m_localDevice; | 66 | Manager *m_localDevice; |
67 | QMap<QString,BTDeviceItem*> m_deviceList; | 67 | QMap<QString,BTDeviceItem*> m_deviceList; |
68 | 68 | ||
69 | void deviceActive( const RemoteDevice &device ); | 69 | void deviceActive( const RemoteDevice &device ); |
70 | 70 | ||
71 | QString m_deviceName; | 71 | QString m_deviceName; |
72 | QString m_defaultPasskey; | 72 | QString m_defaultPasskey; |
73 | bool m_useEncryption; | 73 | bool m_useEncryption; |
74 | bool m_enableAuthentification; | 74 | bool m_enableAuthentification; |
75 | bool m_enablePagescan; | 75 | bool m_enablePagescan; |
76 | bool m_enableInquiryscan; | 76 | bool m_enableInquiryscan; |
77 | 77 | ||
78 | QPixmap m_offPix; | 78 | QPixmap m_offPix; |
79 | QPixmap m_onPix; | 79 | QPixmap m_onPix; |
80 | QPixmap m_findPix; | 80 | QPixmap m_findPix; |
81 | 81 | ||
82 | BTIconLoader *m_iconLoader; | 82 | BTIconLoader *m_iconLoader; |
83 | SerialForwarder* forwarder; | 83 | SerialForwarder* forwarder; |
84 | 84 | ||
85 | private slots: | 85 | private slots: |
86 | void addSearchedDevices( const QValueList<RemoteDevice> &newDevices ); | 86 | void addSearchedDevices( const QValueList<RemoteDevice> &newDevices ); |
87 | void addServicesToDevices(); | 87 | void addServicesToDevices(); |
88 | void addServicesToDevice( BTDeviceItem *item ); | 88 | void addServicesToDevice( BTDeviceItem *item ); |
89 | void addServicesToDevice( const QString& device, Services::ValueList ); | 89 | void addServicesToDevice( const QString& device, Services::ValueList ); |
90 | void addConnectedDevices(); | 90 | void addConnectedDevices(); |
91 | void addConnectedDevices( ConnectionState::ValueList ); | 91 | void addConnectedDevices( ConnectionState::ValueList ); |
92 | void startServiceActionClicked( QListViewItem *item ); | 92 | void startServiceActionClicked( QListViewItem *item ); |
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 | ||
105 | } | 106 | } |
106 | 107 | ||
107 | #endif | 108 | #endif |
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 | |||
@@ -1,446 +1,457 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>BluetoothBase</class> | 2 | <class>BluetoothBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>BluetoothBase</cstring> | 7 | <cstring>BluetoothBase</cstring> |
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> |
21 | </property> | 21 | </property> |
22 | <hbox> | 22 | <hbox> |
23 | <property stdset="1"> | 23 | <property stdset="1"> |
24 | <name>margin</name> | 24 | <name>margin</name> |
25 | <number>0</number> | 25 | <number>0</number> |
26 | </property> | 26 | </property> |
27 | <property stdset="1"> | 27 | <property stdset="1"> |
28 | <name>spacing</name> | 28 | <name>spacing</name> |
29 | <number>0</number> | 29 | <number>0</number> |
30 | </property> | 30 | </property> |
31 | <widget> | 31 | <widget> |
32 | <class>QTabWidget</class> | 32 | <class>QTabWidget</class> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>name</name> | 34 | <name>name</name> |
35 | <cstring>Status</cstring> | 35 | <cstring>Status</cstring> |
36 | </property> | 36 | </property> |
37 | <property> | 37 | <property> |
38 | <name>layoutMargin</name> | 38 | <name>layoutMargin</name> |
39 | </property> | 39 | </property> |
40 | <property> | 40 | <property> |
41 | <name>layoutSpacing</name> | 41 | <name>layoutSpacing</name> |
42 | </property> | 42 | </property> |
43 | <widget> | 43 | <widget> |
44 | <class>QWidget</class> | 44 | <class>QWidget</class> |
45 | <property stdset="1"> | 45 | <property stdset="1"> |
46 | <name>name</name> | 46 | <name>name</name> |
47 | <cstring>tab</cstring> | 47 | <cstring>tab</cstring> |
48 | </property> | 48 | </property> |
49 | <attribute> | 49 | <attribute> |
50 | <name>title</name> | 50 | <name>title</name> |
51 | <string>Devices</string> | 51 | <string>Devices</string> |
52 | </attribute> | 52 | </attribute> |
53 | <vbox> | 53 | <vbox> |
54 | <property stdset="1"> | 54 | <property stdset="1"> |
55 | <name>margin</name> | 55 | <name>margin</name> |
56 | <number>4</number> | 56 | <number>4</number> |
57 | </property> | 57 | </property> |
58 | <property stdset="1"> | 58 | <property stdset="1"> |
59 | <name>spacing</name> | 59 | <name>spacing</name> |
60 | <number>2</number> | 60 | <number>2</number> |
61 | </property> | 61 | </property> |
62 | <widget> | 62 | <widget> |
63 | <class>QListView</class> | 63 | <class>QListView</class> |
64 | <column> | 64 | <column> |
65 | <property> | 65 | <property> |
66 | <name>text</name> | 66 | <name>text</name> |
67 | <string>Device Name</string> | 67 | <string>Device Name</string> |
68 | </property> | 68 | </property> |
69 | <property> | 69 | <property> |
70 | <name>clickable</name> | 70 | <name>clickable</name> |
71 | <bool>true</bool> | 71 | <bool>true</bool> |
72 | </property> | 72 | </property> |
73 | <property> | 73 | <property> |
74 | <name>resizeable</name> | 74 | <name>resizeable</name> |
75 | <bool>true</bool> | 75 | <bool>true</bool> |
76 | </property> | 76 | </property> |
77 | </column> | 77 | </column> |
78 | <column> | 78 | <column> |
79 | <property> | 79 | <property> |
80 | <name>text</name> | 80 | <name>text</name> |
81 | <string>Online</string> | 81 | <string>Online</string> |
82 | </property> | 82 | </property> |
83 | <property> | 83 | <property> |
84 | <name>clickable</name> | 84 | <name>clickable</name> |
85 | <bool>true</bool> | 85 | <bool>true</bool> |
86 | </property> | 86 | </property> |
87 | <property> | 87 | <property> |
88 | <name>resizeable</name> | 88 | <name>resizeable</name> |
89 | <bool>true</bool> | 89 | <bool>true</bool> |
90 | </property> | 90 | </property> |
91 | </column> | 91 | </column> |
92 | <property stdset="1"> | 92 | <property stdset="1"> |
93 | <name>name</name> | 93 | <name>name</name> |
94 | <cstring>devicesView</cstring> | 94 | <cstring>devicesView</cstring> |
95 | </property> | 95 | </property> |
96 | </widget> | 96 | </widget> |
97 | <widget> | 97 | <widget> |
98 | <class>QPushButton</class> | 98 | <class>QPushButton</class> |
99 | <property stdset="1"> | 99 | <property stdset="1"> |
100 | <name>name</name> | 100 | <name>name</name> |
101 | <cstring>PushButton2</cstring> | 101 | <cstring>PushButton2</cstring> |
102 | </property> | 102 | </property> |
103 | <property stdset="1"> | 103 | <property stdset="1"> |
104 | <name>sizePolicy</name> | 104 | <name>sizePolicy</name> |
105 | <sizepolicy> | 105 | <sizepolicy> |
106 | <hsizetype>0</hsizetype> | 106 | <hsizetype>0</hsizetype> |
107 | <vsizetype>0</vsizetype> | 107 | <vsizetype>0</vsizetype> |
108 | </sizepolicy> | 108 | </sizepolicy> |
109 | </property> | 109 | </property> |
110 | <property stdset="1"> | 110 | <property stdset="1"> |
111 | <name>text</name> | 111 | <name>text</name> |
112 | <string>&Rescan Devices</string> | 112 | <string>&Rescan Devices</string> |
113 | </property> | 113 | </property> |
114 | </widget> | 114 | </widget> |
115 | </vbox> | 115 | </vbox> |
116 | </widget> | 116 | </widget> |
117 | <widget> | 117 | <widget> |
118 | <class>QWidget</class> | 118 | <class>QWidget</class> |
119 | <property stdset="1"> | 119 | <property stdset="1"> |
120 | <name>name</name> | 120 | <name>name</name> |
121 | <cstring>tab</cstring> | 121 | <cstring>tab</cstring> |
122 | </property> | 122 | </property> |
123 | <attribute> | 123 | <attribute> |
124 | <name>title</name> | 124 | <name>title</name> |
125 | <string>Connections</string> | 125 | <string>Connections</string> |
126 | </attribute> | 126 | </attribute> |
127 | <vbox> | 127 | <vbox> |
128 | <property stdset="1"> | 128 | <property stdset="1"> |
129 | <name>margin</name> | 129 | <name>margin</name> |
130 | <number>4</number> | 130 | <number>4</number> |
131 | </property> | 131 | </property> |
132 | <property stdset="1"> | 132 | <property stdset="1"> |
133 | <name>spacing</name> | 133 | <name>spacing</name> |
134 | <number>2</number> | 134 | <number>2</number> |
135 | </property> | 135 | </property> |
136 | <widget> | 136 | <widget> |
137 | <class>QListView</class> | 137 | <class>QListView</class> |
138 | <column> | 138 | <column> |
139 | <property> | 139 | <property> |
140 | <name>text</name> | 140 | <name>text</name> |
141 | <string>Device Name</string> | 141 | <string>Device Name</string> |
142 | </property> | 142 | </property> |
143 | <property> | 143 | <property> |
144 | <name>clickable</name> | 144 | <name>clickable</name> |
145 | <bool>true</bool> | 145 | <bool>true</bool> |
146 | </property> | 146 | </property> |
147 | <property> | 147 | <property> |
148 | <name>resizeable</name> | 148 | <name>resizeable</name> |
149 | <bool>true</bool> | 149 | <bool>true</bool> |
150 | </property> | 150 | </property> |
151 | </column> | 151 | </column> |
152 | <column> | 152 | <column> |
153 | <property> | 153 | <property> |
154 | <name>text</name> | 154 | <name>text</name> |
155 | <string>Connection type</string> | 155 | <string>Connection type</string> |
156 | </property> | 156 | </property> |
157 | <property> | 157 | <property> |
158 | <name>clickable</name> | 158 | <name>clickable</name> |
159 | <bool>true</bool> | 159 | <bool>true</bool> |
160 | </property> | 160 | </property> |
161 | <property> | 161 | <property> |
162 | <name>resizeable</name> | 162 | <name>resizeable</name> |
163 | <bool>true</bool> | 163 | <bool>true</bool> |
164 | </property> | 164 | </property> |
165 | </column> | 165 | </column> |
166 | <column> | 166 | <column> |
167 | <property> | 167 | <property> |
168 | <name>text</name> | 168 | <name>text</name> |
169 | <string>Signal</string> | 169 | <string>Signal</string> |
170 | </property> | 170 | </property> |
171 | <property> | 171 | <property> |
172 | <name>clickable</name> | 172 | <name>clickable</name> |
173 | <bool>true</bool> | 173 | <bool>true</bool> |
174 | </property> | 174 | </property> |
175 | <property> | 175 | <property> |
176 | <name>resizeable</name> | 176 | <name>resizeable</name> |
177 | <bool>true</bool> | 177 | <bool>true</bool> |
178 | </property> | 178 | </property> |
179 | </column> | 179 | </column> |
180 | <property stdset="1"> | 180 | <property stdset="1"> |
181 | <name>name</name> | 181 | <name>name</name> |
182 | <cstring>connectionsView</cstring> | 182 | <cstring>connectionsView</cstring> |
183 | </property> | 183 | </property> |
184 | </widget> | 184 | </widget> |
185 | </vbox> | 185 | </vbox> |
186 | </widget> | 186 | </widget> |
187 | <widget> | 187 | <widget> |
188 | <class>QWidget</class> | 188 | <class>QWidget</class> |
189 | <property stdset="1"> | 189 | <property stdset="1"> |
190 | <name>name</name> | 190 | <name>name</name> |
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>&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"> |
224 | <name>title</name> | 213 | <name>title</name> |
225 | <string>Bluetooth Basic Config</string> | 214 | <string>Bluetooth Basic Config</string> |
226 | </property> | 215 | </property> |
227 | <property> | 216 | <property> |
228 | <name>layoutMargin</name> | 217 | <name>layoutMargin</name> |
229 | </property> | 218 | </property> |
230 | <property> | 219 | <property> |
231 | <name>layoutSpacing</name> | 220 | <name>layoutSpacing</name> |
232 | </property> | 221 | </property> |
233 | <grid> | 222 | <grid> |
234 | <property stdset="1"> | 223 | <property stdset="1"> |
235 | <name>margin</name> | 224 | <name>margin</name> |
236 | <number>4</number> | 225 | <number>4</number> |
237 | </property> | 226 | </property> |
238 | <property stdset="1"> | 227 | <property stdset="1"> |
239 | <name>spacing</name> | 228 | <name>spacing</name> |
240 | <number>2</number> | 229 | <number>2</number> |
241 | </property> | 230 | </property> |
242 | <widget row="0" column="0" > | 231 | <widget row="0" column="0" > |
243 | <class>QLabel</class> | 232 | <class>QLabel</class> |
244 | <property stdset="1"> | 233 | <property stdset="1"> |
245 | <name>name</name> | 234 | <name>name</name> |
246 | <cstring>deviceNameLabel</cstring> | 235 | <cstring>deviceNameLabel</cstring> |
247 | </property> | 236 | </property> |
248 | <property stdset="1"> | 237 | <property stdset="1"> |
249 | <name>text</name> | 238 | <name>text</name> |
250 | <string>Device Name</string> | 239 | <string>Device Name</string> |
251 | </property> | 240 | </property> |
252 | </widget> | 241 | </widget> |
253 | <widget row="1" column="0" > | 242 | <widget row="1" column="0" > |
254 | <class>QLabel</class> | 243 | <class>QLabel</class> |
255 | <property stdset="1"> | 244 | <property stdset="1"> |
256 | <name>name</name> | 245 | <name>name</name> |
257 | <cstring>passkeyLabel</cstring> | 246 | <cstring>passkeyLabel</cstring> |
258 | </property> | 247 | </property> |
259 | <property stdset="1"> | 248 | <property stdset="1"> |
260 | <name>text</name> | 249 | <name>text</name> |
261 | <string>Default Passkey</string> | 250 | <string>Default Passkey</string> |
262 | </property> | 251 | </property> |
263 | </widget> | 252 | </widget> |
264 | <widget row="0" column="1" > | 253 | <widget row="0" column="1" > |
265 | <class>QLineEdit</class> | 254 | <class>QLineEdit</class> |
266 | <property stdset="1"> | 255 | <property stdset="1"> |
267 | <name>name</name> | 256 | <name>name</name> |
268 | <cstring>deviceNameLine</cstring> | 257 | <cstring>deviceNameLine</cstring> |
269 | </property> | 258 | </property> |
270 | </widget> | 259 | </widget> |
271 | <widget row="1" column="1" > | 260 | <widget row="1" column="1" > |
272 | <class>QLineEdit</class> | 261 | <class>QLineEdit</class> |
273 | <property stdset="1"> | 262 | <property stdset="1"> |
274 | <name>name</name> | 263 | <name>name</name> |
275 | <cstring>passkeyLine</cstring> | 264 | <cstring>passkeyLine</cstring> |
276 | </property> | 265 | </property> |
277 | <property stdset="1"> | 266 | <property stdset="1"> |
278 | <name>echoMode</name> | 267 | <name>echoMode</name> |
279 | <enum>Password</enum> | 268 | <enum>Password</enum> |
280 | </property> | 269 | </property> |
281 | </widget> | 270 | </widget> |
282 | <widget row="2" column="1" > | 271 | <widget row="2" column="1" > |
283 | <class>QCheckBox</class> | 272 | <class>QCheckBox</class> |
284 | <property stdset="1"> | 273 | <property stdset="1"> |
285 | <name>name</name> | 274 | <name>name</name> |
286 | <cstring>encCheckBox</cstring> | 275 | <cstring>encCheckBox</cstring> |
287 | </property> | 276 | </property> |
288 | <property stdset="1"> | 277 | <property stdset="1"> |
289 | <name>text</name> | 278 | <name>text</name> |
290 | <string>encrypt</string> | 279 | <string>encrypt</string> |
291 | </property> | 280 | </property> |
292 | </widget> | 281 | </widget> |
293 | <widget row="3" column="0" rowspan="1" colspan="2" > | 282 | <widget row="3" column="0" rowspan="1" colspan="2" > |
294 | <class>QCheckBox</class> | 283 | <class>QCheckBox</class> |
295 | <property stdset="1"> | 284 | <property stdset="1"> |
296 | <name>name</name> | 285 | <name>name</name> |
297 | <cstring>authCheckBox</cstring> | 286 | <cstring>authCheckBox</cstring> |
298 | </property> | 287 | </property> |
299 | <property stdset="1"> | 288 | <property stdset="1"> |
300 | <name>text</name> | 289 | <name>text</name> |
301 | <string>enable authentification</string> | 290 | <string>enable authentification</string> |
302 | </property> | 291 | </property> |
303 | </widget> | 292 | </widget> |
304 | <widget row="4" column="0" rowspan="1" colspan="2" > | 293 | <widget row="4" column="0" rowspan="1" colspan="2" > |
305 | <class>QCheckBox</class> | 294 | <class>QCheckBox</class> |
306 | <property stdset="1"> | 295 | <property stdset="1"> |
307 | <name>name</name> | 296 | <name>name</name> |
308 | <cstring>cryptCheckBox</cstring> | 297 | <cstring>cryptCheckBox</cstring> |
309 | </property> | 298 | </property> |
310 | <property stdset="1"> | 299 | <property stdset="1"> |
311 | <name>text</name> | 300 | <name>text</name> |
312 | <string>enable encryption</string> | 301 | <string>enable encryption</string> |
313 | </property> | 302 | </property> |
314 | </widget> | 303 | </widget> |
315 | <widget row="5" column="0" rowspan="1" colspan="2" > | 304 | <widget row="5" column="0" rowspan="1" colspan="2" > |
316 | <class>QCheckBox</class> | 305 | <class>QCheckBox</class> |
317 | <property stdset="1"> | 306 | <property stdset="1"> |
318 | <name>name</name> | 307 | <name>name</name> |
319 | <cstring>pagescanCheckBox</cstring> | 308 | <cstring>pagescanCheckBox</cstring> |
320 | </property> | 309 | </property> |
321 | <property stdset="1"> | 310 | <property stdset="1"> |
322 | <name>text</name> | 311 | <name>text</name> |
323 | <string>Enable Page scan</string> | 312 | <string>Enable Page scan</string> |
324 | </property> | 313 | </property> |
325 | </widget> | 314 | </widget> |
326 | <widget row="6" column="0" rowspan="1" colspan="2" > | 315 | <widget row="6" column="0" rowspan="1" colspan="2" > |
327 | <class>QCheckBox</class> | 316 | <class>QCheckBox</class> |
328 | <property stdset="1"> | 317 | <property stdset="1"> |
329 | <name>name</name> | 318 | <name>name</name> |
330 | <cstring>inquiryscanCheckBox</cstring> | 319 | <cstring>inquiryscanCheckBox</cstring> |
331 | </property> | 320 | </property> |
332 | <property stdset="1"> | 321 | <property stdset="1"> |
333 | <name>text</name> | 322 | <name>text</name> |
334 | <string>Enable Inquiry scan</string> | 323 | <string>Enable Inquiry scan</string> |
335 | </property> | 324 | </property> |
336 | </widget> | 325 | </widget> |
337 | <widget row="7" column="0" rowspan="1" colspan="2" > | 326 | <widget row="7" column="0" rowspan="1" colspan="2" > |
338 | <class>QPushButton</class> | 327 | <class>QPushButton</class> |
339 | <property stdset="1"> | 328 | <property stdset="1"> |
340 | <name>name</name> | 329 | <name>name</name> |
341 | <cstring>configApplyButton</cstring> | 330 | <cstring>configApplyButton</cstring> |
342 | </property> | 331 | </property> |
343 | <property stdset="1"> | 332 | <property stdset="1"> |
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>&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> |
357 | </property> | 368 | </property> |
358 | <attribute> | 369 | <attribute> |
359 | <name>title</name> | 370 | <name>title</name> |
360 | <string>Status</string> | 371 | <string>Status</string> |
361 | </attribute> | 372 | </attribute> |
362 | <vbox> | 373 | <vbox> |
363 | <property stdset="1"> | 374 | <property stdset="1"> |
364 | <name>margin</name> | 375 | <name>margin</name> |
365 | <number>0</number> | 376 | <number>0</number> |
366 | </property> | 377 | </property> |
367 | <property stdset="1"> | 378 | <property stdset="1"> |
368 | <name>spacing</name> | 379 | <name>spacing</name> |
369 | <number>0</number> | 380 | <number>0</number> |
370 | </property> | 381 | </property> |
371 | <widget> | 382 | <widget> |
372 | <class>QLabel</class> | 383 | <class>QLabel</class> |
373 | <property stdset="1"> | 384 | <property stdset="1"> |
374 | <name>name</name> | 385 | <name>name</name> |
375 | <cstring>StatusLabel</cstring> | 386 | <cstring>StatusLabel</cstring> |
376 | </property> | 387 | </property> |
377 | <property stdset="1"> | 388 | <property stdset="1"> |
378 | <name>text</name> | 389 | <name>text</name> |
379 | <string>Status Label</string> | 390 | <string>Status Label</string> |
380 | </property> | 391 | </property> |
381 | </widget> | 392 | </widget> |
382 | </vbox> | 393 | </vbox> |
383 | </widget> | 394 | </widget> |
384 | <widget> | 395 | <widget> |
385 | <class>QWidget</class> | 396 | <class>QWidget</class> |
386 | <property stdset="1"> | 397 | <property stdset="1"> |
387 | <name>name</name> | 398 | <name>name</name> |
388 | <cstring>tab</cstring> | 399 | <cstring>tab</cstring> |
389 | </property> | 400 | </property> |
390 | <attribute> | 401 | <attribute> |
391 | <name>title</name> | 402 | <name>title</name> |
392 | <string>Phone</string> | 403 | <string>Phone</string> |
393 | </attribute> | 404 | </attribute> |
394 | <vbox> | 405 | <vbox> |
395 | <property stdset="1"> | 406 | <property stdset="1"> |
396 | <name>margin</name> | 407 | <name>margin</name> |
397 | <number>4</number> | 408 | <number>4</number> |
398 | </property> | 409 | </property> |
399 | <property stdset="1"> | 410 | <property stdset="1"> |
400 | <name>spacing</name> | 411 | <name>spacing</name> |
401 | <number>2</number> | 412 | <number>2</number> |
402 | </property> | 413 | </property> |
403 | <widget> | 414 | <widget> |
404 | <class>QGroupBox</class> | 415 | <class>QGroupBox</class> |
405 | <property stdset="1"> | 416 | <property stdset="1"> |
406 | <name>name</name> | 417 | <name>name</name> |
407 | <cstring>cellForwarder</cstring> | 418 | <cstring>cellForwarder</cstring> |
408 | </property> | 419 | </property> |
409 | <property stdset="1"> | 420 | <property stdset="1"> |
410 | <name>title</name> | 421 | <name>title</name> |
411 | <string>Cell Forwarder</string> | 422 | <string>Cell Forwarder</string> |
412 | </property> | 423 | </property> |
413 | <property> | 424 | <property> |
414 | <name>layoutMargin</name> | 425 | <name>layoutMargin</name> |
415 | </property> | 426 | </property> |
416 | <property> | 427 | <property> |
417 | <name>layoutSpacing</name> | 428 | <name>layoutSpacing</name> |
418 | </property> | 429 | </property> |
419 | <grid> | 430 | <grid> |
420 | <property stdset="1"> | 431 | <property stdset="1"> |
421 | <name>margin</name> | 432 | <name>margin</name> |
422 | <number>4</number> | 433 | <number>4</number> |
423 | </property> | 434 | </property> |
424 | <property stdset="1"> | 435 | <property stdset="1"> |
425 | <name>spacing</name> | 436 | <name>spacing</name> |
426 | <number>2</number> | 437 | <number>2</number> |
427 | </property> | 438 | </property> |
428 | <widget row="2" column="0" rowspan="1" colspan="3" > | 439 | <widget row="2" column="0" rowspan="1" colspan="3" > |
429 | <class>QPushButton</class> | 440 | <class>QPushButton</class> |
430 | <property stdset="1"> | 441 | <property stdset="1"> |
431 | <name>name</name> | 442 | <name>name</name> |
432 | <cstring>runButton</cstring> | 443 | <cstring>runButton</cstring> |
433 | </property> | 444 | </property> |
434 | <property stdset="1"> | 445 | <property stdset="1"> |
435 | <name>text</name> | 446 | <name>text</name> |
436 | <string>start gateway</string> | 447 | <string>start gateway</string> |
437 | </property> | 448 | </property> |
438 | </widget> | 449 | </widget> |
439 | <widget row="0" column="0" rowspan="1" colspan="2" > | 450 | <widget row="0" column="0" rowspan="1" colspan="2" > |
440 | <class>QLabel</class> | 451 | <class>QLabel</class> |
441 | <property stdset="1"> | 452 | <property stdset="1"> |
442 | <name>name</name> | 453 | <name>name</name> |
443 | <cstring>serDevLabel</cstring> | 454 | <cstring>serDevLabel</cstring> |
444 | </property> | 455 | </property> |
445 | <property stdset="1"> | 456 | <property stdset="1"> |
446 | <name>text</name> | 457 | <name>text</name> |
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 | ||
22 | static QCString k_hcidEnable("HCID_ENABLE="); | ||
23 | static QCString k_hiddEnable("HIDD_ENABLE="); | ||
24 | static QCString k_sdpdEnable("SDPD_ENABLE="); | ||
25 | static QCString k_rfcommEnable("RFCOMM_ENABLE="); | ||
26 | static QCString k_dundEnable("DUND_ENABLE="); | ||
27 | static QCString k_pandEnable("PAND_ENABLE="); | ||
28 | static QCString k_pandOpts("PAND_OPTIONS="); | ||
29 | static QCString k_dundOpts("DUND_OPTIONS="); | ||
30 | |||
31 | const 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 | |||
44 | const 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 | |||
56 | using namespace OpieTooth; | ||
57 | BTConfHandler::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 | |||
93 | BTConfHandler::~BTConfHandler() | ||
94 | { | ||
95 | } | ||
96 | |||
97 | /** | ||
98 | * getBoolArg | ||
99 | * Gets boolean argument from a string str with a keyword key | ||
100 | */ | ||
101 | bool 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 | */ | ||
111 | QString 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 | */ | ||
125 | void 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 | */ | ||
186 | void 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 | */ | ||
256 | bool 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 | */ | ||
299 | bool 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 | |||
17 | namespace 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 | |||
@@ -1,42 +1,45 @@ | |||
1 | CONFIG = qt warn_on quick-app | 1 | CONFIG = qt warn_on quick-app |
2 | HEADERS = btconnectionitem.h btdeviceitem.h \ | 2 | HEADERS = btconnectionitem.h btdeviceitem.h \ |
3 | btserviceitem.h stdpopups.h \ | 3 | btserviceitem.h stdpopups.h \ |
4 | popuphelper.h bluebase.h \ | 4 | popuphelper.h bluebase.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 | ||
13 | SOURCES = btconnectionitem.cpp btdeviceitem.cpp \ | 14 | SOURCES = 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 | ||
23 | INCLUDEPATH += $(OPIEDIR)/include | 25 | INCLUDEPATH += $(OPIEDIR)/include |
24 | INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib | 26 | INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib |
25 | DEPENDPATH += $(OPIEDIR)/include | 27 | DEPENDPATH += $(OPIEDIR)/include |
26 | LIBS += -lqpe -lbluetooth -lopietooth1 -lopiecore2 -lopieui2 -lopenobex | 28 | LIBS += -lqpe -lbluetooth -lopietooth1 -lopiecore2 -lopieui2 -lopenobex |
27 | INTERFACES = bluetoothbase.ui devicedialog.ui rfcommassigndialogbase.ui \ | 29 | INTERFACES = 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 | ||
32 | include( $(OPIEDIR)/include.pro ) | 35 | include( $(OPIEDIR)/include.pro ) |
33 | 36 | ||
34 | !isEmpty( LIBOBEXFTP_INC_DIR ) { | 37 | !isEmpty( LIBOBEXFTP_INC_DIR ) { |
35 | INCLUDEPATH += $$LIBOBEXFTP_INC_DIR | 38 | INCLUDEPATH += $$LIBOBEXFTP_INC_DIR |
36 | } | 39 | } |
37 | 40 | ||
38 | !isEmpty( LIBOBEXFTP_LIB_DIR ) { | 41 | !isEmpty( LIBOBEXFTP_LIB_DIR ) { |
39 | LIBS += $$LIBOBEXFTP_LIB_DIR/libobexftp.a | 42 | LIBS += $$LIBOBEXFTP_LIB_DIR/libobexftp.a |
40 | LIBS += $$LIBOBEXFTP_LIB_DIR/libmulticobex.a | 43 | LIBS += $$LIBOBEXFTP_LIB_DIR/libmulticobex.a |
41 | LIBS += $$LIBOBEXFTP_LIB_DIR/libbfb.a | 44 | LIBS += $$LIBOBEXFTP_LIB_DIR/libbfb.a |
42 | } | 45 | } |
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> | ||
18 | using namespace Opie::Core; | ||
19 | |||
20 | using namespace OpieTooth; | ||
21 | |||
22 | ServicesDialog::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 | |||
72 | ServicesDialog::~ServicesDialog() | ||
73 | { | ||
74 | } | ||
75 | |||
76 | void 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" | ||
15 | namespace 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> | ||