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 | 60 |
1 files changed, 60 insertions, 0 deletions
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 @@ | |||
1 | #include "usb_NN.h" | ||
2 | #include "usb_NNI.h" | ||
3 | |||
4 | static const char * USBNeeds[] = | ||
5 | { 0 | ||
6 | }; | ||
7 | |||
8 | /** | ||
9 | * Constructor, find all of the possible interfaces | ||
10 | */ | ||
11 | USBNetNode::USBNetNode() : ANetNode() { | ||
12 | } | ||
13 | |||
14 | /** | ||
15 | * Delete any interfaces that we own. | ||
16 | */ | ||
17 | USBNetNode::~USBNetNode(){ | ||
18 | } | ||
19 | |||
20 | const QString USBNetNode::nodeDescription(){ | ||
21 | return tr("\ | ||
22 | <p>Configure Ethernet over USB.</p>\ | ||
23 | <p>Use this for a computer to computer USB cable connection</p>\ | ||
24 | " | ||
25 | ); | ||
26 | } | ||
27 | |||
28 | ANetNodeInstance * USBNetNode::createInstance( void ) { | ||
29 | return new AUSB( this ); | ||
30 | } | ||
31 | |||
32 | const char ** USBNetNode::needs( void ) { | ||
33 | return USBNeeds; | ||
34 | } | ||
35 | |||
36 | const char * USBNetNode::provides( void ) { | ||
37 | return "device"; | ||
38 | } | ||
39 | |||
40 | bool USBNetNode::generateProperFilesFor( | ||
41 | ANetNodeInstance * ) { | ||
42 | return 1; | ||
43 | } | ||
44 | |||
45 | bool USBNetNode::hasDataFor( const QString & S ) { | ||
46 | return (S== "interfaces"); | ||
47 | } | ||
48 | |||
49 | bool USBNetNode::generateDataForCommonFile( | ||
50 | SystemFile & S , | ||
51 | long DevNr, | ||
52 | ANetNodeInstance * NNI) { | ||
53 | return ((AUSB *)NNI)->generateDataForCommonFile(S, DevNr); | ||
54 | } | ||
55 | |||
56 | extern "C" { | ||
57 | void create_plugin( QList<ANetNode> & PNN ) { | ||
58 | PNN.append( new USBNetNode() ); | ||
59 | } | ||
60 | } | ||