summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth
authorwimpie <wimpie>2005-01-07 01:19:13 (UTC)
committer wimpie <wimpie>2005-01-07 01:19:13 (UTC)
commit7af7203a51ddcf85f9f60e39157fcad21f7d9e34 (patch) (unidiff)
tree49829585a0100a5a741d55424f86be39c01d3150 /noncore/settings/networksettings2/bluetooth
parenta8e5ecd107a79f940d8a99d4a77071606a3a932f (diff)
downloadopie-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)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetooth.pro2
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEP_NN.cpp16
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.cpp4
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h5
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMedit.h5
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp4
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h5
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,8 +1,8 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release plugin
3DESTDIR = $(OPIEDIR)/plugins/networksettings2 3DESTDIR = $(OPIEDIR)/plugins/networksettings2
4 HEADERS = bluetoothBNEP_NN.h \ 4 HEADERS = bluetoothBNEP_NN.h \
5 bluetoothBNEP_NNI.h \ 5 bluetoothBNEP_NNI.h \
6 bluetoothRFCOMM_NN.h \ 6 bluetoothRFCOMM_NN.h \
7 bluetoothRFCOMM_NNI.h \ 7 bluetoothRFCOMM_NNI.h \
8 bluetoothBNEPedit.h \ 8 bluetoothBNEPedit.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
@@ -1,10 +1,16 @@
1#include "bluetoothBNEP_NN.h" 1#include "bluetoothBNEP_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#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
8// 14//
9// 15//
10 16
@@ -66,13 +72,23 @@ void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) {
66void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { 72void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) {
67 TS << "interfacecount=" 73 TS << "interfacecount="
68 << InstanceCount 74 << InstanceCount
69 << endl; 75 << endl;
70} 76}
71 77
78#ifndef MYPLUGIN
79
72extern "C" { 80extern "C" {
73// create plugin registers both BT functions 81// create plugin registers both BT functions
74void create_plugin( QList<ANetNode> & PNN ) { 82void 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
89typedef Opie::Core::MakeTypelist<BluetoothBNEPNetNode, BluetoothRFCOMMNetNode>::Result BluetoothTypes;
90OPIE_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
@@ -1,12 +1,16 @@
1#include <qfile.h> 1#include <qfile.h>
2#include <qfileinfo.h> 2#include <qfileinfo.h>
3#include <qtextstream.h> 3#include <qtextstream.h>
4#include <resources.h> 4#include <resources.h>
5#include "bluetoothBNEPrun.h" 5#include "bluetoothBNEPrun.h"
6 6
7using Opietooth2::OTGateway;
8using Opietooth2::OTPANConnection;
9using Opietooth2::PANConnectionVector;
10
7BluetoothBNEPRun::BluetoothBNEPRun( ANetNodeInstance * NNI, 11BluetoothBNEPRun::BluetoothBNEPRun( ANetNodeInstance * NNI,
8 BluetoothBNEPData & D ) : 12 BluetoothBNEPData & D ) :
9 RuntimeInfo( NNI ), 13 RuntimeInfo( NNI ),
10 Data( D), 14 Data( D),
11 Pat( "bnep[0-6]" ) { 15 Pat( "bnep[0-6]" ) {
12 OT = 0; 16 OT = 0;
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
@@ -1,11 +1,10 @@
1#include <netnode.h> 1#include <netnode.h>
2#include "bluetoothBNEPdata.h" 2#include "bluetoothBNEPdata.h"
3 3
4#include <OTGateway.h> 4#include <OTGateway.h>
5using namespace Opietooth2;
6 5
7class BluetoothBNEPRun : public RuntimeInfo { 6class BluetoothBNEPRun : public RuntimeInfo {
8 7
9public : 8public :
10 9
11 BluetoothBNEPRun( ANetNodeInstance * NNI, 10 BluetoothBNEPRun( ANetNodeInstance * NNI,
@@ -27,9 +26,9 @@ protected :
27 26
28private : 27private :
29 28
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
@@ -1,25 +1,24 @@
1#include "bluetoothRFCOMMdata.h" 1#include "bluetoothRFCOMMdata.h"
2#include "bluetoothRFCOMMGUI.h" 2#include "bluetoothRFCOMMGUI.h"
3 3
4#include <Opietooth.h> 4#include <Opietooth.h>
5using namespace Opietooth2;
6 5
7class BluetoothRFCOMMEdit : public BluetoothRFCOMMGUI { 6class BluetoothRFCOMMEdit : public BluetoothRFCOMMGUI {
8 7
9public : 8public :
10 9
11 BluetoothRFCOMMEdit( QWidget * parent ); 10 BluetoothRFCOMMEdit( QWidget * parent );
12 virtual ~BluetoothRFCOMMEdit( void ); 11 virtual ~BluetoothRFCOMMEdit( void );
13 12
14 QString acceptable( void ); 13 QString acceptable( void );
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
21public slots : 20public slots :
22 21
23 void SLOT_AddServer( void ); 22 void SLOT_AddServer( void );
24 void SLOT_RemoveServer( void ); 23 void SLOT_RemoveServer( void );
25 void SLOT_FindDevice( void ); 24 void SLOT_FindDevice( void );
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
@@ -1,13 +1,15 @@
1#include <qapplication.h> 1#include <qapplication.h>
2#include <resources.h> 2#include <resources.h>
3#include <OTDevice.h> 3#include <OTDevice.h>
4#include <OTGateway.h> 4#include <OTGateway.h>
5#include "bluetoothRFCOMMrun.h" 5#include "bluetoothRFCOMMrun.h"
6 6
7using namespace Opietooth2; 7using Opietooth2::OTGateway;
8using Opietooth2::OTDevice;
9using Opietooth2::OTDeviceAddress;
8 10
9BluetoothRFCOMMRun::~BluetoothRFCOMMRun( void ) { 11BluetoothRFCOMMRun::~BluetoothRFCOMMRun( void ) {
10 if( OT ) { 12 if( OT ) {
11 OTGateway::releaseOTGateway(); 13 OTGateway::releaseOTGateway();
12 } 14 }
13} 15}
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
@@ -1,11 +1,10 @@
1#include <netnode.h> 1#include <netnode.h>
2#include "bluetoothRFCOMMdata.h" 2#include "bluetoothRFCOMMdata.h"
3 3
4#include <OTGateway.h> 4#include <OTGateway.h>
5using namespace Opietooth2;
6 5
7class BluetoothRFCOMMRun : public RuntimeInfo { 6class BluetoothRFCOMMRun : public RuntimeInfo {
8 7
9public : 8public :
10 9
11 BluetoothRFCOMMRun( ANetNodeInstance * NNI, 10 BluetoothRFCOMMRun( ANetNodeInstance * NNI,
@@ -24,10 +23,10 @@ protected :
24 QString setMyState( NodeCollection * , Action_t, bool ); 23 QString setMyState( NodeCollection * , Action_t, bool );
25 24
26private : 25private :
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};