Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | 22 | ||||
-rw-r--r-- | noncore/settings/networksettings2/bluetooth/bluetooth_NN.h | 10 |
2 files changed, 30 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp index 3d1aa69..4579e37 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | |||
@@ -16,6 +16,7 @@ static const char * BluetoothBNEPNeeds[] = | |||
16 | * Constructor, find all of the possible interfaces | 16 | * Constructor, find all of the possible interfaces |
17 | */ | 17 | */ |
18 | BluetoothBNEPNetNode::BluetoothBNEPNetNode() : ANetNode() { | 18 | BluetoothBNEPNetNode::BluetoothBNEPNetNode() : ANetNode() { |
19 | InstanceCount = 7; // default | ||
19 | } | 20 | } |
20 | 21 | ||
21 | /** | 22 | /** |
@@ -64,9 +65,22 @@ QString BluetoothBNEPNetNode::genNic( long nr ) { | |||
64 | return S.sprintf( "bnep%ld", nr ); | 65 | return S.sprintf( "bnep%ld", nr ); |
65 | } | 66 | } |
66 | 67 | ||
68 | |||
69 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { | ||
70 | if( A == "interfacecount" ) { | ||
71 | InstanceCount = V.toLong(); | ||
72 | } | ||
73 | } | ||
74 | |||
75 | void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { | ||
76 | TS << "interfacecount=" | ||
77 | << InstanceCount | ||
78 | << endl; | ||
79 | } | ||
80 | |||
67 | // | 81 | // |
68 | // | 82 | // |
69 | // BLUETOOTH PAN/NAP node | 83 | // BLUETOOTH RFCOMM |
70 | // | 84 | // |
71 | // | 85 | // |
72 | 86 | ||
@@ -115,6 +129,12 @@ bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile( | |||
115 | return 0; | 129 | return 0; |
116 | } | 130 | } |
117 | 131 | ||
132 | void BluetoothRFCOMMNetNode::setSpecificAttribute( QString &, QString & ) { | ||
133 | } | ||
134 | |||
135 | void BluetoothRFCOMMNetNode::saveSpecificAttribute( QTextStream & ) { | ||
136 | } | ||
137 | |||
118 | extern "C" { | 138 | extern "C" { |
119 | void create_plugin( QList<ANetNode> & PNN ) { | 139 | void create_plugin( QList<ANetNode> & PNN ) { |
120 | PNN.append( new BluetoothBNEPNetNode() ); | 140 | PNN.append( new BluetoothBNEPNetNode() ); |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h index 5cd6c52..882d2e3 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h | |||
@@ -33,11 +33,17 @@ public: | |||
33 | SystemFile & , long DevNr ); | 33 | SystemFile & , long DevNr ); |
34 | 34 | ||
35 | virtual long instanceCount( void ) | 35 | virtual long instanceCount( void ) |
36 | { return 7; } | 36 | { return InstanceCount; } |
37 | virtual QString genNic( long ); | 37 | virtual QString genNic( long ); |
38 | 38 | ||
39 | private: | 39 | private: |
40 | 40 | ||
41 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | ||
42 | virtual void saveSpecificAttribute( QTextStream & TS ); | ||
43 | |||
44 | // number of interfaces for this device | ||
45 | long InstanceCount; | ||
46 | |||
41 | }; | 47 | }; |
42 | 48 | ||
43 | class BluetoothRFCOMMNetNode : public ANetNode { | 49 | class BluetoothRFCOMMNetNode : public ANetNode { |
@@ -69,6 +75,8 @@ public: | |||
69 | 75 | ||
70 | private: | 76 | private: |
71 | 77 | ||
78 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | ||
79 | virtual void saveSpecificAttribute( QTextStream & TS ); | ||
72 | }; | 80 | }; |
73 | 81 | ||
74 | extern "C" | 82 | extern "C" |