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 | 22 |
1 files changed, 21 insertions, 1 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 | |||
@@ -7,24 +7,25 @@ | |||
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 | /** | 15 | /** |
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 | /** |
22 | * Delete any interfaces that we own. | 23 | * Delete any interfaces that we own. |
23 | */ | 24 | */ |
24 | BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ | 25 | BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ |
25 | } | 26 | } |
26 | 27 | ||
27 | const QString BluetoothBNEPNetNode::nodeDescription(){ | 28 | const QString BluetoothBNEPNetNode::nodeDescription(){ |
28 | return tr("\ | 29 | return tr("\ |
29 | <p>Sets up a bluetooth link using the bluetooth Network profile.</p>\ | 30 | <p>Sets up a bluetooth link using the bluetooth Network profile.</p>\ |
30 | <p>Use this to connect two computing devices.</p>\ | 31 | <p>Use this to connect two computing devices.</p>\ |
@@ -55,27 +56,40 @@ bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { | |||
55 | 56 | ||
56 | bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( | 57 | bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( |
57 | SystemFile & , | 58 | SystemFile & , |
58 | long ) { | 59 | long ) { |
59 | return 1; | 60 | return 1; |
60 | } | 61 | } |
61 | 62 | ||
62 | QString BluetoothBNEPNetNode::genNic( long nr ) { | 63 | QString BluetoothBNEPNetNode::genNic( long nr ) { |
63 | QString S; | 64 | QString S; |
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 | ||
73 | static const char * BluetoothRFCOMMNeeds[] = | 87 | static const char * BluetoothRFCOMMNeeds[] = |
74 | { 0 | 88 | { 0 |
75 | }; | 89 | }; |
76 | 90 | ||
77 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : ANetNode() { | 91 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : ANetNode() { |
78 | } | 92 | } |
79 | 93 | ||
80 | BluetoothRFCOMMNetNode::~BluetoothRFCOMMNetNode(){ | 94 | BluetoothRFCOMMNetNode::~BluetoothRFCOMMNetNode(){ |
81 | } | 95 | } |
@@ -106,18 +120,24 @@ bool BluetoothRFCOMMNetNode::generateProperFilesFor( | |||
106 | } | 120 | } |
107 | 121 | ||
108 | bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) { | 122 | bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) { |
109 | return 0; | 123 | return 0; |
110 | } | 124 | } |
111 | 125 | ||
112 | bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile( | 126 | bool BluetoothRFCOMMNetNode::generateDeviceDataForCommonFile( |
113 | SystemFile & , | 127 | SystemFile & , |
114 | long ) { | 128 | long ) { |
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() ); |
121 | PNN.append( new BluetoothRFCOMMNetNode() ); | 141 | PNN.append( new BluetoothRFCOMMNetNode() ); |
122 | } | 142 | } |
123 | } | 143 | } |