From a9c188235c97e07b0eb96b13adbcdfd4bad64767 Mon Sep 17 00:00:00 2001 From: wimpie Date: Tue, 04 Jan 2005 01:35:26 +0000 Subject: CONTROL files : changed version string NS2 many changes and first release of OT2 --- (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp') diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp index 7ec8288..d19386e 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp @@ -1,16 +1,35 @@ #include "bluetoothRFCOMMedit.h" #include "bluetoothRFCOMM_NNI.h" -#include "bluetooth_NN.h" +#include "bluetoothRFCOMM_NN.h" -ABluetoothRFCOMM::ABluetoothRFCOMM( BluetoothRFCOMMNetNode * PNN ) : ANetNodeInstance( PNN ) { - GUI = 0; - RT = 0; +ABluetoothRFCOMM::ABluetoothRFCOMM( BluetoothRFCOMMNetNode * PNN ) : + ANetNodeInstance( PNN ), Data() { + Data.Devices.setAutoDelete( TRUE ); + GUI = 0; + RT = 0; } -void ABluetoothRFCOMM::setSpecificAttribute( QString & , QString & ) { +void ABluetoothRFCOMM::setSpecificAttribute( QString & A, QString & V) { + + if( A == "bdaddress" ) { + Data.Devices.resize( Data.Devices.size() + 1 ); + Data.Devices.insert( Data.Devices.size() - 1, new RFCOMMChannel); + Data.Devices[ Data.Devices.size() - 1 ]->BDAddress = V; + } else if ( A == "channel" ) { + Data.Devices[ Data.Devices.size() - 1 ]->Channel = V.toLong(); + } else if ( A == "name" ) { + Data.Devices[ Data.Devices.size() - 1 ]->Name = V; + } } -void ABluetoothRFCOMM::saveSpecificAttribute( QTextStream & ) { +void ABluetoothRFCOMM::saveSpecificAttribute( QTextStream & TS ) { + for( unsigned int i = 0 ; + i < Data.Devices.count(); + i ++ ) { + TS << "bdaddress=" << Data.Devices[i]->BDAddress << endl; + TS << "name=" << quote( Data.Devices[i]->Name ) << endl; + TS << "channel=" << Data.Devices[i]->Channel << endl; + } } -- cgit v0.9.0.2