Diffstat (limited to 'noncore/settings/networksettings2/ppp') (more/less context) (show whitespace changes)
5 files changed, 15 insertions, 16 deletions
diff --git a/noncore/settings/networksettings2/ppp/PPPDialingedit.cpp b/noncore/settings/networksettings2/ppp/PPPDialingedit.cpp index 9264ceb..2b03c73 100644 --- a/noncore/settings/networksettings2/ppp/PPPDialingedit.cpp +++ b/noncore/settings/networksettings2/ppp/PPPDialingedit.cpp @@ -1,25 +1,24 @@ #include <stdio.h> #include <qcombobox.h> #include <qmessagebox.h> #include <qradiobutton.h> #include <qlineedit.h> #include <GUIUtils.h> #include "PPPDialingedit.h" PPPDialingEdit::PPPDialingEdit( QWidget * Parent ) : PPPDialingGUI( Parent ){ // populate widget stack } QString PPPDialingEdit::acceptable( void ) { return QString(); } -bool PPPDialingEdit::commit( PPPData & D ) { - bool SM; - return SM; +bool PPPDialingEdit::commit( PPPData & ) { + return true; } void PPPDialingEdit::showData( PPPData & D ) { } diff --git a/noncore/settings/networksettings2/ppp/ppp_NN.cpp b/noncore/settings/networksettings2/ppp/ppp_NN.cpp index 8c15e9c..884168c 100644 --- a/noncore/settings/networksettings2/ppp/ppp_NN.cpp +++ b/noncore/settings/networksettings2/ppp/ppp_NN.cpp @@ -1,48 +1,48 @@ #include <qfile.h> #include <resources.h> #include <qtextstream.h> #include "ppp_NN.h" #include "ppp_NNI.h" #include "netnodeinterface.h" QStringList * PPPNetNode::ProperFiles = 0; static const char * PPPNeeds[] = { "modem", 0 }; static const char * PPPProvides[] = - { "connection", + { "NetworkSetup", 0 }; /** * Constructor, find all of the possible interfaces */ -PPPNetNode::PPPNetNode() : ANetNode(tr("PPP Connection")) { +PPPNetNode::PPPNetNode() : ANetNode(tr("PPP NetworkSetup")) { NSResources->addSystemFile( "pap-secrets", "/etc/ppp/pap-secrets", 0 ); NSResources->addSystemFile( "chap-secrets", "/etc/ppp/chap-secrets", 0 ); } /** * Delete any interfaces that we own. */ PPPNetNode::~PPPNetNode(){ } const QString PPPNetNode::nodeDescription(){ return tr("\ <p>Sets up IP using PPP.</p>\ <p>Use this for dialup devices or serial setups</p>\ " ); } ANetNodeInstance * PPPNetNode::createInstance( void ) { return new APPP( this ); } diff --git a/noncore/settings/networksettings2/ppp/ppp_NNI.cpp b/noncore/settings/networksettings2/ppp/ppp_NNI.cpp index 9e3bb64..7286d96 100644 --- a/noncore/settings/networksettings2/ppp/ppp_NNI.cpp +++ b/noncore/settings/networksettings2/ppp/ppp_NNI.cpp @@ -128,108 +128,108 @@ void APPP::saveSpecificAttribute( QTextStream & TS ) { TS << "runpredisconnect=" << Data.Run.PreDisconnect << endl; TS << "runpostdisconnect=" << Data.Run.PostDisconnect << endl; } QWidget * APPP::edit( QWidget * parent ) { GUI = new PPPEdit( parent ); GUI->showData( Data ); return GUI; } QString APPP::acceptable( void ) { return ( GUI ) ? GUI->acceptable( ) : QString(); } void APPP::commit( void ) { if( GUI && GUI->commit( Data ) ) { setModified( 1 ); } } bool APPP::openFile( SystemFile & SF ) { if( SF.name() == "peers" ) { SF.setPath( removeSpaces( - QString( "/tmp/ppp/peers/" ) + connection()->name() ) ); + QString( "/tmp/ppp/peers/" ) + networkSetup()->name() ) ); return 1; } else if ( SF.name() == "chatscripts" ) { SF.setPath( removeSpaces( - QString( "/tmp/chatscripts/" ) + connection()->name() ) ); + QString( "/tmp/chatscripts/" ) + networkSetup()->name() ) ); return 1; } return 0; } short APPP::generateFile( SystemFile & SF, long DevNr ) { short rvl, rvd; rvl = 1; rvd = 1; if( SF.name() == "pap-secrets" ) { Log(("Generate PPP for %s\n", SF.name().latin1() )); if( Data.Auth.Mode == 1 && Data.Auth.PCEMode == 0 ) { SF << "# secrets for " - << connection()->name().latin1() + << networkSetup()->name().latin1() << endl; SF << Data.Auth.Client << " " << Data.Auth.Server << " " << Data.Auth.Secret << endl; rvl = 0; - rvd = connection()->getToplevel()->generateFileEmbedded( + rvd = networkSetup()->getToplevel()->generateFileEmbedded( SF, DevNr ); } } else if( SF.name() == "chap-secrets" ) { Log(("Generate PPP for %s\n", SF.name().latin1() )); if( Data.Auth.Mode == 1 && Data.Auth.PCEMode != 0 ) { // used for both EAP and Chap SF << "# secrets for " - << connection()->name().latin1() + << networkSetup()->name().latin1() << endl; SF << Data.Auth.Client << " " << Data.Auth.Server << " " << Data.Auth.Secret << endl; rvl = 0; - rvd = connection()->getToplevel()->generateFileEmbedded( + rvd = networkSetup()->getToplevel()->generateFileEmbedded( SF, DevNr ); } } else if ( SF.name() == "peers" ) { QFileInfo FI(SF.path()); Log(("Generate PPP for %s\n", SF.name().latin1() )); SF << "connect \"/usr/sbin/chat -v -f /etc/chatscripts/" << FI.baseName() << "\"" << endl; if( Data.IP.GWIsDefault ) { SF << "defaultroute" << endl; } SF << "linkname " << removeSpaces( SF.name().latin1() ) << endl; // insert other data here rvl = 0; - rvd = connection()->getToplevel()->generateFileEmbedded( + rvd = networkSetup()->getToplevel()->generateFileEmbedded( SF, DevNr ); } else if ( SF.name() == "chatscripts" ) { Log(("Generate PPP for %s\n", SF.name().latin1() )); rvl = 0; - rvd = connection()->getToplevel()->generateFileEmbedded( + rvd = networkSetup()->getToplevel()->generateFileEmbedded( SF, DevNr ); } return (rvd == 2 || rvl == 2 ) ? 2 : (rvd == 0 || rvl == 0 ) ? 0 : 1; } diff --git a/noncore/settings/networksettings2/ppp/ppprun.cpp b/noncore/settings/networksettings2/ppp/ppprun.cpp index 8403e6d..f548483 100644 --- a/noncore/settings/networksettings2/ppp/ppprun.cpp +++ b/noncore/settings/networksettings2/ppp/ppprun.cpp @@ -1,52 +1,52 @@ #include <resources.h> #include "ppprun.h" PPPRun::PPPRun( ANetNodeInstance * NNI, PPPData & Data ) : RuntimeInfo( NNI ), Pat( "eth[0-9]" ) { D = &Data; } State_t PPPRun::detectState( void ) { if( isMyPPPDRunning( ) ) { return ( isMyPPPUp() ) ? IsUp : Available; } return Off; } -QString PPPRun::setMyState( NodeCollection * NC, Action_t A, bool ) { +QString PPPRun::setMyState( NetworkSetup * , Action_t , bool ) { return QString(); } bool PPPRun::isMyPPPDRunning( void ) { return 0; } bool PPPRun::isMyPPPUp( void ) { System & S = NSResources->system(); InterfaceInfo * Run; QRegExp R( "ppp[0-9]" ); for( QDictIterator<InterfaceInfo> It(S.interfaces()); It.current(); ++It ) { Run = It.current(); if( R.match( Run->Name ) >= 0 && Run->IsPointToPoint ) { // this is a LAN card - if( Run->assignedConnection() == netNode()->connection() ) { + if( Run->assignedToNetworkSetup() == netNode()->networkSetup() ) { // assigned to us return 1; } } } return 0; } bool PPPRun::handlesInterface( const QString & S ) { return Pat.match( S ) >= 0; } bool PPPRun::handlesInterface( InterfaceInfo * I ) { return handlesInterface( I->Name ); } diff --git a/noncore/settings/networksettings2/ppp/ppprun.h b/noncore/settings/networksettings2/ppp/ppprun.h index 2990a96..9535382 100644 --- a/noncore/settings/networksettings2/ppp/ppprun.h +++ b/noncore/settings/networksettings2/ppp/ppprun.h @@ -2,36 +2,36 @@ #define PPPRUN_H #include <qregexp.h> #include <netnode.h> #include "pppdata.h" class PPPRun : public RuntimeInfo { public : PPPRun( ANetNodeInstance * NNI, PPPData & Data ); bool handlesInterface( const QString & I ); bool handlesInterface( InterfaceInfo * ); State_t detectState( void ); virtual RuntimeInfo * device( void ) { return this; } virtual RuntimeInfo * connection( void ) { return this; } protected : - QString setMyState( NodeCollection * , Action_t, bool ); + QString setMyState( NetworkSetup * , Action_t, bool ); private : bool isMyPPPDRunning( void ); bool isMyPPPUp( void ); PPPData * D; QRegExp Pat; }; #endif |