summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp
index 73312c6..d8420b9 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp
@@ -1,19 +1,32 @@
#include "bluetoothBNEPedit.h"
#include "bluetoothBNEP_NNI.h"
#include "bluetooth_NN.h"
-ABluetoothBNEP::ABluetoothBNEP( BluetoothBNEPNetNode * PNN ) : ANetNodeInstance( PNN ) {
+ABluetoothBNEP::ABluetoothBNEP( BluetoothBNEPNetNode * PNN ) :
+ ANetNodeInstance( PNN ), Data() {
GUI = 0;
RT = 0;
+ Data.AllowAll = 1;
}
-void ABluetoothBNEP::setSpecificAttribute( QString & , QString & ) {
+void ABluetoothBNEP::setSpecificAttribute( QString & S, QString & A ) {
+ if( S == "bdaddress" ) {
+ Data.BDAddress << A;
+ } else if ( S == "allowall" ) {
+ Data.AllowAll = 1;
+ }
}
-void ABluetoothBNEP::saveSpecificAttribute( QTextStream & ) {
+void ABluetoothBNEP::saveSpecificAttribute( QTextStream & TS ) {
+ TS << "allowall=" << Data.AllowAll << endl;
+ for ( QStringList::Iterator it = Data.BDAddress.begin();
+ it != Data.BDAddress.end();
+ ++it ) {
+ TS << "bdaddress=" << (*it) << endl;
+ }
}
QWidget * ABluetoothBNEP::edit( QWidget * parent ) {
GUI = new BluetoothBNEPEdit( parent );
GUI->showData( Data );
return GUI;