summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h3
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h5
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h3
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp24
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetooth_NN.h16
5 files changed, 24 insertions, 27 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h
index a21f574..bb3e7e7 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h
@@ -18,24 +18,27 @@ public :
QString acceptable( void );
void commit( void );
RuntimeInfo * runtime( void )
{ if( RT == 0 )
RT = new BluetoothBNEPRun( this, Data );
return RT;
}
virtual void * data( void )
{ return (void *)&Data; }
+ virtual bool hasDataFor( const QString & S );
+ virtual bool generateDataForCommonFile( SystemFile & SF, long );
+
protected :
virtual void setSpecificAttribute( QString & Attr, QString & Value );
virtual void saveSpecificAttribute( QTextStream & TS );
private :
BluetoothBNEPEdit * GUI;
BluetoothBNEPData Data;
BluetoothBNEPRun * RT;
};
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h
index 347da0c..4a773cd 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h
@@ -1,28 +1,23 @@
#include <asdevice.h>
#include "bluetoothBNEPdata.h"
class BluetoothBNEPRun : public AsDevice {
public :
BluetoothBNEPRun( ANetNodeInstance * NNI,
BluetoothBNEPData & Data ) : AsDevice( NNI )
{ }
- virtual long count( void )
- { return 3; }
- virtual QString genNic( long nr )
- { QString S; return S.sprintf( "bnep%ld", nr ); }
-
virtual AsDevice * asDevice( void )
{ return (AsDevice *)this; }
virtual AsDevice * device( void )
{ return asDevice(); }
protected :
void detectState( NodeCollection * )
{ }
bool setState( NodeCollection * , Action_t )
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h
index 57ff95e..97bd29c 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h
@@ -18,24 +18,27 @@ public :
QString acceptable( void );
void commit( void );
RuntimeInfo * runtime( void )
{ if( RT == 0 )
RT = new BluetoothRFCOMMRun( this, Data );
return RT;
}
virtual void * data( void )
{ return (void *)&Data; }
+ virtual bool hasDataFor( const QString & S );
+ virtual bool generateDataForCommonFile( SystemFile & SF, long );
+
protected :
virtual void setSpecificAttribute( QString & Attr, QString & Value );
virtual void saveSpecificAttribute( QTextStream & TS );
private :
BluetoothRFCOMMEdit * GUI;
BluetoothRFCOMMData Data;
BluetoothRFCOMMRun * RT;
};
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
index 47272c4..3d1aa69 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
@@ -40,40 +40,37 @@ const char ** BluetoothBNEPNetNode::needs( void ) {
return BluetoothBNEPNeeds;
}
const char * BluetoothBNEPNetNode::provides( void ) {
return "device";
}
bool BluetoothBNEPNetNode::generateProperFilesFor(
ANetNodeInstance * ) {
return 1;
}
-bool BluetoothBNEPNetNode::hasDataFor( const QString & S, bool DS ) {
- return DS && S == "interfaces";
+bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) {
+ return S == "interfaces";
}
-bool BluetoothBNEPNetNode::generateDataForCommonFile(
+bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile(
SystemFile & ,
- long ,
- ANetNodeInstance * ) {
+ long ) {
return 1;
}
-bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile(
- SystemFile & ,
- long ,
- ANetNodeInstance * ) {
- return 1;
+QString BluetoothBNEPNetNode::genNic( long nr ) {
+ QString S;
+ return S.sprintf( "bnep%ld", nr );
}
//
//
// BLUETOOTH PAN/NAP node
//
//
static const char * BluetoothRFCOMMNeeds[] =
{ 0
};
@@ -99,29 +96,28 @@ const char ** BluetoothRFCOMMNetNode::needs( void ) {
return BluetoothRFCOMMNeeds;
}
const char * BluetoothRFCOMMNetNode::provides( void ) {
return "line";
}
bool BluetoothRFCOMMNetNode::generateProperFilesFor(
ANetNodeInstance * ) {
return 0;
}
-bool BluetoothRFCOMMNetNode::hasDataFor( const QString &, bool ) {
+bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) {
return 0;
}
-bool BluetoothRFCOMMNetNode::generateDataForCommonFile(
+bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile(
SystemFile & ,
- long,
- ANetNodeInstance * ) {
+ long ) {
return 0;
}
extern "C" {
void create_plugin( QList<ANetNode> & PNN ) {
PNN.append( new BluetoothBNEPNetNode() );
PNN.append( new BluetoothRFCOMMNetNode() );
}
}
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h
index d72b0d4..5cd6c52 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h
+++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h
@@ -19,29 +19,31 @@ public:
virtual const QString nodeName()
{ return tr("Bluetooth PAN/NAP"); }
virtual const QString nodeDescription() ;
virtual ANetNodeInstance * createInstance( void );
virtual const char ** needs( void );
virtual const char * provides( void );
virtual bool generateProperFilesFor( ANetNodeInstance * NNI );
- virtual bool hasDataFor( const QString & S, bool DS );
- virtual bool generateDataForCommonFile(
- SystemFile & SF, long DevNr, ANetNodeInstance * NNI );
+ virtual bool hasDataFor( const QString & S );
virtual bool generateDeviceDataForCommonFile(
- SystemFile & SF, long DevNr, ANetNodeInstance * NNI );
+ SystemFile & , long DevNr );
+
+ virtual long instanceCount( void )
+ { return 7; }
+ virtual QString genNic( long );
private:
};
class BluetoothRFCOMMNetNode : public ANetNode {
Q_OBJECT
public:
BluetoothRFCOMMNetNode();
@@ -52,28 +54,26 @@ public:
virtual const QString nodeName()
{ return tr("Bluetooth serial link"); }
virtual const QString nodeDescription() ;
virtual ANetNodeInstance * createInstance( void );
virtual const char ** needs( void );
virtual const char * provides( void );
virtual bool generateProperFilesFor( ANetNodeInstance * NNI );
- virtual bool hasDataFor( const QString & S, bool );
- virtual bool generateDataForCommonFile(
- SystemFile & SF, long, ANetNodeInstance * NNI );
+ virtual bool hasDataFor( const QString & S );
virtual bool generateDeviceDataForCommonFile(
- SystemFile & SF, long, ANetNodeInstance * NNI );
+ SystemFile & , long );
private:
};
extern "C"
{
void create_plugin( QList<ANetNode> & PNN );
};
#endif