summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
Unidiff
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.cpp38
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(){
37ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { 37ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) {
38 return new ABluetoothBNEP( this ); 38 return new ABluetoothBNEP( this );
39} 39}
40 40
41const char ** BluetoothBNEPNetNode::needs( void ) { 41const char ** BluetoothBNEPNetNode::needs( void ) {
42 return BluetoothBNEPNeeds; 42 return BluetoothBNEPNeeds;
43} 43}
44 44
45const char * BluetoothBNEPNetNode::provides( void ) { 45const char * BluetoothBNEPNetNode::provides( void ) {
46 return "device"; 46 return "device";
47} 47}
48 48
49bool BluetoothBNEPNetNode::generateProperFilesFor(
50 ANetNodeInstance * ) {
51 return 0;
52}
53
54bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) {
55 return S == "interfaces";
56}
57
58bool 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
72QString BluetoothBNEPNetNode::genNic( long nr ) { 49QString 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
78void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { 55void 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(){
115ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) { 92ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) {
116 return new ABluetoothRFCOMM( this ); 93 return new ABluetoothRFCOMM( this );
117} 94}
118 95
119const char ** BluetoothRFCOMMNetNode::needs( void ) { 96const char ** BluetoothRFCOMMNetNode::needs( void ) {
120 return BluetoothRFCOMMNeeds; 97 return BluetoothRFCOMMNeeds;
121} 98}
122 99
123const char * BluetoothRFCOMMNetNode::provides( void ) { 100const char * BluetoothRFCOMMNetNode::provides( void ) {
124 return "line"; 101 return "line";
125} 102}
126 103
127bool BluetoothRFCOMMNetNode::generateProperFilesFor(
128 ANetNodeInstance * ) {
129 return 0;
130}
131
132bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) {
133 return 0;
134}
135
136bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile(
137 SystemFile & ,
138 long ) {
139 return 0;
140}
141
142void BluetoothRFCOMMNetNode::setSpecificAttribute( QString &, QString & ) { 104void BluetoothRFCOMMNetNode::setSpecificAttribute( QString &, QString & ) {
143} 105}
144 106
145void BluetoothRFCOMMNetNode::saveSpecificAttribute( QTextStream & ) { 107void BluetoothRFCOMMNetNode::saveSpecificAttribute( QTextStream & ) {
146} 108}
147 109
148extern "C" { 110extern "C" {
149void create_plugin( QList<ANetNode> & PNN ) { 111void 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}