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.cpp9
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,70 +1,75 @@
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
11static const char * BluetoothBNEPNeeds[] = 11static const char * BluetoothBNEPNeeds[] =
12 { 0 12 { 0
13 }; 13 };
14 14
15static 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 */
18BluetoothBNEPNetNode::BluetoothBNEPNetNode() : 23BluetoothBNEPNetNode::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 */
26BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ 31BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){
27} 32}
28 33
29const QString BluetoothBNEPNetNode::nodeDescription(){ 34const 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
37ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { 42ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) {
38 return new ABluetoothBNEP( this ); 43 return new ABluetoothBNEP( this );
39} 44}
40 45
41const char ** BluetoothBNEPNetNode::needs( void ) { 46const char ** BluetoothBNEPNetNode::needs( void ) {
42 return BluetoothBNEPNeeds; 47 return BluetoothBNEPNeeds;
43} 48}
44 49
45const char * BluetoothBNEPNetNode::provides( void ) { 50const char ** BluetoothBNEPNetNode::provides( void ) {
46 return "device"; 51 return BluetoothBNEPProvides;
47} 52}
48 53
49QString BluetoothBNEPNetNode::genNic( long nr ) { 54QString 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
55void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { 60void 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
61void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { 66void 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//