author | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
commit | 8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (side-by-side diff) | |
tree | aa5f9b14c249217b4d3fc30f4771bdaf1c3545d3 /noncore/settings/networksettings2/bluetooth | |
parent | ef64880308b5035cc8ca2e4e79325db613af525b (diff) | |
download | opie-8f215ba9ceb395f262517855a99d7d2d303ca760.zip opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.gz opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.bz2 |
MANY changes
- now generates peers/pap-chap secrets files
(no chatscript yet)
(not all usefull ppp options included yet)
- still not ready for prime time yet
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (show whitespace changes)
7 files changed, 17 insertions, 91 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp index d8420b9..398dcdc 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.cpp @@ -37,14 +37,6 @@ QString ABluetoothBNEP::acceptable( void ) { } void ABluetoothBNEP::commit( void ) { if( GUI && GUI->commit( Data ) ) setModified( 1 ); } - -bool ABluetoothBNEP::hasDataFor( const QString & ) { - return 0; -} - -bool ABluetoothBNEP::generateDataForCommonFile( SystemFile & , long ){ - return 0; -} diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h index bb3e7e7..1bf0f48 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NNI.h @@ -11,28 +11,24 @@ class BluetoothBNEPEdit; class ABluetoothBNEP : public ANetNodeInstance { public : ABluetoothBNEP( BluetoothBNEPNetNode * PNN ); + RuntimeInfo * runtime( void ) + { return + ( RT ) ? RT : ( RT = new BluetoothBNEPRun( this, Data ) ); + } + 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 : diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp index cff2639..7ec8288 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.cpp @@ -25,14 +25,6 @@ QString ABluetoothRFCOMM::acceptable( void ) { } void ABluetoothRFCOMM::commit( void ) { if( GUI->commit( Data ) ) setModified( 1 ); } - -bool ABluetoothRFCOMM::hasDataFor( const QString & ) { - return 0; -} - -bool ABluetoothRFCOMM::generateDataForCommonFile( SystemFile & , long ){ - return 0; -} diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h index 97bd29c..820fc17 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMM_NNI.h @@ -11,28 +11,24 @@ class BluetoothRFCOMMEdit; class ABluetoothRFCOMM : public ANetNodeInstance { public : ABluetoothRFCOMM( BluetoothRFCOMMNetNode * PNN ); + RuntimeInfo * runtime( void ) + { return + ( RT ) ? RT : ( RT = new BluetoothRFCOMMRun( this, Data ) ); + } + 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 : diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h index aff1f59..65fd686 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h @@ -9,12 +9,15 @@ public : BluetoothRFCOMMData & Data ) : AsLine( NNI ) { } virtual AsLine * asLine( void ) { return (AsLine *)this; } + virtual QString deviceFile( void ) + { return QString( "/dev/rfcomm..." ); } + protected : void detectState( NodeCollection * ) { } bool setState( NodeCollection * , Action_t, bool ) diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp index b59b4f0..443a627 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp @@ -43,35 +43,12 @@ const char ** BluetoothBNEPNetNode::needs( void ) { } const char * BluetoothBNEPNetNode::provides( void ) { return "device"; } -bool BluetoothBNEPNetNode::generateProperFilesFor( - ANetNodeInstance * ) { - return 0; -} - -bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { - return S == "interfaces"; -} - -bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( - SystemFile & S , - long DevNr) { - QString NIC = genNic( DevNr ); - - if( S.name() == "interfaces" ) { - // generate mapping stanza for this interface - S << "# check if " << NIC << " can be brought UP" << endl; - S << "mapping " << NIC << endl; - S << " script networksettings2-request" << endl << endl; - } - return 0; -} - QString BluetoothBNEPNetNode::genNic( long nr ) { QString S; return S.sprintf( "bnep%ld", nr ); } @@ -121,27 +98,12 @@ const char ** BluetoothRFCOMMNetNode::needs( void ) { } const char * BluetoothRFCOMMNetNode::provides( void ) { return "line"; } -bool BluetoothRFCOMMNetNode::generateProperFilesFor( - ANetNodeInstance * ) { - return 0; -} - -bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) { - return 0; -} - -bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile( - SystemFile & , - long ) { - return 0; -} - void BluetoothRFCOMMNetNode::setSpecificAttribute( QString &, QString & ) { } void BluetoothRFCOMMNetNode::saveSpecificAttribute( QTextStream & ) { } diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h index 2e5e1d2..4d6a3c1 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h @@ -11,30 +11,22 @@ class BluetoothBNEPNetNode : public ANetNode { public: BluetoothBNEPNetNode(); virtual ~BluetoothBNEPNetNode(); + virtual QString genNic( long ); + virtual long instanceCount( void ) + { return InstanceCount; } virtual const QString pixmapName() { return "Devices/bluetooth"; } 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 ); - virtual bool generateDeviceDataForCommonFile( - SystemFile & , long DevNr ); - - virtual long instanceCount( void ) - { return InstanceCount; } - virtual QString genNic( long ); + virtual const char ** needs( void ); private: virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); @@ -53,23 +45,16 @@ public: virtual ~BluetoothRFCOMMNetNode(); virtual const QString pixmapName() { return "Devices/bluetooth"; } 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 ); - virtual bool generateDeviceDataForCommonFile( - SystemFile & , long ); - private: virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); }; |