From 5334b639c9f97793bcae4f50f7b47c7a2ada4e2f Mon Sep 17 00:00:00 2001 From: wimpie Date: Fri, 02 Apr 2004 18:29:49 +0000 Subject: First import of NS2 app --- (limited to 'noncore/settings/networksettings2/usb/usb_NN.cpp') diff --git a/noncore/settings/networksettings2/usb/usb_NN.cpp b/noncore/settings/networksettings2/usb/usb_NN.cpp new file mode 100644 index 0000000..c65771d --- a/dev/null +++ b/noncore/settings/networksettings2/usb/usb_NN.cpp @@ -0,0 +1,60 @@ +#include "usb_NN.h" +#include "usb_NNI.h" + +static const char * USBNeeds[] = + { 0 + }; + +/** + * Constructor, find all of the possible interfaces + */ +USBNetNode::USBNetNode() : ANetNode() { +} + +/** + * Delete any interfaces that we own. + */ +USBNetNode::~USBNetNode(){ +} + +const QString USBNetNode::nodeDescription(){ + return tr("\ +

Configure Ethernet over USB.

\ +

Use this for a computer to computer USB cable connection

\ +" +); +} + +ANetNodeInstance * USBNetNode::createInstance( void ) { + return new AUSB( this ); +} + +const char ** USBNetNode::needs( void ) { + return USBNeeds; +} + +const char * USBNetNode::provides( void ) { + return "device"; +} + +bool USBNetNode::generateProperFilesFor( + ANetNodeInstance * ) { + return 1; +} + +bool USBNetNode::hasDataFor( const QString & S ) { + return (S== "interfaces"); +} + +bool USBNetNode::generateDataForCommonFile( + SystemFile & S , + long DevNr, + ANetNodeInstance * NNI) { + return ((AUSB *)NNI)->generateDataForCommonFile(S, DevNr); +} + +extern "C" { +void create_plugin( QList & PNN ) { + PNN.append( new USBNetNode() ); +} +} -- cgit v0.9.0.2