summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (ignore 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
@@ -6,38 +6,41 @@
#include "bluetoothBNEPrun.h"
class BluetoothBNEPNetNode;
class BluetoothBNEPEdit;
class ABluetoothBNEP : public ANetNodeInstance {
public :
ABluetoothBNEP( BluetoothBNEPNetNode * PNN );
QWidget * edit( QWidget * parent );
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;
};
#endif
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,36 +1,31 @@
#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 )
{ return 0; }
bool canSetState( State_t , Action_t )
{ return 0; }
bool handlesInterface( const QString & )
{ return 0; }
};
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
@@ -6,37 +6,40 @@
#include "bluetoothRFCOMMrun.h"
class BluetoothRFCOMMNetNode;
class BluetoothRFCOMMEdit;
class ABluetoothRFCOMM : public ANetNodeInstance {
public :
ABluetoothRFCOMM( BluetoothRFCOMMNetNode * PNN );
QWidget * edit( QWidget * parent );
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;
};
#endif
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
@@ -28,100 +28,96 @@ const QString BluetoothBNEPNetNode::nodeDescription(){
return tr("\
<p>Sets up a bluetooth link using the bluetooth Network profile.</p>\
<p>Use this to connect two computing devices.</p>\
"
);
}
ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) {
return new ABluetoothBNEP( this );
}
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
};
BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : ANetNode() {
}
BluetoothRFCOMMNetNode::~BluetoothRFCOMMNetNode(){
}
const QString BluetoothRFCOMMNetNode::nodeDescription(){
return tr("\
<p>Sets up a bluetooth link using the bluetooth serial profile.</p>\
<p>Use this to connect to a GSM.</p>\
"
);
}
ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) {
return new ABluetoothRFCOMM( this );
}
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
@@ -7,73 +7,73 @@ class ABluetoothBNEP;
class BluetoothBNEPNetNode : public ANetNode {
Q_OBJECT
public:
BluetoothBNEPNetNode();
virtual ~BluetoothBNEPNetNode();
virtual const QString pixmapName()
{ return "Devices/bluetooth"; }
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();
virtual ~BluetoothRFCOMMNetNode();
virtual const QString pixmapName()
{ return "Devices/bluetooth"; }
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