summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NN.cpp
blob: c65771d90fd09a41491c8cfa66548fdd9ddbacce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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("\
<p>Configure Ethernet over USB.</p>\
<p>Use this for a computer to computer USB cable connection</p>\
"
);
}

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<ANetNode> & PNN ) {
      PNN.append( new USBNetNode() );
}
}