summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
index 1d0a0f7..b59b4f0 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
@@ -45,23 +45,31 @@ const char ** BluetoothBNEPNetNode::needs( void ) {
45const char * BluetoothBNEPNetNode::provides( void ) { 45const char * BluetoothBNEPNetNode::provides( void ) {
46 return "device"; 46 return "device";
47} 47}
48 48
49bool BluetoothBNEPNetNode::generateProperFilesFor( 49bool BluetoothBNEPNetNode::generateProperFilesFor(
50 ANetNodeInstance * ) { 50 ANetNodeInstance * ) {
51 return 1; 51 return 0;
52} 52}
53 53
54bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { 54bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) {
55 return S == "interfaces"; 55 return S == "interfaces";
56} 56}
57 57
58bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( 58bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile(
59 SystemFile & , 59 SystemFile & S ,
60 long ) { 60 long DevNr) {
61 return 1; 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;
62} 70}
63 71
64QString BluetoothBNEPNetNode::genNic( long nr ) { 72QString BluetoothBNEPNetNode::genNic( long nr ) {
65 QString S; 73 QString S;
66 return S.sprintf( "bnep%ld", nr ); 74 return S.sprintf( "bnep%ld", nr );
67} 75}