summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp
authorwimpie <wimpie>2005-01-04 01:35:26 (UTC)
committer wimpie <wimpie>2005-01-04 01:35:26 (UTC)
commita9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (side-by-side diff)
tree13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp
parent48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff)
downloadopie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip
opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz
opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2
CONTROL files : changed version string
NS2 many changes and first release of OT2
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp27
1 files changed, 23 insertions, 4 deletions
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,25 +1,44 @@
#include "bluetoothRFCOMMedit.h"
#include "bluetoothRFCOMM_NNI.h"
-#include "bluetooth_NN.h"
+#include "bluetoothRFCOMM_NN.h"
-ABluetoothRFCOMM::ABluetoothRFCOMM( BluetoothRFCOMMNetNode * PNN ) : ANetNodeInstance( PNN ) {
+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;
+ }
}
QWidget * ABluetoothRFCOMM::edit( QWidget * parent ) {
GUI = new BluetoothRFCOMMEdit( parent );
GUI->showData( Data );
return GUI;
}
QString ABluetoothRFCOMM::acceptable( void ) {
return ( GUI ) ? GUI->acceptable( ) : QString();
}