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/lancard | |
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/lancard') (more/less context) (show whitespace changes)
4 files changed, 10 insertions, 51 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp index 05cd06d..20ae7f6 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp @@ -29,47 +29,24 @@ ANetNodeInstance * LanCardNetNode::createInstance( void ) { return new ALanCard( this ); } const char ** LanCardNetNode::needs( void ) { return LanCardNeeds; } const char * LanCardNetNode::provides( void ) { return "device"; } -bool LanCardNetNode::generateProperFilesFor( - ANetNodeInstance * ) { - return 0; -} - -bool LanCardNetNode::hasDataFor( const QString & S ) { - return S == "interfaces"; -} - -bool LanCardNetNode::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 LanCardNetNode::genNic( long nr ) { QString S; return S.sprintf( "eth%ld", nr ); } void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { if( A == "interfacecount" ) { InstanceCount = V.toLong(); } else if ( A == "macaddress" ) { NICMACAddresses.append( V ); } } diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.h b/noncore/settings/networksettings2/lancard/lancard_NN.h index d58823c..6882af7 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.h +++ b/noncore/settings/networksettings2/lancard/lancard_NN.h @@ -9,41 +9,34 @@ class ALanCard; class LanCardNetNode : public ANetNode{ Q_OBJECT public: LanCardNetNode(); virtual ~LanCardNetNode(); virtual const QString pixmapName() { return "Devices/card"; } - virtual const QString nodeDescription() ; + virtual QString genNic( long ); + virtual long instanceCount( void ) + { return InstanceCount; } + 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 & SF, long DevNr ); - - virtual long instanceCount( void ) - { return InstanceCount; } - - virtual QString genNic( long ); - virtual QStringList & addressesOfNIC( void ) + QStringList & addressesOfNIC( void ) { return NICMACAddresses; } private: virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); // number of interfaces for this device long InstanceCount; QStringList NICMACAddresses; diff --git a/noncore/settings/networksettings2/lancard/lancard_NNI.cpp b/noncore/settings/networksettings2/lancard/lancard_NNI.cpp index 99c033e..9fb05b9 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NNI.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NNI.cpp @@ -34,18 +34,12 @@ QWidget * ALanCard::edit( QWidget * parent ) { return GUI; } QString ALanCard::acceptable( void ) { return ( GUI ) ? GUI->acceptable( ) : QString(); } void ALanCard::commit( void ) { if( GUI && GUI->commit( Data ) ) setModified( 1 ); } -bool ALanCard::generateDataForCommonFile( - SystemFile & , - long ) { - return 1; -} - diff --git a/noncore/settings/networksettings2/lancard/lancard_NNI.h b/noncore/settings/networksettings2/lancard/lancard_NNI.h index 4e91523..8e55a19 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NNI.h +++ b/noncore/settings/networksettings2/lancard/lancard_NNI.h @@ -5,41 +5,36 @@ #include "lancarddata.h" #include "lancardrun.h" class LanCardNetNode; class LanCardEdit; class ALanCard : public ANetNodeInstance { public : ALanCard( LanCardNetNode * PNN ); + RuntimeInfo * runtime( void ) + { return + ( RT ) ? RT : ( RT = new LanCardRun( this, Data ) ); + } + QWidget * edit( QWidget * parent ); QString acceptable( void ); void commit( void ); - RuntimeInfo * runtime( void ) - { if( RT == 0 ) - RT = new LanCardRun( this, Data ); - return RT; - } - virtual void * data( void ) { return (void *)&Data; } - virtual bool hasDataFor( const QString & ) - { return 0; } - virtual bool generateDataForCommonFile( - SystemFile & S, long DevNr ); protected : virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); private : LanCardEdit * GUI; LanCardData Data; LanCardRun * RT; }; |