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.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NN.cpp b/noncore/settings/networksettings2/usb/usb_NN.cpp index 9c07b82..6d90ae0 100644 --- a/noncore/settings/networksettings2/usb/usb_NN.cpp +++ b/noncore/settings/networksettings2/usb/usb_NN.cpp | |||
@@ -1,34 +1,30 @@ | |||
1 | #include <resources.h> | 1 | #include <resources.h> |
2 | #include "usb_NN.h" | 2 | #include "usb_NN.h" |
3 | #include "usb_NNI.h" | 3 | #include "usb_NNI.h" |
4 | 4 | ||
5 | #ifndef MYPLUGIN | ||
6 | |||
7 | #include "netnodeinterface.h" | 5 | #include "netnodeinterface.h" |
8 | 6 | ||
9 | #endif | ||
10 | |||
11 | static const char * USBNeeds[] = | 7 | static const char * USBNeeds[] = |
12 | { 0 | 8 | { 0 |
13 | }; | 9 | }; |
14 | 10 | ||
15 | static const char * USBProvides[] = | 11 | static const char * USBProvides[] = |
16 | { "device", | 12 | { "device", |
17 | 0 | 13 | 0 |
18 | }; | 14 | }; |
19 | 15 | ||
20 | /** | 16 | /** |
21 | * Constructor, find all of the possible interfaces | 17 | * Constructor, find all of the possible interfaces |
22 | */ | 18 | */ |
23 | USBNetNode::USBNetNode() : ANetNode(tr("USB Cable Connect")) { | 19 | USBNetNode::USBNetNode() : ANetNode(tr("USB Cable Connect")) { |
24 | NSResources->addSystemFile( | 20 | NSResources->addSystemFile( |
25 | "interfaces", "/etc/network/interfaces", 1 ); | 21 | "interfaces", "/etc/network/interfaces", 1 ); |
26 | } | 22 | } |
27 | 23 | ||
28 | /** | 24 | /** |
29 | * Delete any interfaces that we own. | 25 | * Delete any interfaces that we own. |
30 | */ | 26 | */ |
31 | USBNetNode::~USBNetNode(){ | 27 | USBNetNode::~USBNetNode(){ |
32 | } | 28 | } |
33 | 29 | ||
34 | const QString USBNetNode::nodeDescription(){ | 30 | const QString USBNetNode::nodeDescription(){ |
@@ -40,38 +36,25 @@ const QString USBNetNode::nodeDescription(){ | |||
40 | } | 36 | } |
41 | 37 | ||
42 | ANetNodeInstance * USBNetNode::createInstance( void ) { | 38 | ANetNodeInstance * USBNetNode::createInstance( void ) { |
43 | return new AUSB( this ); | 39 | return new AUSB( this ); |
44 | } | 40 | } |
45 | 41 | ||
46 | const char ** USBNetNode::needs( void ) { | 42 | const char ** USBNetNode::needs( void ) { |
47 | return USBNeeds; | 43 | return USBNeeds; |
48 | } | 44 | } |
49 | 45 | ||
50 | const char ** USBNetNode::provides( void ) { | 46 | const char ** USBNetNode::provides( void ) { |
51 | return USBProvides; | 47 | return USBProvides; |
52 | } | 48 | } |
53 | 49 | ||
54 | QString USBNetNode::genNic( long ) { | 50 | QString USBNetNode::genNic( long ) { |
55 | return QString( "usbf" ); | 51 | return QString( "usbf" ); |
56 | } | 52 | } |
57 | 53 | ||
58 | void USBNetNode::setSpecificAttribute( QString & , QString & ) { | 54 | void USBNetNode::setSpecificAttribute( QString & , QString & ) { |
59 | } | 55 | } |
60 | 56 | ||
61 | void USBNetNode::saveSpecificAttribute( QTextStream & ) { | 57 | void USBNetNode::saveSpecificAttribute( QTextStream & ) { |
62 | } | 58 | } |
63 | 59 | ||
64 | #ifdef MYPLUGIN | 60 | OPIE_NS2_PLUGIN( NetNodeInterface_T<USBNetNode> ) |
65 | |||
66 | extern "C" { | ||
67 | void create_plugin( QList<ANetNode> & PNN ) { | ||
68 | PNN.append( new USBNetNode() ); | ||
69 | } | ||
70 | |||
71 | #else | ||
72 | |||
73 | OPIE_NS2_PLUGIN( NetNodeInterface<USBNetNode> ) | ||
74 | |||
75 | #endif | ||
76 | |||
77 | } | ||