summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NN.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usb_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usb_NN.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NN.cpp b/noncore/settings/networksettings2/usb/usb_NN.cpp
index 14c479a..bd9ae2b 100644
--- a/noncore/settings/networksettings2/usb/usb_NN.cpp
+++ b/noncore/settings/networksettings2/usb/usb_NN.cpp
@@ -1,54 +1,62 @@
1#include <resources.h>
1#include "usb_NN.h" 2#include "usb_NN.h"
2#include "usb_NNI.h" 3#include "usb_NNI.h"
3 4
4static const char * USBNeeds[] = 5static const char * USBNeeds[] =
5 { 0 6 { 0
6 }; 7 };
7 8
9static const char * USBProvides[] =
10 { "device",
11 0
12 };
13
8/** 14/**
9 * Constructor, find all of the possible interfaces 15 * Constructor, find all of the possible interfaces
10 */ 16 */
11USBNetNode::USBNetNode() : ANetNode(tr("USB Cable Connect")) { 17USBNetNode::USBNetNode() : ANetNode(tr("USB Cable Connect")) {
18 NSResources->addSystemFile(
19 "interfaces", "/etc/network/interfaces", 1 );
12} 20}
13 21
14/** 22/**
15 * Delete any interfaces that we own. 23 * Delete any interfaces that we own.
16 */ 24 */
17USBNetNode::~USBNetNode(){ 25USBNetNode::~USBNetNode(){
18} 26}
19 27
20const QString USBNetNode::nodeDescription(){ 28const QString USBNetNode::nodeDescription(){
21 return tr("\ 29 return tr("\
22<p>Configure Ethernet over USB.</p>\ 30<p>Configure Ethernet over USB.</p>\
23<p>Use this for a computer to computer USB cable connection</p>\ 31<p>Use this for a computer to computer USB cable connection</p>\
24" 32"
25); 33);
26} 34}
27 35
28ANetNodeInstance * USBNetNode::createInstance( void ) { 36ANetNodeInstance * USBNetNode::createInstance( void ) {
29 return new AUSB( this ); 37 return new AUSB( this );
30} 38}
31 39
32const char ** USBNetNode::needs( void ) { 40const char ** USBNetNode::needs( void ) {
33 return USBNeeds; 41 return USBNeeds;
34} 42}
35 43
36const char * USBNetNode::provides( void ) { 44const char ** USBNetNode::provides( void ) {
37 return "device"; 45 return USBProvides;
38} 46}
39 47
40QString USBNetNode::genNic( long ) { 48QString USBNetNode::genNic( long ) {
41 return QString( "usbf" ); 49 return QString( "usbf" );
42} 50}
43 51
44void USBNetNode::setSpecificAttribute( QString & , QString & ) { 52void USBNetNode::setSpecificAttribute( QString & , QString & ) {
45} 53}
46 54
47void USBNetNode::saveSpecificAttribute( QTextStream & ) { 55void USBNetNode::saveSpecificAttribute( QTextStream & ) {
48} 56}
49 57
50extern "C" { 58extern "C" {
51void create_plugin( QList<ANetNode> & PNN ) { 59void create_plugin( QList<ANetNode> & PNN ) {
52 PNN.append( new USBNetNode() ); 60 PNN.append( new USBNetNode() );
53} 61}
54} 62}