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 | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp new file mode 100644 index 0000000..91be153 --- a/dev/null +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | |||
@@ -0,0 +1,120 @@ | |||
1 | #include "bluetooth_NN.h" | ||
2 | #include "bluetoothBNEP_NNI.h" | ||
3 | #include "bluetoothRFCOMM_NNI.h" | ||
4 | |||
5 | // | ||
6 | // | ||
7 | // BLUETOOTH PAN/NAP node | ||
8 | // | ||
9 | // | ||
10 | |||
11 | static const char * BluetoothBNEPNeeds[] = | ||
12 | { 0 | ||
13 | }; | ||
14 | |||
15 | /** | ||
16 | * Constructor, find all of the possible interfaces | ||
17 | */ | ||
18 | BluetoothBNEPNetNode::BluetoothBNEPNetNode() : ANetNode() { | ||
19 | } | ||
20 | |||
21 | /** | ||
22 | * Delete any interfaces that we own. | ||
23 | */ | ||
24 | BluetoothBNEPNetNode::~BluetoothBNEPNetNode(){ | ||
25 | } | ||
26 | |||
27 | const QString BluetoothBNEPNetNode::nodeDescription(){ | ||
28 | return tr("\ | ||
29 | <p>Sets up a bluetooth link using the bluetooth Network profile.</p>\ | ||
30 | <p>Use this to connect two computing devices.</p>\ | ||
31 | " | ||
32 | ); | ||
33 | } | ||
34 | |||
35 | ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { | ||
36 | return new ABluetoothBNEP( this ); | ||
37 | } | ||
38 | |||
39 | const char ** BluetoothBNEPNetNode::needs( void ) { | ||
40 | return BluetoothBNEPNeeds; | ||
41 | } | ||
42 | |||
43 | const char * BluetoothBNEPNetNode::provides( void ) { | ||
44 | return "device"; | ||
45 | } | ||
46 | |||
47 | bool BluetoothBNEPNetNode::generateProperFilesFor( | ||
48 | ANetNodeInstance * ) { | ||
49 | return 1; | ||
50 | } | ||
51 | |||
52 | bool BluetoothBNEPNetNode::hasDataFor( const QString & ) { | ||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | bool BluetoothBNEPNetNode::generateDataForCommonFile( | ||
57 | SystemFile & , | ||
58 | long , | ||
59 | ANetNodeInstance * ) { | ||
60 | return 1; | ||
61 | } | ||
62 | |||
63 | // | ||
64 | // | ||
65 | // BLUETOOTH PAN/NAP node | ||
66 | // | ||
67 | // | ||
68 | |||
69 | static const char * BluetoothRFCOMMNeeds[] = | ||
70 | { 0 | ||
71 | }; | ||
72 | |||
73 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : ANetNode() { | ||
74 | } | ||
75 | |||
76 | BluetoothRFCOMMNetNode::~BluetoothRFCOMMNetNode(){ | ||
77 | } | ||
78 | |||
79 | const QString BluetoothRFCOMMNetNode::nodeDescription(){ | ||
80 | return tr("\ | ||
81 | <p>Sets up a bluetooth link using the bluetooth serial profile.</p>\ | ||
82 | <p>Use this to connect to a GSM.</p>\ | ||
83 | " | ||
84 | ); | ||
85 | } | ||
86 | |||
87 | ANetNodeInstance * BluetoothRFCOMMNetNode::createInstance( void ) { | ||
88 | return new ABluetoothRFCOMM( this ); | ||
89 | } | ||
90 | |||
91 | const char ** BluetoothRFCOMMNetNode::needs( void ) { | ||
92 | return BluetoothRFCOMMNeeds; | ||
93 | } | ||
94 | |||
95 | const char * BluetoothRFCOMMNetNode::provides( void ) { | ||
96 | return "line"; | ||
97 | } | ||
98 | |||
99 | bool BluetoothRFCOMMNetNode::generateProperFilesFor( | ||
100 | ANetNodeInstance * ) { | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) { | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | bool BluetoothRFCOMMNetNode::generateDataForCommonFile( | ||
109 | SystemFile & , | ||
110 | long, | ||
111 | ANetNodeInstance * ) { | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | extern "C" { | ||
116 | void create_plugin( QList<ANetNode> & PNN ) { | ||
117 | PNN.append( new BluetoothBNEPNetNode() ); | ||
118 | PNN.append( new BluetoothRFCOMMNetNode() ); | ||
119 | } | ||
120 | } | ||