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 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp index 443a627..9be6b16 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | |||
@@ -1,94 +1,99 @@ | |||
1 | #include "bluetooth_NN.h" | 1 | #include "bluetooth_NN.h" |
2 | #include "bluetoothBNEP_NNI.h" | 2 | #include "bluetoothBNEP_NNI.h" |
3 | #include "bluetoothRFCOMM_NNI.h" | 3 | #include "bluetoothRFCOMM_NNI.h" |
4 | 4 | ||
5 | // | 5 | // |
6 | // | 6 | // |
7 | // BLUETOOTH PAN/NAP node | 7 | // BLUETOOTH PAN/NAP node |
8 | // | 8 | // |
9 | // | 9 | // |
10 | 10 | ||
11 | static const char * BluetoothBNEPNeeds[] = | 11 | static const char * BluetoothBNEPNeeds[] = |
12 | { 0 | 12 | { 0 |
13 | }; | 13 | }; |
14 | 14 | ||
15 | static const char * BluetoothBNEPProvides[] = | ||
16 | { "device", | ||
17 | 0 | ||
18 | }; | ||
19 | |||
15 | /** | 20 | /** |
16 | * Constructor, find all of the possible interfaces | 21 | * Constructor, find all of the possible interfaces |
17 | */ | 22 | */ |
18 | BluetoothBNEPNetNode::BluetoothBNEPNetNode() : | 23 | BluetoothBNEPNetNode::BluetoothBNEPNetNode() : |
19 | ANetNode(tr("Bluetooth PAN/NAP")) { | 24 | ANetNode(tr("Bluetooth PAN/NAP")) { |
20 | InstanceCount = 7; // default | 25 | InstanceCount = 7; // default |
21 | } | 26 | } |
22 | 27 | ||
23 | /** | 28 | /** |
24 | * Delete any interfaces that we own. | 29 | * Delete any interfaces that we own. |
25 | */ | 30 | */ |
26 | BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ | 31 | BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ |
27 | } | 32 | } |
28 | 33 | ||
29 | const QString BluetoothBNEPNetNode::nodeDescription(){ | 34 | const QString BluetoothBNEPNetNode::nodeDescription(){ |
30 | return tr("\ | 35 | return tr("\ |
31 | <p>Sets up a bluetooth link using the bluetooth Network profile.</p>\ | 36 | <p>Sets up a bluetooth link using the bluetooth Network profile.</p>\ |
32 | <p>Use this to connect two computing devices.</p>\ | 37 | <p>Use this to connect two computing devices.</p>\ |
33 | " | 38 | " |
34 | ); | 39 | ); |
35 | } | 40 | } |
36 | 41 | ||
37 | ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { | 42 | ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { |
38 | return new ABluetoothBNEP( this ); | 43 | return new ABluetoothBNEP( this ); |
39 | } | 44 | } |
40 | 45 | ||
41 | const char ** BluetoothBNEPNetNode::needs( void ) { | 46 | const char ** BluetoothBNEPNetNode::needs( void ) { |
42 | return BluetoothBNEPNeeds; | 47 | return BluetoothBNEPNeeds; |
43 | } | 48 | } |
44 | 49 | ||
45 | const char * BluetoothBNEPNetNode::provides( void ) { | 50 | const char ** BluetoothBNEPNetNode::provides( void ) { |
46 | return "device"; | 51 | return BluetoothBNEPProvides; |
47 | } | 52 | } |
48 | 53 | ||
49 | QString BluetoothBNEPNetNode::genNic( long nr ) { | 54 | QString BluetoothBNEPNetNode::genNic( long nr ) { |
50 | QString S; | 55 | QString S; |
51 | return S.sprintf( "bnep%ld", nr ); | 56 | return S.sprintf( "bnep%ld", nr ); |
52 | } | 57 | } |
53 | 58 | ||
54 | 59 | ||
55 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { | 60 | void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { |
56 | if( A == "interfacecount" ) { | 61 | if( A == "interfacecount" ) { |
57 | InstanceCount = V.toLong(); | 62 | InstanceCount = V.toLong(); |
58 | } | 63 | } |
59 | } | 64 | } |
60 | 65 | ||
61 | void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { | 66 | void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { |
62 | TS << "interfacecount=" | 67 | TS << "interfacecount=" |
63 | << InstanceCount | 68 | << InstanceCount |
64 | << endl; | 69 | << endl; |
65 | } | 70 | } |
66 | 71 | ||
67 | // | 72 | // |
68 | // | 73 | // |
69 | // BLUETOOTH RFCOMM | 74 | // BLUETOOTH RFCOMM |
70 | // | 75 | // |
71 | // | 76 | // |
72 | 77 | ||
73 | static const char * BluetoothRFCOMMNeeds[] = | 78 | static const char * BluetoothRFCOMMNeeds[] = |
74 | { 0 | 79 | { 0 |
75 | }; | 80 | }; |
76 | 81 | ||
77 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : | 82 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : |
78 | ANetNode( tr("Bluetooth serial link") ) { | 83 | ANetNode( tr("Bluetooth serial link") ) { |
79 | } | 84 | } |
80 | 85 | ||
81 | BluetoothRFCOMMNetNode::~BluetoothRFCOMMNetNode(){ | 86 | BluetoothRFCOMMNetNode::~BluetoothRFCOMMNetNode(){ |
82 | } | 87 | } |
83 | 88 | ||
84 | const QString BluetoothRFCOMMNetNode::nodeDescription(){ | 89 | const QString BluetoothRFCOMMNetNode::nodeDescription(){ |
85 | return tr("\ | 90 | return tr("\ |
86 | <p>Sets up a bluetooth link using the bluetooth serial profile.</p>\ | 91 | <p>Sets up a bluetooth link using the bluetooth serial profile.</p>\ |
87 | <p>Use this to connect to a GSM.</p>\ | 92 | <p>Use this to connect to a GSM.</p>\ |
88 | " | 93 | " |
89 | ); | 94 | ); |
90 | } | 95 | } |
91 | 96 | ||
92 | ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) { | 97 | ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) { |
93 | return new ABluetoothRFCOMM( this ); | 98 | return new ABluetoothRFCOMM( this ); |
94 | } | 99 | } |