From 2a7afda8b7daf4a43e370dba09e43e7f5058ab49 Mon Sep 17 00:00:00 2001 From: wimpie Date: Tue, 04 Jan 2005 01:39:32 +0000 Subject: More NS2 files --- (limited to 'noncore/settings/networksettings2/gprs/GPRS_NN.cpp') diff --git a/noncore/settings/networksettings2/gprs/GPRS_NN.cpp b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp new file mode 100644 index 0000000..5393324 --- a/dev/null +++ b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp @@ -0,0 +1,80 @@ +#include +#include +#include +#include "GPRS_NN.h" +#include "GPRS_NNI.h" + +static const char * GPRSNeeds[] = + { "GPRS", + 0 + }; + +static const char * GPRSProvides[] = + { "connection", + 0 + }; + +/** + * Constructor, find all of the possible interfaces + */ +GPRSNetNode::GPRSNetNode() : ANetNode(tr("GPRS capable device")) { + NSResources->addSystemFile( + "pap-secrets", "/etc/ppp/pap-secrets", 0 ); +} + +/** + * Delete any interfaces that we own. + */ +GPRSNetNode::~GPRSNetNode(){ +} + +const QString GPRSNetNode::nodeDescription(){ + return tr("\ +

provides access to a GPRS capable device.

\ +" +); +} + +ANetNodeInstance * GPRSNetNode::createInstance( void ) { + return new AGPRSDevice( this ); +} + +bool GPRSNetNode::hasDataForFile( SystemFile & S ) { + return S.name() == "pap-secrets"; +} + +short GPRSNetNode::generateFile( SystemFile & , + ANetNodeInstance * , + long ) { + + return 0; +} + +const char ** GPRSNetNode::needs( void ) { + return GPRSNeeds; +} + +const char ** GPRSNetNode::provides( void ) { + return GPRSProvides; +} + +void GPRSNetNode::setSpecificAttribute( QString & , QString & ) { +} + +void GPRSNetNode::saveSpecificAttribute( QTextStream & ) { +} + +QStringList GPRSNetNode::properFiles( void ) { + QStringList SL; + + SL << "peers"; + SL << "chatscripts"; + SL << "extra"; + return SL; +} + +extern "C" { +void create_plugin( QList & PNN ) { + PNN.append( new GPRSNetNode() ); +} +} -- cgit v0.9.0.2