Diffstat (limited to 'noncore/settings/networksettings2/gprs') (more/less context) (ignore whitespace changes)
4 files changed, 13 insertions, 13 deletions
diff --git a/noncore/settings/networksettings2/gprs/GPRS_NN.cpp b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp index e9553a6..374cf5a 100644 --- a/noncore/settings/networksettings2/gprs/GPRS_NN.cpp +++ b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp @@ -3,25 +3,25 @@ #include <netnode.h> #include "GPRS_NN.h" #include "GPRS_NNI.h" #include "netnodeinterface.h" static const char * GPRSNeeds[] = { "GPRS", 0 }; static const char * GPRSProvides[] = - { "connection", + { "NetworkSetup", 0 }; /** * Constructor, find all of the possible interfaces */ GPRSNetNode::GPRSNetNode() : ANetNode(tr("GPRS capable device")) { NSResources->addSystemFile( "pap-secrets", "/etc/ppp/pap-secrets", 0 ); } /** diff --git a/noncore/settings/networksettings2/gprs/GPRS_NNI.cpp b/noncore/settings/networksettings2/gprs/GPRS_NNI.cpp index 2f61cba..bf8cc59 100644 --- a/noncore/settings/networksettings2/gprs/GPRS_NNI.cpp +++ b/noncore/settings/networksettings2/gprs/GPRS_NNI.cpp @@ -113,51 +113,51 @@ short AGPRSDevice::generateFile( SystemFile & SF, << Data.APN << "\"" << oendl; SF << "OK ATD*99***1#\\n" << oendl; SF << "TIMEOUT 10" << oendl; SF << "CONNECT \"\"" << oendl; SF << "SAY \"READY\\n\"" << oendl; return 0; } else if( SF.name() == "peers" ) { SF << "noauth" << oendl; SF << "user " << Data.User << oendl; SF << "connect \"/usr/sbin/chat -s -v -f /etc/chatscripts/" - << removeSpaces( connection()->name() ) + << removeSpaces( networkSetup()->name() ) << "\"" << oendl; SF << "ipcp-accept-local" << oendl; SF << "ipcp-accept-remote" << oendl; if( Data.DefaultGateway ) { SF << "defaultroute" << oendl; if( Data.SetIfSet ) { SF << "replacedefaultroute" << oendl; } } if( Data.Debug ) { SF << "logfile /tmp/" - << removeSpaces( connection()->name() ) + << removeSpaces( networkSetup()->name() ) << oendl; for( int i = 0; i < Data.Debug; i ++ ) { SF << "debug" << oendl; } } SF << "nocrtscts" << oendl; SF << "local" << oendl; SF << "lcp-echo-interval 0" << oendl; SF << "lcp-echo-failure 0" << oendl; SF << "usepeerdns" << oendl; - SF << "linkname " << removeSpaces( connection()->name() ) << oendl; + SF << "linkname " << removeSpaces( networkSetup()->name() ) << oendl; SF << "nopersist" << oendl; - SF << "ipparam " << removeSpaces( connection()->name() ) <<oendl; + SF << "ipparam " << removeSpaces( networkSetup()->name() ) <<oendl; SF << "maxfail 1" << oendl; return 0; } else if( SF.name() == "extra" ) { unsigned long Bits; // generate 'fixed' settings for( unsigned int i = 0 ; i < Data.Routing.count(); i ++ ) { if( Data.Routing[i]->Mask == 32 ) { Bits = 0xffffffff; } else { Bits = ~ ((1 << ((32-Data.Routing[i]->Mask))) - 1); @@ -183,49 +183,49 @@ short AGPRSDevice::generateFile( SystemFile & SF, << "." << ((Bits&0x0000ff00)>>8) << "." << ((Bits&0x000000ff)) << " gw $PPP_REMOTE" << oendl; } if( ! Data.DNS1.isEmpty() ) { SF << "nameserver " << Data.DNS1 << " # profile " - << removeSpaces( connection()->name() ) + << removeSpaces( networkSetup()->name() ) <<oendl; } if( ! Data.DNS2.isEmpty() ) { SF << "nameserver " << Data.DNS2 << " # profile " - << removeSpaces( connection()->name() ) + << removeSpaces( networkSetup()->name() ) <<oendl; } } return 1; } bool AGPRSDevice::openFile( SystemFile & SF ) { if( SF.name() == "peers" ) { SF.setPath( QString( "/etc/ppp/peers/" ) + - removeSpaces( connection()->name() ) + removeSpaces( networkSetup()->name() ) ); return 1; } else if ( SF.name() == "chatscripts" ) { SF.setPath( QString( "/etc/chatscripts/" ) + - removeSpaces( connection()->name() ) + removeSpaces( networkSetup()->name() ) ); return 1; } else if ( SF.name() == "extra" ) { SF.setPath( QString( "/etc/ppp/" ) + - removeSpaces( connection()->name() ) + ".fixed" + removeSpaces( networkSetup()->name() ) + ".fixed" ); return 1; } return 0; } diff --git a/noncore/settings/networksettings2/gprs/GPRSrun.cpp b/noncore/settings/networksettings2/gprs/GPRSrun.cpp index cccc71a..fd61f3a 100644 --- a/noncore/settings/networksettings2/gprs/GPRSrun.cpp +++ b/noncore/settings/networksettings2/gprs/GPRSrun.cpp @@ -2,25 +2,25 @@ #include <signal.h> #include <errno.h> #include <qdir.h> #include <system.h> #include <resources.h> #include <netnode.h> #include "GPRSrun.h" State_t GPRSRun::detectState( void ) { // is pppd still running ? // is rfcomm still active - NodeCollection * NC = nodeCollection(); + NetworkSetup * NC = networkSetup(); InterfaceInfo * I = NC->assignedInterface(); QDir D("/var/run"); if( I ) { // has some pppx attached return ( I->IsUp ) ? IsUp : Available; } // check ppp itself and figure out interface odebug << "Check for ppp " << NC->name() << oendl; @@ -53,25 +53,25 @@ State_t GPRSRun::detectState( void ) { return Available; } else { // pppd is down PPPPid = 0; } } // else pppd is down } NC->assignInterface( 0 ); return Unknown; } -QString GPRSRun::setMyState( NodeCollection * NC, Action_t A , bool ) { +QString GPRSRun::setMyState( NetworkSetup * NC, Action_t A , bool ) { if( A == Up ) { // start ppp on deviceFile QStringList SL; SL << "pon" << removeSpaces( NC->name() ) << NC->device()->deviceFile(); if( ! NSResources->system().execAsUser( SL ) ) { return QString("Cannot start pppd for %1").arg(NC->name()); } } else if ( A == Down ) { diff --git a/noncore/settings/networksettings2/gprs/GPRSrun.h b/noncore/settings/networksettings2/gprs/GPRSrun.h index 817f8a9..c3c2015 100644 --- a/noncore/settings/networksettings2/gprs/GPRSrun.h +++ b/noncore/settings/networksettings2/gprs/GPRSrun.h @@ -15,20 +15,20 @@ public : bool handlesInterface( const QString & I ); bool handlesInterface( InterfaceInfo * ); virtual RuntimeInfo * device( void ) { return this; } virtual RuntimeInfo * connection( void ) { return this; } State_t detectState( void ); protected : - QString setMyState( NodeCollection * , Action_t, bool ); + QString setMyState( NetworkSetup * , Action_t, bool ); private : QRegExp Pat; size_t PPPPid; }; |