Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp index b59b4f0..443a627 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | |||
@@ -37,47 +37,24 @@ const QString BluetoothBNEPNetNode::nodeDescription(){ | |||
37 | ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { | 37 | ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { |
38 | return new ABluetoothBNEP( this ); | 38 | return new ABluetoothBNEP( this ); |
39 | } | 39 | } |
40 | 40 | ||
41 | const char ** BluetoothBNEPNetNode::needs( void ) { | 41 | const char ** BluetoothBNEPNetNode::needs( void ) { |
42 | return BluetoothBNEPNeeds; | 42 | return BluetoothBNEPNeeds; |
43 | } | 43 | } |
44 | 44 | ||
45 | const char * BluetoothBNEPNetNode::provides( void ) { | 45 | const char * BluetoothBNEPNetNode::provides( void ) { |
46 | return "device"; | 46 | return "device"; |
47 | } | 47 | } |
48 | 48 | ||
49 | bool BluetoothBNEPNetNode::generateProperFilesFor( | ||
50 | ANetNodeInstance * ) { | ||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { | ||
55 | return S == "interfaces"; | ||
56 | } | ||
57 | |||
58 | bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( | ||
59 | SystemFile & S , | ||
60 | long DevNr) { | ||
61 | QString NIC = genNic( DevNr ); | ||
62 | |||
63 | if( S.name() == "interfaces" ) { | ||
64 | // generate mapping stanza for this interface | ||
65 | S << "# check if " << NIC << " can be brought UP" << endl; | ||
66 | S << "mapping " << NIC << endl; | ||
67 | S << " script networksettings2-request" << endl << endl; | ||
68 | } | ||
69 | return 0; | ||
70 | } | ||
71 | |||
72 | QString BluetoothBNEPNetNode::genNic( long nr ) { | 49 | QString BluetoothBNEPNetNode::genNic( long nr ) { |
73 | QString S; | 50 | QString S; |
74 | return S.sprintf( "bnep%ld", nr ); | 51 | return S.sprintf( "bnep%ld", nr ); |
75 | } | 52 | } |
76 | 53 | ||
77 | 54 | ||
78 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { | 55 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { |
79 | if( A == "interfacecount" ) { | 56 | if( A == "interfacecount" ) { |
80 | InstanceCount = V.toLong(); | 57 | InstanceCount = V.toLong(); |
81 | } | 58 | } |
82 | } | 59 | } |
83 | 60 | ||
@@ -115,39 +92,24 @@ const QString BluetoothRFCOMMNetNode::nodeDescription(){ | |||
115 | ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) { | 92 | ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) { |
116 | return new ABluetoothRFCOMM( this ); | 93 | return new ABluetoothRFCOMM( this ); |
117 | } | 94 | } |
118 | 95 | ||
119 | const char ** BluetoothRFCOMMNetNode::needs( void ) { | 96 | const char ** BluetoothRFCOMMNetNode::needs( void ) { |
120 | return BluetoothRFCOMMNeeds; | 97 | return BluetoothRFCOMMNeeds; |
121 | } | 98 | } |
122 | 99 | ||
123 | const char * BluetoothRFCOMMNetNode::provides( void ) { | 100 | const char * BluetoothRFCOMMNetNode::provides( void ) { |
124 | return "line"; | 101 | return "line"; |
125 | } | 102 | } |
126 | 103 | ||
127 | bool BluetoothRFCOMMNetNode::generateProperFilesFor( | ||
128 | ANetNodeInstance * ) { | ||
129 | return 0; | ||
130 | } | ||
131 | |||
132 | bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) { | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile( | ||
137 | SystemFile & , | ||
138 | long ) { | ||
139 | return 0; | ||
140 | } | ||
141 | |||
142 | void BluetoothRFCOMMNetNode::setSpecificAttribute( QString &, QString & ) { | 104 | void BluetoothRFCOMMNetNode::setSpecificAttribute( QString &, QString & ) { |
143 | } | 105 | } |
144 | 106 | ||
145 | void BluetoothRFCOMMNetNode::saveSpecificAttribute( QTextStream & ) { | 107 | void BluetoothRFCOMMNetNode::saveSpecificAttribute( QTextStream & ) { |
146 | } | 108 | } |
147 | 109 | ||
148 | extern "C" { | 110 | extern "C" { |
149 | void create_plugin( QList<ANetNode> & PNN ) { | 111 | void create_plugin( QList<ANetNode> & PNN ) { |
150 | PNN.append( new BluetoothBNEPNetNode() ); | 112 | PNN.append( new BluetoothBNEPNetNode() ); |
151 | PNN.append( new BluetoothRFCOMMNetNode() ); | 113 | PNN.append( new BluetoothRFCOMMNetNode() ); |
152 | } | 114 | } |
153 | } | 115 | } |