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.cpp | 16 |
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 | |||
@@ -39,35 +39,43 @@ ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { | |||
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( | 49 | bool BluetoothBNEPNetNode::generateProperFilesFor( |
50 | ANetNodeInstance * ) { | 50 | ANetNodeInstance * ) { |
51 | return 1; | 51 | return 0; |
52 | } | 52 | } |
53 | 53 | ||
54 | bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { | 54 | bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { |
55 | return S == "interfaces"; | 55 | return S == "interfaces"; |
56 | } | 56 | } |
57 | 57 | ||
58 | bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( | 58 | bool 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 | ||
64 | QString BluetoothBNEPNetNode::genNic( long nr ) { | 72 | QString 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 | } |
68 | 76 | ||
69 | 77 | ||
70 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { | 78 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { |
71 | if( A == "interfacecount" ) { | 79 | if( A == "interfacecount" ) { |
72 | InstanceCount = V.toLong(); | 80 | InstanceCount = V.toLong(); |
73 | } | 81 | } |