Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (ignore whitespace changes)
4 files changed, 23 insertions, 5 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h index e65b378..347da0c 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPrun.h | |||
@@ -4,24 +4,28 @@ | |||
4 | class BluetoothBNEPRun : public AsDevice { | 4 | class BluetoothBNEPRun : public AsDevice { |
5 | 5 | ||
6 | public : | 6 | public : |
7 | 7 | ||
8 | BluetoothBNEPRun( ANetNodeInstance * NNI, | 8 | BluetoothBNEPRun( ANetNodeInstance * NNI, |
9 | BluetoothBNEPData & Data ) : AsDevice( NNI ) | 9 | BluetoothBNEPData & Data ) : AsDevice( NNI ) |
10 | { } | 10 | { } |
11 | 11 | ||
12 | virtual long count( void ) | 12 | virtual long count( void ) |
13 | { return 3; } | 13 | { return 3; } |
14 | virtual QString genNic( long nr ) | 14 | virtual QString genNic( long nr ) |
15 | { QString S; return S.sprintf( "bnep%ld", nr ); } | 15 | { QString S; return S.sprintf( "bnep%ld", nr ); } |
16 | |||
17 | virtual AsDevice * asDevice( void ) | ||
18 | { return (AsDevice *)this; } | ||
19 | |||
16 | virtual AsDevice * device( void ) | 20 | virtual AsDevice * device( void ) |
17 | { return asDevice(); } | 21 | { return asDevice(); } |
18 | 22 | ||
19 | protected : | 23 | protected : |
20 | 24 | ||
21 | void detectState( NodeCollection * ) | 25 | void detectState( NodeCollection * ) |
22 | { } | 26 | { } |
23 | 27 | ||
24 | bool setState( NodeCollection * , Action_t ) | 28 | bool setState( NodeCollection * , Action_t ) |
25 | { return 0; } | 29 | { return 0; } |
26 | 30 | ||
27 | bool canSetState( State_t , Action_t ) | 31 | bool canSetState( State_t , Action_t ) |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h index 87116e2..6a7902a 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h +++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.h | |||
@@ -1,22 +1,25 @@ | |||
1 | #include <asline.h> | 1 | #include <asline.h> |
2 | #include "bluetoothRFCOMMdata.h" | 2 | #include "bluetoothRFCOMMdata.h" |
3 | 3 | ||
4 | class BluetoothRFCOMMRun : public AsLine { | 4 | class BluetoothRFCOMMRun : public AsLine { |
5 | 5 | ||
6 | public : | 6 | public : |
7 | 7 | ||
8 | BluetoothRFCOMMRun( ANetNodeInstance * NNI, | 8 | BluetoothRFCOMMRun( ANetNodeInstance * NNI, |
9 | BluetoothRFCOMMData & Data ) : AsLine( NNI ) | 9 | BluetoothRFCOMMData & Data ) : AsLine( NNI ) |
10 | { } | 10 | { } |
11 | 11 | ||
12 | virtual AsLine * asLine( void ) | ||
13 | { return (AsLine *)this; } | ||
14 | |||
12 | protected : | 15 | protected : |
13 | 16 | ||
14 | void detectState( NodeCollection * ) | 17 | void detectState( NodeCollection * ) |
15 | { } | 18 | { } |
16 | 19 | ||
17 | bool setState( NodeCollection * , Action_t ) | 20 | bool setState( NodeCollection * , Action_t ) |
18 | { return 0; } | 21 | { return 0; } |
19 | 22 | ||
20 | bool canSetState( State_t , Action_t ) | 23 | bool canSetState( State_t , Action_t ) |
21 | { return 0; } | 24 | { return 0; } |
22 | }; | 25 | }; |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp index 91be153..47272c4 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp | |||
@@ -40,35 +40,42 @@ const char ** BluetoothBNEPNetNode::needs( void ) { | |||
40 | return BluetoothBNEPNeeds; | 40 | return BluetoothBNEPNeeds; |
41 | } | 41 | } |
42 | 42 | ||
43 | const char * BluetoothBNEPNetNode::provides( void ) { | 43 | const char * BluetoothBNEPNetNode::provides( void ) { |
44 | return "device"; | 44 | return "device"; |
45 | } | 45 | } |
46 | 46 | ||
47 | bool BluetoothBNEPNetNode::generateProperFilesFor( | 47 | bool BluetoothBNEPNetNode::generateProperFilesFor( |
48 | ANetNodeInstance * ) { | 48 | ANetNodeInstance * ) { |
49 | return 1; | 49 | return 1; |
50 | } | 50 | } |
51 | 51 | ||
52 | bool BluetoothBNEPNetNode::hasDataFor( const QString & ) { | 52 | bool BluetoothBNEPNetNode::hasDataFor( const QString & S, bool DS ) { |
53 | return 0; | 53 | return DS && S == "interfaces"; |
54 | } | 54 | } |
55 | 55 | ||
56 | bool BluetoothBNEPNetNode::generateDataForCommonFile( | 56 | bool BluetoothBNEPNetNode::generateDataForCommonFile( |
57 | SystemFile & , | 57 | SystemFile & , |
58 | long , | 58 | long , |
59 | ANetNodeInstance * ) { | 59 | ANetNodeInstance * ) { |
60 | return 1; | 60 | return 1; |
61 | } | 61 | } |
62 | 62 | ||
63 | bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile( | ||
64 | SystemFile & , | ||
65 | long , | ||
66 | ANetNodeInstance * ) { | ||
67 | return 1; | ||
68 | } | ||
69 | |||
63 | // | 70 | // |
64 | // | 71 | // |
65 | // BLUETOOTH PAN/NAP node | 72 | // BLUETOOTH PAN/NAP node |
66 | // | 73 | // |
67 | // | 74 | // |
68 | 75 | ||
69 | static const char * BluetoothRFCOMMNeeds[] = | 76 | static const char * BluetoothRFCOMMNeeds[] = |
70 | { 0 | 77 | { 0 |
71 | }; | 78 | }; |
72 | 79 | ||
73 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : ANetNode() { | 80 | BluetoothRFCOMMNetNode::BluetoothRFCOMMNetNode() : ANetNode() { |
74 | } | 81 | } |
@@ -92,25 +99,25 @@ const char ** BluetoothRFCOMMNetNode::needs( void ) { | |||
92 | return BluetoothRFCOMMNeeds; | 99 | return BluetoothRFCOMMNeeds; |
93 | } | 100 | } |
94 | 101 | ||
95 | const char * BluetoothRFCOMMNetNode::provides( void ) { | 102 | const char * BluetoothRFCOMMNetNode::provides( void ) { |
96 | return "line"; | 103 | return "line"; |
97 | } | 104 | } |
98 | 105 | ||
99 | bool BluetoothRFCOMMNetNode::generateProperFilesFor( | 106 | bool BluetoothRFCOMMNetNode::generateProperFilesFor( |
100 | ANetNodeInstance * ) { | 107 | ANetNodeInstance * ) { |
101 | return 0; | 108 | return 0; |
102 | } | 109 | } |
103 | 110 | ||
104 | bool BluetoothRFCOMMNetNode::hasDataFor( const QString & ) { | 111 | bool BluetoothRFCOMMNetNode::hasDataFor( const QString &, bool ) { |
105 | return 0; | 112 | return 0; |
106 | } | 113 | } |
107 | 114 | ||
108 | bool BluetoothRFCOMMNetNode::generateDataForCommonFile( | 115 | bool BluetoothRFCOMMNetNode::generateDataForCommonFile( |
109 | SystemFile & , | 116 | SystemFile & , |
110 | long, | 117 | long, |
111 | ANetNodeInstance * ) { | 118 | ANetNodeInstance * ) { |
112 | return 0; | 119 | return 0; |
113 | } | 120 | } |
114 | 121 | ||
115 | extern "C" { | 122 | extern "C" { |
116 | void create_plugin( QList<ANetNode> & PNN ) { | 123 | void create_plugin( QList<ANetNode> & PNN ) { |
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h index 705201c..d72b0d4 100644 --- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h +++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.h | |||
@@ -19,27 +19,29 @@ public: | |||
19 | 19 | ||
20 | virtual const QString nodeName() | 20 | virtual const QString nodeName() |
21 | { return tr("Bluetooth PAN/NAP"); } | 21 | { return tr("Bluetooth PAN/NAP"); } |
22 | 22 | ||
23 | virtual const QString nodeDescription() ; | 23 | virtual const QString nodeDescription() ; |
24 | 24 | ||
25 | virtual ANetNodeInstance * createInstance( void ); | 25 | virtual ANetNodeInstance * createInstance( void ); |
26 | 26 | ||
27 | virtual const char ** needs( void ); | 27 | virtual const char ** needs( void ); |
28 | virtual const char * provides( void ); | 28 | virtual const char * provides( void ); |
29 | 29 | ||
30 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); | 30 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); |
31 | virtual bool hasDataFor( const QString & S ); | 31 | virtual bool hasDataFor( const QString & S, bool DS ); |
32 | virtual bool generateDataForCommonFile( | 32 | virtual bool generateDataForCommonFile( |
33 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); | 33 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); |
34 | virtual bool generateDeviceDataForCommonFile( | ||
35 | SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); | ||
34 | 36 | ||
35 | private: | 37 | private: |
36 | 38 | ||
37 | }; | 39 | }; |
38 | 40 | ||
39 | class BluetoothRFCOMMNetNode : public ANetNode { | 41 | class BluetoothRFCOMMNetNode : public ANetNode { |
40 | 42 | ||
41 | Q_OBJECT | 43 | Q_OBJECT |
42 | 44 | ||
43 | public: | 45 | public: |
44 | 46 | ||
45 | BluetoothRFCOMMNetNode(); | 47 | BluetoothRFCOMMNetNode(); |
@@ -50,26 +52,28 @@ public: | |||
50 | 52 | ||
51 | virtual const QString nodeName() | 53 | virtual const QString nodeName() |
52 | { return tr("Bluetooth serial link"); } | 54 | { return tr("Bluetooth serial link"); } |
53 | 55 | ||
54 | virtual const QString nodeDescription() ; | 56 | virtual const QString nodeDescription() ; |
55 | 57 | ||
56 | virtual ANetNodeInstance * createInstance( void ); | 58 | virtual ANetNodeInstance * createInstance( void ); |
57 | 59 | ||
58 | virtual const char ** needs( void ); | 60 | virtual const char ** needs( void ); |
59 | virtual const char * provides( void ); | 61 | virtual const char * provides( void ); |
60 | 62 | ||
61 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); | 63 | virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); |
62 | virtual bool hasDataFor( const QString & S ); | 64 | virtual bool hasDataFor( const QString & S, bool ); |
63 | virtual bool generateDataForCommonFile( | 65 | virtual bool generateDataForCommonFile( |
64 | SystemFile & SF, long, ANetNodeInstance * NNI ); | 66 | SystemFile & SF, long, ANetNodeInstance * NNI ); |
67 | virtual bool generateDeviceDataForCommonFile( | ||
68 | SystemFile & SF, long, ANetNodeInstance * NNI ); | ||
65 | 69 | ||
66 | private: | 70 | private: |
67 | 71 | ||
68 | }; | 72 | }; |
69 | 73 | ||
70 | extern "C" | 74 | extern "C" |
71 | { | 75 | { |
72 | void create_plugin( QList<ANetNode> & PNN ); | 76 | void create_plugin( QList<ANetNode> & PNN ); |
73 | }; | 77 | }; |
74 | 78 | ||
75 | #endif | 79 | #endif |