Diffstat (limited to 'noncore/settings/networksettings2/irda') (more/less context) (show whitespace changes)
5 files changed, 8 insertions, 36 deletions
diff --git a/noncore/settings/networksettings2/irda/irda_NN.cpp b/noncore/settings/networksettings2/irda/irda_NN.cpp index 49bc06e..9483e22 100644 --- a/noncore/settings/networksettings2/irda/irda_NN.cpp +++ b/noncore/settings/networksettings2/irda/irda_NN.cpp @@ -15,46 +15,35 @@ IRDANetNode::IRDANetNode() : ANetNode(tr("Infrared link")) { * Delete any interfaces that we own. */ IRDANetNode::~IRDANetNode(){ } const QString IRDANetNode::nodeDescription(){ return tr("\ <p>Sets up a infra red serial link.</p>\ " ); } ANetNodeInstance * IRDANetNode::createInstance( void ) { return new AIRDA( this ); } const char ** IRDANetNode::needs( void ) { return IRDANeeds; } const char * IRDANetNode::provides( void ) { return "line"; } -bool IRDANetNode::generateProperFilesFor( - ANetNodeInstance * ) { - return 0; -} - -bool IRDANetNode::generateDeviceDataForCommonFile( - SystemFile & , - long ) { - return 0; -} - void IRDANetNode::setSpecificAttribute( QString & , QString & ) { } void IRDANetNode::saveSpecificAttribute( QTextStream & ) { } extern "C" { void create_plugin( QList<ANetNode> & PNN ) { PNN.append( new IRDANetNode() ); } } diff --git a/noncore/settings/networksettings2/irda/irda_NN.h b/noncore/settings/networksettings2/irda/irda_NN.h index fa6408d..900bbc6 100644 --- a/noncore/settings/networksettings2/irda/irda_NN.h +++ b/noncore/settings/networksettings2/irda/irda_NN.h @@ -1,44 +1,36 @@ #ifndef IRDA_NETNODE_H #define IRDA_NETNODE_H #include "netnode.h" class AIRDA; class IRDANetNode : public ANetNode { Q_OBJECT public: IRDANetNode(); virtual ~IRDANetNode(); virtual const QString pixmapName() { return "Devices/irda"; } 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 & ) - { return 0; } - virtual bool generateDeviceDataForCommonFile( - SystemFile & SF, long DevNr ); - private: virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); }; extern "C" { void create_plugin( QList<ANetNode> & PNN ); }; #endif diff --git a/noncore/settings/networksettings2/irda/irda_NNI.cpp b/noncore/settings/networksettings2/irda/irda_NNI.cpp index f00a1d5..9cf443b 100644 --- a/noncore/settings/networksettings2/irda/irda_NNI.cpp +++ b/noncore/settings/networksettings2/irda/irda_NNI.cpp @@ -8,30 +8,24 @@ AIRDA::AIRDA( IRDANetNode * PNN ) : ANetNodeInstance( PNN ) { RT = 0; } void AIRDA::setSpecificAttribute( QString & , QString & ) { } void AIRDA::saveSpecificAttribute( QTextStream & ) { } QWidget * AIRDA::edit( QWidget * parent ) { GUI = new IRDAEdit( parent ); GUI->showData( Data ); return GUI; } QString AIRDA::acceptable( void ) { return ( GUI ) ? GUI->acceptable( ) : QString(); } void AIRDA::commit( void ) { if( GUI && GUI->commit( Data ) ) setModified( 1 ); } -bool AIRDA::generateDataForCommonFile( - SystemFile & , - long ) { - return 1; -} - diff --git a/noncore/settings/networksettings2/irda/irda_NNI.h b/noncore/settings/networksettings2/irda/irda_NNI.h index 210d87d..e21b68f 100644 --- a/noncore/settings/networksettings2/irda/irda_NNI.h +++ b/noncore/settings/networksettings2/irda/irda_NNI.h @@ -1,48 +1,42 @@ #ifndef IRDA_H #define IRDA_H #include <netnode.h> #include "irdadata.h" #include "irdarun.h" class IRDANetNode; class IRDAEdit; class AIRDA : public ANetNodeInstance { public : AIRDA( IRDANetNode * PNN ); + RuntimeInfo * runtime( void ) + { return + ( RT ) ? RT : ( RT = new IRDARun( this, Data ) ); + } + QWidget * edit( QWidget * parent ); QString acceptable( void ); void commit( void ); - RuntimeInfo * runtime( void ) - { if( RT == 0 ) - RT = new IRDARun( this, Data ); - return RT; - } - virtual void * data( void ) { return (void *)&Data; } - virtual bool hasDataFor( const QString & ) - { return 0; } - virtual bool generateDataForCommonFile( - SystemFile & SF, long DevNr ); - protected : virtual void setSpecificAttribute( QString & Attr, QString & Value ); virtual void saveSpecificAttribute( QTextStream & TS ); private : IRDAEdit * GUI; IRDAData Data; IRDARun * RT; }; #endif diff --git a/noncore/settings/networksettings2/irda/irdarun.h b/noncore/settings/networksettings2/irda/irdarun.h index 4c903cc..4258aff 100644 --- a/noncore/settings/networksettings2/irda/irdarun.h +++ b/noncore/settings/networksettings2/irda/irdarun.h @@ -1,25 +1,28 @@ #include <asline.h> #include "irdadata.h" class IRDARun : public AsLine { public : IRDARun( ANetNodeInstance * NNI, IRDAData & Data ) : AsLine( NNI ) { } virtual AsLine * asLine( void ) { return (AsLine *)this; } + virtual QString deviceFile( void ) + { return QString( "/dev/irda" ); } + protected : void detectState( NodeCollection * ) { } bool setState( NodeCollection * , Action_t, bool ) { return 0; } bool canSetState( State_t , Action_t ) { return 0; } }; |