author | wimpie <wimpie> | 2005-01-07 01:19:13 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-07 01:19:13 (UTC) |
commit | 7af7203a51ddcf85f9f60e39157fcad21f7d9e34 (patch) (unidiff) | |
tree | 49829585a0100a5a741d55424f86be39c01d3150 /noncore/settings/networksettings2/bluetooth | |
parent | a8e5ecd107a79f940d8a99d4a77071606a3a932f (diff) | |
download | opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.zip opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.tar.gz opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.tar.bz2 |
First implementation of plugins
THIS VERSION DOES NOT COMPILE
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (ignore whitespace changes)
7 files changed, 30 insertions, 11 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth.pro b/noncore/settings/networksettings2/bluetooth/bluetooth.pro index 2e3b5bb..053a6cb 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth.pro +++ b/noncore/settings/networksettings2/bluetooth/bluetooth.pro | |||
@@ -1,5 +1,5 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release plugin |
3 | DESTDIR = $(OPIEDIR)/plugins/networksettings2 | 3 | DESTDIR = $(OPIEDIR)/plugins/networksettings2 |
4 | HEADERS = bluetoothBNEP_NN.h \ | 4 | HEADERS = bluetoothBNEP_NN.h \ |
5 | bluetoothBNEP_NNI.h \ | 5 | bluetoothBNEP_NNI.h \ |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp index ee3e92b..5e4d951 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp | |||
@@ -2,6 +2,12 @@ | |||
2 | #include "bluetoothBNEP_NNI.h" | 2 | #include "bluetoothBNEP_NNI.h" |
3 | #include "bluetoothRFCOMM_NNI.h" | 3 | #include "bluetoothRFCOMM_NNI.h" |
4 | 4 | ||
5 | #ifndef MYPLUGIN | ||
6 | |||
7 | #include "netnodeinterface.h" | ||
8 | |||
9 | #endif | ||
10 | |||
5 | // | 11 | // |
6 | // | 12 | // |
7 | // BLUETOOTH PAN/NAP node | 13 | // BLUETOOTH PAN/NAP node |
@@ -69,10 +75,20 @@ void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { | |||
69 | << endl; | 75 | << endl; |
70 | } | 76 | } |
71 | 77 | ||
78 | #ifndef MYPLUGIN | ||
79 | |||
72 | extern "C" { | 80 | extern "C" { |
73 | // create plugin registers both BT functions | 81 | // create plugin registers both BT functions |
74 | void create_plugin( QList<ANetNode> & PNN ) { | 82 | void create_plugin( QList<ANetNode> & PNN ) { |
75 | PNN.append( new BluetoothBNEPNetNode() ); | 83 | PNN.append( new BluetoothBNEPNetNode() ); |
76 | PNN.append( new BluetoothRFCOMMNetNode() ); | 84 | PNN.append( new BluetoothRFCOMMNetNode() ); |
77 | } | 85 | } |
86 | |||
87 | #else | ||
88 | |||
89 | typedef Opie::Core::MakeTypelist<BluetoothBNEPNetNode, BluetoothRFCOMMNetNode>::Result BluetoothTypes; | ||
90 | OPIE_NS2_PLUGIN( NetNodeInterface<BluetoothTypes> ) | ||
91 | |||
92 | #endif | ||
93 | |||
78 | } | 94 | } |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp index 9d4ae97..5c937a1 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp | |||
@@ -4,6 +4,10 @@ | |||
4 | #include <resources.h> | 4 | #include <resources.h> |
5 | #include "bluetoothBNEPrun.h" | 5 | #include "bluetoothBNEPrun.h" |
6 | 6 | ||
7 | using Opietooth2::OTGateway; | ||
8 | using Opietooth2::OTPANConnection; | ||
9 | using Opietooth2::PANConnectionVector; | ||
10 | |||
7 | BluetoothBNEPRun::BluetoothBNEPRun( ANetNodeInstance * NNI, | 11 | BluetoothBNEPRun::BluetoothBNEPRun( ANetNodeInstance * NNI, |
8 | BluetoothBNEPData & D ) : | 12 | BluetoothBNEPData & D ) : |
9 | RuntimeInfo( NNI ), | 13 | RuntimeInfo( NNI ), |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h index a05a7a2..8551a2e 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #include "bluetoothBNEPdata.h" | 2 | #include "bluetoothBNEPdata.h" |
3 | 3 | ||
4 | #include <OTGateway.h> | 4 | #include <OTGateway.h> |
5 | using namespace Opietooth2; | ||
6 | 5 | ||
7 | class BluetoothBNEPRun : public RuntimeInfo { | 6 | class BluetoothBNEPRun : public RuntimeInfo { |
8 | 7 | ||
@@ -30,6 +29,6 @@ private : | |||
30 | bool hasFreePANConnection( bool Grab = 0 ); | 29 | bool hasFreePANConnection( bool Grab = 0 ); |
31 | 30 | ||
32 | BluetoothBNEPData & Data; | 31 | BluetoothBNEPData & Data; |
33 | OTGateway * OT; | 32 | Opietooth2::OTGateway * OT; |
34 | QRegExp Pat; | 33 | QRegExp Pat; |
35 | }; | 34 | }; |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMedit.h b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMedit.h index 9ad8f2a..fe474fc 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMedit.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMedit.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #include "bluetoothRFCOMMGUI.h" | 2 | #include "bluetoothRFCOMMGUI.h" |
3 | 3 | ||
4 | #include <Opietooth.h> | 4 | #include <Opietooth.h> |
5 | using namespace Opietooth2; | ||
6 | 5 | ||
7 | class BluetoothRFCOMMEdit : public BluetoothRFCOMMGUI { | 6 | class BluetoothRFCOMMEdit : public BluetoothRFCOMMGUI { |
8 | 7 | ||
@@ -15,8 +14,8 @@ public : | |||
15 | void showData( BluetoothRFCOMMData & Data ); | 14 | void showData( BluetoothRFCOMMData & Data ); |
16 | bool commit( BluetoothRFCOMMData & Data ); | 15 | bool commit( BluetoothRFCOMMData & Data ); |
17 | 16 | ||
18 | bool Modified; | 17 | bool Modified; |
19 | OTGateway * OT; | 18 | Opietooth2::OTGateway * OT; |
20 | 19 | ||
21 | public slots : | 20 | public slots : |
22 | 21 | ||
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp index 1e91ed1..ef6878a 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp | |||
@@ -4,7 +4,9 @@ | |||
4 | #include <OTGateway.h> | 4 | #include <OTGateway.h> |
5 | #include "bluetoothRFCOMMrun.h" | 5 | #include "bluetoothRFCOMMrun.h" |
6 | 6 | ||
7 | using namespace Opietooth2; | 7 | using Opietooth2::OTGateway; |
8 | using Opietooth2::OTDevice; | ||
9 | using Opietooth2::OTDeviceAddress; | ||
8 | 10 | ||
9 | BluetoothRFCOMMRun::~BluetoothRFCOMMRun( void ) { | 11 | BluetoothRFCOMMRun::~BluetoothRFCOMMRun( void ) { |
10 | if( OT ) { | 12 | if( OT ) { |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h index 24e3dae..5a31a94 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #include "bluetoothRFCOMMdata.h" | 2 | #include "bluetoothRFCOMMdata.h" |
3 | 3 | ||
4 | #include <OTGateway.h> | 4 | #include <OTGateway.h> |
5 | using namespace Opietooth2; | ||
6 | 5 | ||
7 | class BluetoothRFCOMMRun : public RuntimeInfo { | 6 | class BluetoothRFCOMMRun : public RuntimeInfo { |
8 | 7 | ||
@@ -27,7 +26,7 @@ private : | |||
27 | 26 | ||
28 | int deviceNrOfConnection( void ); | 27 | int deviceNrOfConnection( void ); |
29 | RFCOMMChannel * getChannel( void ); | 28 | RFCOMMChannel * getChannel( void ); |
30 | BluetoothRFCOMMData * Data; | 29 | BluetoothRFCOMMData * Data; |
31 | Opietooth2::OTGateway * OT; | 30 | Opietooth2::OTGateway * OT; |
32 | int DeviceNr; // cached from detection | 31 | int DeviceNr; // cached from detection |
33 | }; | 32 | }; |