summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp
authorwimpie <wimpie>2005-01-04 01:39:32 (UTC)
committer wimpie <wimpie>2005-01-04 01:39:32 (UTC)
commit2a7afda8b7daf4a43e370dba09e43e7f5058ab49 (patch) (unidiff)
tree1905b1afdf7a1364149c4d325c778a4dd4c629c1 /noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp
parentf1a6369e3df58019891707a3964b20836e104d67 (diff)
downloadopie-2a7afda8b7daf4a43e370dba09e43e7f5058ab49.zip
opie-2a7afda8b7daf4a43e370dba09e43e7f5058ab49.tar.gz
opie-2a7afda8b7daf4a43e370dba09e43e7f5058ab49.tar.bz2
More NS2 files
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp78
1 files changed, 78 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp
new file mode 100644
index 0000000..ee3e92b
--- a/dev/null
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp
@@ -0,0 +1,78 @@
1#include "bluetoothBNEP_NN.h"
2#include "bluetoothBNEP_NNI.h"
3#include "bluetoothRFCOMM_NNI.h"
4
5//
6//
7// BLUETOOTH PAN/NAP node
8//
9//
10
11static const char * BluetoothBNEPNeeds[] =
12 { 0
13 };
14
15static const char * BluetoothBNEPProvides[] =
16 { "device",
17 0
18 };
19
20/**
21 * Constructor, find all of the possible interfaces
22 */
23BluetoothBNEPNetNode::BluetoothBNEPNetNode() :
24 ANetNode(tr("Bluetooth PAN/NAP")) {
25 InstanceCount = 7; // default
26}
27
28/**
29 * Delete any interfaces that we own.
30 */
31BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){
32}
33
34const QString BluetoothBNEPNetNode::nodeDescription(){
35 return tr("\
36<p>Sets up a bluetooth link using the bluetooth Network profile.</p>\
37<p>Use this to connect two computing devices.</p>\
38"
39);
40}
41
42ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) {
43 return new ABluetoothBNEP( this );
44}
45
46const char ** BluetoothBNEPNetNode::needs( void ) {
47 return BluetoothBNEPNeeds;
48}
49
50const char ** BluetoothBNEPNetNode::provides( void ) {
51 return BluetoothBNEPProvides;
52}
53
54QString BluetoothBNEPNetNode::genNic( long nr ) {
55 QString S;
56 return S.sprintf( "bnep%ld", nr );
57}
58
59
60void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) {
61 if( A == "interfacecount" ) {
62 InstanceCount = V.toLong();
63 }
64}
65
66void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) {
67 TS << "interfacecount="
68 << InstanceCount
69 << endl;
70}
71
72extern "C" {
73// create plugin registers both BT functions
74void create_plugin( QList<ANetNode> & PNN ) {
75 PNN.append( new BluetoothBNEPNetNode() );
76 PNN.append( new BluetoothRFCOMMNetNode() );
77}
78}