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 | |
parent | a8e5ecd107a79f940d8a99d4a77071606a3a932f (diff) | |
download | opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.zip opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.tar.gz opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.tar.bz2 |
First implementation of plugins
THIS VERSION DOES NOT COMPILE
45 files changed, 566 insertions, 67 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,3 +1,3 @@ | |||
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 |
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 | |||
@@ -4,2 +4,8 @@ | |||
4 | 4 | ||
5 | #ifndef MYPLUGIN | ||
6 | |||
7 | #include "netnodeinterface.h" | ||
8 | |||
9 | #endif | ||
10 | |||
5 | // | 11 | // |
@@ -71,2 +77,4 @@ void BluetoothBNEPNetNode::saveSpecificAttribute( QTextStream & TS) { | |||
71 | 77 | ||
78 | #ifndef MYPLUGIN | ||
79 | |||
72 | extern "C" { | 80 | extern "C" { |
@@ -77,2 +85,10 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
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 | |||
@@ -6,2 +6,6 @@ | |||
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, |
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 | |||
@@ -4,3 +4,2 @@ | |||
4 | #include <OTGateway.h> | 4 | #include <OTGateway.h> |
5 | using namespace Opietooth2; | ||
6 | 5 | ||
@@ -32,3 +31,3 @@ private : | |||
32 | BluetoothBNEPData & Data; | 31 | BluetoothBNEPData & Data; |
33 | OTGateway * OT; | 32 | Opietooth2::OTGateway * OT; |
34 | QRegExp Pat; | 33 | QRegExp Pat; |
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 | |||
@@ -4,3 +4,2 @@ | |||
4 | #include <Opietooth.h> | 4 | #include <Opietooth.h> |
5 | using namespace Opietooth2; | ||
6 | 5 | ||
@@ -18,3 +17,3 @@ public : | |||
18 | bool Modified; | 17 | bool Modified; |
19 | OTGateway * OT; | 18 | Opietooth2::OTGateway * OT; |
20 | 19 | ||
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 | |||
@@ -6,3 +6,5 @@ | |||
6 | 6 | ||
7 | using namespace Opietooth2; | 7 | using Opietooth2::OTGateway; |
8 | using Opietooth2::OTDevice; | ||
9 | using Opietooth2::OTDeviceAddress; | ||
8 | 10 | ||
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 | |||
@@ -4,3 +4,2 @@ | |||
4 | #include <OTGateway.h> | 4 | #include <OTGateway.h> |
5 | using namespace Opietooth2; | ||
6 | 5 | ||
diff --git a/noncore/settings/networksettings2/cable/cable.pro b/noncore/settings/networksettings2/cable/cable.pro index 8a046b7..660f95e 100644 --- a/noncore/settings/networksettings2/cable/cable.pro +++ b/noncore/settings/networksettings2/cable/cable.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/cable/cable_NN.cpp b/noncore/settings/networksettings2/cable/cable_NN.cpp index dc4205c..20299e4 100644 --- a/noncore/settings/networksettings2/cable/cable_NN.cpp +++ b/noncore/settings/networksettings2/cable/cable_NN.cpp | |||
@@ -3,2 +3,8 @@ | |||
3 | 3 | ||
4 | #ifndef MYPLUGIN | ||
5 | |||
6 | #include "netnodeinterface.h" | ||
7 | |||
8 | #endif | ||
9 | |||
4 | static const char * CableNeeds[] = | 10 | static const char * CableNeeds[] = |
@@ -49,2 +55,4 @@ void CableNetNode::saveSpecificAttribute( QTextStream & ) { | |||
49 | 55 | ||
56 | #ifdef MYPLUGIN | ||
57 | |||
50 | extern "C" { | 58 | extern "C" { |
@@ -53,2 +61,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
53 | } | 61 | } |
62 | |||
63 | #else | ||
64 | |||
65 | OPIE_NS2_PLUGIN( NetNodeInterface<CableNetNode> ) | ||
66 | |||
67 | #endif | ||
68 | |||
54 | } | 69 | } |
diff --git a/noncore/settings/networksettings2/gprs/GPRS.pro b/noncore/settings/networksettings2/gprs/GPRS.pro index 7818415..480c872 100644 --- a/noncore/settings/networksettings2/gprs/GPRS.pro +++ b/noncore/settings/networksettings2/gprs/GPRS.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/gprs/GPRS_NN.cpp b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp index 5393324..4415739 100644 --- a/noncore/settings/networksettings2/gprs/GPRS_NN.cpp +++ b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp | |||
@@ -6,2 +6,8 @@ | |||
6 | 6 | ||
7 | #ifndef MYPLUGIN | ||
8 | |||
9 | #include "netnodeinterface.h" | ||
10 | |||
11 | #endif | ||
12 | |||
7 | static const char * GPRSNeeds[] = | 13 | static const char * GPRSNeeds[] = |
@@ -75,2 +81,4 @@ QStringList GPRSNetNode::properFiles( void ) { | |||
75 | 81 | ||
82 | #ifdef MYPLUGIN | ||
83 | |||
76 | extern "C" { | 84 | extern "C" { |
@@ -79,2 +87,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
79 | } | 87 | } |
88 | |||
89 | #else | ||
90 | |||
91 | OPIE_NS2_PLUGIN( NetNodeInterface<GPRSNetNode> ) | ||
92 | |||
93 | #endif | ||
94 | |||
80 | } | 95 | } |
diff --git a/noncore/settings/networksettings2/irda/irda.pro b/noncore/settings/networksettings2/irda/irda.pro index 4613abe..87f7a62 100644 --- a/noncore/settings/networksettings2/irda/irda.pro +++ b/noncore/settings/networksettings2/irda/irda.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/irda/irda_NN.cpp b/noncore/settings/networksettings2/irda/irda_NN.cpp index 485cad3..6858157 100644 --- a/noncore/settings/networksettings2/irda/irda_NN.cpp +++ b/noncore/settings/networksettings2/irda/irda_NN.cpp | |||
@@ -3,2 +3,8 @@ | |||
3 | 3 | ||
4 | #ifndef MYPLUGIN | ||
5 | |||
6 | #include "netnodeinterface.h" | ||
7 | |||
8 | #endif | ||
9 | |||
4 | static const char * IRDANeeds[] = | 10 | static const char * IRDANeeds[] = |
@@ -49,2 +55,4 @@ void IRDANetNode::saveSpecificAttribute( QTextStream & ) { | |||
49 | 55 | ||
56 | #ifdef MYPLUGIN | ||
57 | |||
50 | extern "C" { | 58 | extern "C" { |
@@ -53,2 +61,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
53 | } | 61 | } |
62 | |||
63 | #else | ||
64 | |||
65 | OPIE_NS2_PLUGIN( NetNodeInterface<IRDANetNode> ) | ||
66 | |||
67 | #endif | ||
68 | |||
54 | } | 69 | } |
diff --git a/noncore/settings/networksettings2/lancard/lancard.pro b/noncore/settings/networksettings2/lancard/lancard.pro index 6f04e01..05f0fa0 100644 --- a/noncore/settings/networksettings2/lancard/lancard.pro +++ b/noncore/settings/networksettings2/lancard/lancard.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp index e36f757..fce3d29 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp | |||
@@ -3,2 +3,8 @@ | |||
3 | 3 | ||
4 | #ifndef MYPLUGIN | ||
5 | |||
6 | #include "netnodeinterface.h" | ||
7 | |||
8 | #endif | ||
9 | |||
4 | static const char * LanCardNeeds[] = | 10 | static const char * LanCardNeeds[] = |
@@ -72,2 +78,4 @@ void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { | |||
72 | 78 | ||
79 | #ifdef MYPLUGIN | ||
80 | |||
73 | extern "C" { | 81 | extern "C" { |
@@ -76,2 +84,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
76 | } | 84 | } |
85 | |||
86 | #else | ||
87 | |||
88 | OPIE_NS2_PLUGIN( NetNodeInterface<LanCardNetNode> ) | ||
89 | |||
90 | #endif | ||
91 | |||
77 | } | 92 | } |
diff --git a/noncore/settings/networksettings2/modem/modem.pro b/noncore/settings/networksettings2/modem/modem.pro index 25e29d4..4511e07 100644 --- a/noncore/settings/networksettings2/modem/modem.pro +++ b/noncore/settings/networksettings2/modem/modem.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/modem/modem_NN.cpp b/noncore/settings/networksettings2/modem/modem_NN.cpp index 06f417c..c7f6e78 100644 --- a/noncore/settings/networksettings2/modem/modem_NN.cpp +++ b/noncore/settings/networksettings2/modem/modem_NN.cpp | |||
@@ -3,2 +3,8 @@ | |||
3 | 3 | ||
4 | #ifndef MYPLUGIN | ||
5 | |||
6 | #include "netnodeinterface.h" | ||
7 | |||
8 | #endif | ||
9 | |||
4 | static const char * ModemNeeds[] = | 10 | static const char * ModemNeeds[] = |
@@ -50,2 +56,4 @@ void ModemNetNode::saveSpecificAttribute( QTextStream & ) { | |||
50 | 56 | ||
57 | #ifdef MYPLUGIN | ||
58 | |||
51 | extern "C" { | 59 | extern "C" { |
@@ -54,2 +62,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
54 | } | 62 | } |
63 | |||
64 | #else | ||
65 | |||
66 | OPIE_NS2_PLUGIN( NetNodeInterface<ModemNetNode> ) | ||
67 | |||
68 | #endif | ||
69 | |||
55 | } | 70 | } |
diff --git a/noncore/settings/networksettings2/network/network.pro b/noncore/settings/networksettings2/network/network.pro index 05df007..5ca78b9 100644 --- a/noncore/settings/networksettings2/network/network.pro +++ b/noncore/settings/networksettings2/network/network.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/network/network_NN.cpp b/noncore/settings/networksettings2/network/network_NN.cpp index 23b3d44..82d0c29 100644 --- a/noncore/settings/networksettings2/network/network_NN.cpp +++ b/noncore/settings/networksettings2/network/network_NN.cpp | |||
@@ -6,2 +6,8 @@ | |||
6 | 6 | ||
7 | #ifndef MYPLUGIN | ||
8 | |||
9 | #include "netnodeinterface.h" | ||
10 | |||
11 | #endif | ||
12 | |||
7 | static const char * NetworkNeeds[] = | 13 | static const char * NetworkNeeds[] = |
@@ -92,2 +98,4 @@ void NetworkNetNode::saveSpecificAttribute( QTextStream & ) { | |||
92 | 98 | ||
99 | #ifdef MYPLUGIN | ||
100 | |||
93 | extern "C" { | 101 | extern "C" { |
@@ -96,2 +104,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
96 | } | 104 | } |
105 | |||
106 | #else | ||
107 | |||
108 | OPIE_NS2_PLUGIN( NetNodeInterface<NetworkNetNode> ) | ||
109 | |||
110 | #endif | ||
111 | |||
97 | } | 112 | } |
diff --git a/noncore/settings/networksettings2/networksettings2/netnodeinterface.h b/noncore/settings/networksettings2/networksettings2/netnodeinterface.h new file mode 100644 index 0000000..34f3bb5 --- a/dev/null +++ b/noncore/settings/networksettings2/networksettings2/netnodeinterface.h | |||
@@ -0,0 +1,139 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) 2005 Holger Hans Peter Freyther <freyther@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | |||
30 | */ | ||
31 | |||
32 | #ifndef ANET_NODE_INTERFACE_H | ||
33 | #define ANET_NODE_INTERFACE_H | ||
34 | |||
35 | #include <opie2/oapplicationfactory.h> | ||
36 | #include <qpe/qcom.h> | ||
37 | |||
38 | // {A215A785-FB73-4F74-84B0-053BCC77DB87} | ||
39 | #ifndef IID_NetworkSettings2 | ||
40 | |||
41 | #define IID_NetworkSettings2 QUuid( 0xa215a785, 0xfb73, 0x4f74, 0x84, 0xb0, 0x05, 0x3b, 0xcc, 0x77, 0xdb, 0x87) | ||
42 | |||
43 | #endif | ||
44 | |||
45 | |||
46 | |||
47 | /** | ||
48 | * Multiple Types | ||
49 | */ | ||
50 | template <class Node > | ||
51 | struct NS2PrivateFactory { | ||
52 | |||
53 | inline static void createPlugins( QList<ANetNode> & PNN) { | ||
54 | PNN.append( new Node()); | ||
55 | } | ||
56 | |||
57 | }; | ||
58 | |||
59 | /* | ||
60 | * Stop recursion here | ||
61 | */ | ||
62 | template <> | ||
63 | struct NS2PrivateFactory<Opie::Core::NullType> { | ||
64 | |||
65 | inline static void createPlugins( QList<ANetNode> &) { | ||
66 | |||
67 | } | ||
68 | |||
69 | }; | ||
70 | |||
71 | template <class Node, class Tail> | ||
72 | struct NS2PrivateFactory<Opie::Core::Typelist<Node, Tail> > { | ||
73 | |||
74 | inline static void createPlugins( QList<ANetNode> & PNN ) { | ||
75 | NS2PrivateFactory<Node>::createPlugins(PNN); | ||
76 | NS2PrivateFactory<Tail>::createPlugins(PNN); | ||
77 | } | ||
78 | |||
79 | }; | ||
80 | |||
81 | template<class Node> | ||
82 | struct NetNodeInterface : public QUnknownInterface { | ||
83 | |||
84 | QRESULT queryInterface(const QUuid& uuid, QUnknownInterface **iface) { | ||
85 | *iface = 0; | ||
86 | |||
87 | if( uuid == IID_QUnknown ) | ||
88 | *iface = this; | ||
89 | else if( uuid == IID_NetworkSettings2 ) | ||
90 | *iface = this; | ||
91 | else | ||
92 | return QS_FALSE; | ||
93 | |||
94 | (*iface)->addRef(); | ||
95 | |||
96 | return QS_OK; | ||
97 | |||
98 | } | ||
99 | |||
100 | void create_plugin( QList<ANetNode> & PNN ) { | ||
101 | |||
102 | PNN.append( new Node()); | ||
103 | |||
104 | } | ||
105 | |||
106 | Q_REFCOUNT | ||
107 | }; | ||
108 | |||
109 | template<class Node, class Tail> | ||
110 | struct NetNodeInterface<Opie::Core::Typelist<Node, Tail> > | ||
111 | : public QUnknownInterface { | ||
112 | |||
113 | QRESULT queryInterface( const QUuid& uuid, | ||
114 | QUnknownInterface **iface) { | ||
115 | |||
116 | *iface = 0; | ||
117 | |||
118 | if( uuid == IID_QUnknown ) *iface = this; | ||
119 | else if( uuid == IID_NetworkSettings2 ) *iface = this; | ||
120 | else return QS_FALSE; | ||
121 | |||
122 | (*iface)->addRef(); | ||
123 | return QS_OK; | ||
124 | |||
125 | } | ||
126 | |||
127 | void create_plugin( QList<ANetNode> & PNN ) { | ||
128 | NS2PrivateFactory<Opie::Core::Typelist<Node,Tail> >::createPlugin( PNN ); | ||
129 | } | ||
130 | |||
131 | Q_REFCOUNT | ||
132 | |||
133 | }; | ||
134 | |||
135 | #define OPIE_NS2_PLUGIN( factory ) \ | ||
136 | Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( factory) } | ||
137 | |||
138 | #endif | ||
139 | |||
diff --git a/noncore/settings/networksettings2/networksettings2/resources.cpp b/noncore/settings/networksettings2/networksettings2/resources.cpp index 50fb15a..79d41ea 100644 --- a/noncore/settings/networksettings2/networksettings2/resources.cpp +++ b/noncore/settings/networksettings2/networksettings2/resources.cpp | |||
@@ -6,5 +6,10 @@ | |||
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | #include <qmessagebox.h> | ||
8 | |||
7 | #include <qpe/qlibrary.h> | 9 | #include <qpe/qlibrary.h> |
8 | #include <qpe/qpeapplication.h> | 10 | #include <qpe/qpeapplication.h> |
11 | |||
9 | #include <opie2/odebug.h> | 12 | #include <opie2/odebug.h> |
13 | #include <opie2/opluginloader.h> | ||
14 | |||
10 | #include <qtopia/resource.h> | 15 | #include <qtopia/resource.h> |
@@ -13,2 +18,3 @@ | |||
13 | #include "resources.h" | 18 | #include "resources.h" |
19 | #include "netnodeinterface.h" | ||
14 | 20 | ||
@@ -28,2 +34,5 @@ TheNSResources::TheNSResources( void ) : NodeTypeNameMap(), | |||
28 | // load available netnodes | 34 | // load available netnodes |
35 | |||
36 | #ifdef MYPLUGIN | ||
37 | |||
29 | findAvailableNetNodes(QPEApplication::qpeDir() + PLUGINDIR ); | 38 | findAvailableNetNodes(QPEApplication::qpeDir() + PLUGINDIR ); |
@@ -68,2 +77,48 @@ TheNSResources::TheNSResources( void ) : NodeTypeNameMap(), | |||
68 | 77 | ||
78 | #else | ||
79 | |||
80 | Plugins = 0; | ||
81 | findAvailableNetNodes(); | ||
82 | |||
83 | // compile provides and needs lists | ||
84 | { const char ** NeedsRun; | ||
85 | QDictIterator<ANetNode> OuterIt( AllNodeTypes ); | ||
86 | bool Done; | ||
87 | |||
88 | for ( ; OuterIt.current(); ++OuterIt ) { | ||
89 | // find needs list | ||
90 | ANetNode::NetNodeList * NNLP = new ANetNode::NetNodeList; | ||
91 | ANetNode::NetNodeList & NNL = *(NNLP); | ||
92 | |||
93 | // must iterate this way to avoid duplication pointers | ||
94 | for ( QDictIterator<ANetNode> InnerIt( AllNodeTypes ); | ||
95 | InnerIt.current(); ++InnerIt ) { | ||
96 | |||
97 | if( InnerIt.current() == OuterIt.current() ) | ||
98 | // avoid recursive | ||
99 | continue; | ||
100 | |||
101 | const char ** Provides = InnerIt.current()->provides(); | ||
102 | NeedsRun = OuterIt.current()->needs(); | ||
103 | |||
104 | for( ; *NeedsRun; NeedsRun ++ ) { | ||
105 | const char ** PRun; | ||
106 | PRun = Provides; | ||
107 | for( ; *PRun; PRun ++ ) { | ||
108 | if( strcmp( *PRun, *NeedsRun ) == 0 ) { | ||
109 | // inner provides what outer needs | ||
110 | NNL.resize( NNL.size() + 1 ); | ||
111 | NNL[NNL.size()-1] = InnerIt.current(); | ||
112 | Done = 1; // break from 2 loops | ||
113 | break; | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | OuterIt.current()->setAlternatives( NNLP ); | ||
119 | } | ||
120 | } | ||
121 | |||
122 | #endif | ||
123 | |||
69 | // define built in Node types to Description map | 124 | // define built in Node types to Description map |
@@ -86,3 +141,11 @@ TheNSResources::TheNSResources( void ) : NodeTypeNameMap(), | |||
86 | TheNSResources::~TheNSResources( void ) { | 141 | TheNSResources::~TheNSResources( void ) { |
142 | |||
143 | #ifndef MYPLUGINS | ||
144 | if( Plugins ) { | ||
145 | delete Plugins; | ||
146 | delete PluginManager; | ||
147 | } | ||
148 | #endif | ||
87 | delete TheSystem; | 149 | delete TheSystem; |
150 | |||
88 | } | 151 | } |
@@ -118,2 +181,3 @@ void TheNSResources::busy( bool ) { | |||
118 | 181 | ||
182 | #ifdef MYPLUGIN | ||
119 | /** | 183 | /** |
@@ -162,23 +226,2 @@ void TheNSResources::findAvailableNetNodes(const QString &path){ | |||
162 | 226 | ||
163 | // used to find unique connection number | ||
164 | int TheNSResources::assignConnectionNumber( void ) { | ||
165 | bool found = 1; | ||
166 | for( int trial = 0; ; trial ++ ) { | ||
167 | found = 1; | ||
168 | for( QDictIterator<NodeCollection> it(ConnectionsMap); | ||
169 | it.current(); | ||
170 | ++it ) { | ||
171 | if( it.current()->number() == trial ) { | ||
172 | found = 0; | ||
173 | break; | ||
174 | } | ||
175 | } | ||
176 | |||
177 | if( found ) { | ||
178 | Log(("Assign profile number %d\n", trial )); | ||
179 | return trial; | ||
180 | } | ||
181 | } | ||
182 | } | ||
183 | |||
184 | /** | 227 | /** |
@@ -229,2 +272,96 @@ bool TheNSResources::loadNetNode( | |||
229 | 272 | ||
273 | #else | ||
274 | |||
275 | void TheNSResources::findAvailableNetNodes( void ){ | ||
276 | |||
277 | Plugins = new OPluginLoader( "networksettings2" ); | ||
278 | Plugins->setAutoDelete( true ); | ||
279 | |||
280 | PluginManager = new OPluginManager( Plugins ); | ||
281 | PluginManager->load(); | ||
282 | |||
283 | if( Plugins->isInSafeMode() ) { | ||
284 | QMessageBox::information( | ||
285 | 0, | ||
286 | tr( "Today Error"), | ||
287 | tr( "<qt>The plugin '%1' caused Today to crash." | ||
288 | " It could be that the plugin is not properly" | ||
289 | " installed.<br>Today tries to continue loading" | ||
290 | " plugins.</qt>" ) | ||
291 | .arg( PluginManager->crashedPlugin().name())); | ||
292 | } | ||
293 | |||
294 | // Get All Plugins | ||
295 | OPluginLoader::List allplugins = Plugins->filtered(); | ||
296 | |||
297 | for( OPluginLoader::List::Iterator it = allplugins.begin(); | ||
298 | it != allplugins.end(); | ||
299 | ++it ) { | ||
300 | |||
301 | // check if this plugin supports the proper interface | ||
302 | NetNodeInterface * interface = | ||
303 | Plugins->load<NetNodeInterface>( *it, IID_NetworkSettings2 ); | ||
304 | |||
305 | if( ! interface ) { | ||
306 | Log(( "Plugin %s from %s does not support proper interface\n", | ||
307 | it->name().latin1(), it->path().latin1() )); | ||
308 | continue; | ||
309 | } | ||
310 | |||
311 | // add the nodes in this plugin to the dictionary | ||
312 | { QList<ANetNode> PNN; | ||
313 | |||
314 | interface->create_plugin( PNN ); | ||
315 | |||
316 | if( PNN.isEmpty() ) { | ||
317 | Log(( "Plugin %s from %s does offer any nodes\n", | ||
318 | it->name().latin1(), it->path().latin1() )); | ||
319 | delete interface; | ||
320 | continue; | ||
321 | } | ||
322 | |||
323 | // merge this node with global node | ||
324 | for( QListIterator<ANetNode> it(PNN); | ||
325 | it.current(); | ||
326 | ++it ) { | ||
327 | AllNodeTypes.insert( it->current()->name(), it->current() ); | ||
328 | } | ||
329 | } | ||
330 | |||
331 | // load the translation | ||
332 | QTranslator *trans = new QTranslator(qApp); | ||
333 | QString fn = QPEApplication::qpeDir()+ | ||
334 | "/i18n/"+lang+"/"+ it->name() + ".qm"; | ||
335 | |||
336 | if( trans->load( fn ) ) | ||
337 | qApp->installTranslator( trans ); | ||
338 | else | ||
339 | delete trans; | ||
340 | } | ||
341 | |||
342 | } | ||
343 | |||
344 | #endif | ||
345 | |||
346 | // used to find unique connection number | ||
347 | int TheNSResources::assignConnectionNumber( void ) { | ||
348 | bool found = 1; | ||
349 | for( int trial = 0; ; trial ++ ) { | ||
350 | found = 1; | ||
351 | for( QDictIterator<NodeCollection> it(ConnectionsMap); | ||
352 | it.current(); | ||
353 | ++it ) { | ||
354 | if( it.current()->number() == trial ) { | ||
355 | found = 0; | ||
356 | break; | ||
357 | } | ||
358 | } | ||
359 | |||
360 | if( found ) { | ||
361 | Log(("Assign profile number %d\n", trial )); | ||
362 | return trial; | ||
363 | } | ||
364 | } | ||
365 | } | ||
366 | |||
230 | QPixmap TheNSResources::getPixmap( const QString & QS ) { | 367 | QPixmap TheNSResources::getPixmap( const QString & QS ) { |
diff --git a/noncore/settings/networksettings2/networksettings2/resources.h b/noncore/settings/networksettings2/networksettings2/resources.h index 5d90286..421a433 100644 --- a/noncore/settings/networksettings2/networksettings2/resources.h +++ b/noncore/settings/networksettings2/networksettings2/resources.h | |||
@@ -16,9 +16,10 @@ class ANetNodeInstance; | |||
16 | 16 | ||
17 | typedef void (*GetNetNodeListFt_t)(QList<ANetNode>& PNN ); | 17 | namespace Opie { |
18 | namespace Core { | ||
19 | class OPluginLoader; | ||
20 | class OPluginManager; | ||
21 | } | ||
22 | } | ||
18 | 23 | ||
19 | typedef struct NetNode_S { | 24 | typedef void (*GetNetNodeListFt_t)(QList<ANetNode>& PNN ); |
20 | ANetNode * NetNode; | ||
21 | QLibrary * TheLibrary; | ||
22 | long NodeCountInLib; | ||
23 | } NetNode_t; | ||
24 | 25 | ||
@@ -39,3 +40,17 @@ public : | |||
39 | 40 | ||
41 | #ifdef MYPLUGIN | ||
42 | |||
43 | typedef struct NetNode_S { | ||
44 | ANetNode * NetNode; | ||
45 | QLibrary * TheLibrary; | ||
46 | long NodeCountInLib; | ||
47 | } NetNode_t; | ||
40 | typedef QDict<NetNode_t> Name2NetNode_t; | 48 | typedef QDict<NetNode_t> Name2NetNode_t; |
49 | |||
50 | #else | ||
51 | |||
52 | typedef QDict<ANetNode> Name2NetNode_t; | ||
53 | |||
54 | #endif | ||
55 | |||
41 | typedef QDict<ANetNodeInstance > Name2Instance_t; | 56 | typedef QDict<ANetNodeInstance > Name2Instance_t; |
@@ -64,2 +79,3 @@ public : | |||
64 | { return AllNodeTypes.find(X)!=0; } | 79 | { return AllNodeTypes.find(X)!=0; } |
80 | #ifdef MYPLUGIN | ||
65 | ANetNode * findNetNode( const QString & N ) | 81 | ANetNode * findNetNode( const QString & N ) |
@@ -68,3 +84,7 @@ public : | |||
68 | } | 84 | } |
69 | 85 | #else | |
86 | ANetNode * findNetNode( const QString & N ) | ||
87 | { return AllNodeTypes.find(N); | ||
88 | } | ||
89 | #endif | ||
70 | // define new plugin (=node) | 90 | // define new plugin (=node) |
@@ -83,2 +103,3 @@ public : | |||
83 | printf( "Find node type %s\n", S.latin1() ); | 103 | printf( "Find node type %s\n", S.latin1() ); |
104 | #ifdef MYPLUGIN | ||
84 | NetNode_t * NNT = AllNodeTypes[S]; | 105 | NetNode_t * NNT = AllNodeTypes[S]; |
@@ -88,2 +109,9 @@ public : | |||
88 | NNI = NNT->NetNode->createInstance(); | 109 | NNI = NNT->NetNode->createInstance(); |
110 | #else | ||
111 | ANetNode * NNT = AllNodeTypes[S]; | ||
112 | if( ! NNT ) { | ||
113 | return 0; | ||
114 | } | ||
115 | NNI = NNT->createInstance(); | ||
116 | #endif | ||
89 | NNI->initialize(); | 117 | NNI->initialize(); |
@@ -120,2 +148,4 @@ private : | |||
120 | QString tr( const char * path ); | 148 | QString tr( const char * path ); |
149 | |||
150 | #ifdef MYPLUGIN | ||
121 | void findAvailableNetNodes( const QString &path ); | 151 | void findAvailableNetNodes( const QString &path ); |
@@ -124,2 +154,5 @@ private : | |||
124 | const QString &resolveString = "create_plugin"); | 154 | const QString &resolveString = "create_plugin"); |
155 | #else | ||
156 | void findAvailableNetNodes( void ); | ||
157 | #endif | ||
125 | 158 | ||
@@ -138,2 +171,8 @@ private : | |||
138 | CurrentQPEUser CurrentUser; | 171 | CurrentQPEUser CurrentUser; |
172 | |||
173 | #ifndef MYPLUGIN | ||
174 | Opie::Core::OPluginLoader * Plugins; | ||
175 | Opie::Core::OPluginManager * PluginManager; | ||
176 | #endif | ||
177 | |||
139 | }; | 178 | }; |
diff --git a/noncore/settings/networksettings2/opietooth2/OTDevice.h b/noncore/settings/networksettings2/opietooth2/OTDevice.h index cf1c4b6..09de7ee 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDevice.h +++ b/noncore/settings/networksettings2/opietooth2/OTDevice.h | |||
@@ -18,4 +18,4 @@ namespace Opie { | |||
18 | class OProcess; | 18 | class OProcess; |
19 | }; | 19 | } |
20 | }; | 20 | } |
21 | 21 | ||
@@ -113,3 +113,3 @@ namespace Opietooth2 { | |||
113 | }; | 113 | }; |
114 | }; | 114 | } |
115 | 115 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h b/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h index 50f28fc..8395f37 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h +++ b/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h | |||
@@ -105,3 +105,3 @@ protected: | |||
105 | 105 | ||
106 | }; | 106 | } |
107 | 107 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.h b/noncore/settings/networksettings2/opietooth2/OTDriver.h index f249cf7..b54ffdf 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDriver.h +++ b/noncore/settings/networksettings2/opietooth2/OTDriver.h | |||
@@ -230,3 +230,3 @@ private: | |||
230 | 230 | ||
231 | }; | 231 | } |
232 | #endif | 232 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.h b/noncore/settings/networksettings2/opietooth2/OTGateway.h index a47cefb..d97ef35 100644 --- a/noncore/settings/networksettings2/opietooth2/OTGateway.h +++ b/noncore/settings/networksettings2/opietooth2/OTGateway.h | |||
@@ -197,3 +197,3 @@ private : | |||
197 | }; | 197 | }; |
198 | }; | 198 | } |
199 | 199 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTHCISocket.h b/noncore/settings/networksettings2/opietooth2/OTHCISocket.h index d508078..a004989 100644 --- a/noncore/settings/networksettings2/opietooth2/OTHCISocket.h +++ b/noncore/settings/networksettings2/opietooth2/OTHCISocket.h | |||
@@ -113,3 +113,3 @@ private slots: | |||
113 | 113 | ||
114 | }; | 114 | } |
115 | 115 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTIcons.h b/noncore/settings/networksettings2/opietooth2/OTIcons.h index 966ed24..ee10831 100644 --- a/noncore/settings/networksettings2/opietooth2/OTIcons.h +++ b/noncore/settings/networksettings2/opietooth2/OTIcons.h | |||
@@ -51,3 +51,3 @@ private: | |||
51 | }; | 51 | }; |
52 | }; | 52 | } |
53 | 53 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.h b/noncore/settings/networksettings2/opietooth2/OTInquiry.h index 2682499..f7bdeec 100644 --- a/noncore/settings/networksettings2/opietooth2/OTInquiry.h +++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.h | |||
@@ -176,3 +176,3 @@ private slots: | |||
176 | 176 | ||
177 | }; | 177 | } |
178 | #endif | 178 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/OTPeer.h b/noncore/settings/networksettings2/opietooth2/OTPeer.h index 9cd0dc7..c09af15 100644 --- a/noncore/settings/networksettings2/opietooth2/OTPeer.h +++ b/noncore/settings/networksettings2/opietooth2/OTPeer.h | |||
@@ -132,3 +132,3 @@ private: | |||
132 | 132 | ||
133 | }; | 133 | } |
134 | 134 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h index 86b5623..e79e33d 100644 --- a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h +++ b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h | |||
@@ -137,3 +137,3 @@ private: | |||
137 | 137 | ||
138 | }; | 138 | } |
139 | 139 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPService.h b/noncore/settings/networksettings2/opietooth2/OTSDPService.h index 21d7344..4831df0 100644 --- a/noncore/settings/networksettings2/opietooth2/OTSDPService.h +++ b/noncore/settings/networksettings2/opietooth2/OTSDPService.h | |||
@@ -72,3 +72,3 @@ private: | |||
72 | 72 | ||
73 | }; | 73 | } |
74 | 74 | ||
diff --git a/noncore/settings/networksettings2/opietooth2/OTUUID.h b/noncore/settings/networksettings2/opietooth2/OTUUID.h index 97df114..aebd9b9 100644 --- a/noncore/settings/networksettings2/opietooth2/OTUUID.h +++ b/noncore/settings/networksettings2/opietooth2/OTUUID.h | |||
@@ -56,3 +56,3 @@ public : | |||
56 | }; | 56 | }; |
57 | }; | 57 | } |
58 | #endif | 58 | #endif |
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.h b/noncore/settings/networksettings2/opietooth2/Opietooth.h index e66787f..f077dd7 100644 --- a/noncore/settings/networksettings2/opietooth2/Opietooth.h +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.h | |||
@@ -13,5 +13,5 @@ namespace Opie { | |||
13 | 13 | ||
14 | }; | 14 | } |
15 | 15 | ||
16 | }; | 16 | } |
17 | 17 | ||
@@ -53,3 +53,3 @@ private : | |||
53 | }; | 53 | }; |
54 | }; | 54 | } |
55 | 55 | ||
@@ -82,3 +82,3 @@ private : | |||
82 | }; | 82 | }; |
83 | }; | 83 | } |
84 | 84 | ||
@@ -160,3 +160,3 @@ private : | |||
160 | }; | 160 | }; |
161 | }; | 161 | } |
162 | 162 | ||
@@ -198,3 +198,3 @@ private : | |||
198 | }; | 198 | }; |
199 | }; | 199 | } |
200 | 200 | ||
@@ -236,3 +236,3 @@ private : | |||
236 | }; | 236 | }; |
237 | }; | 237 | } |
238 | #endif | 238 | #endif |
diff --git a/noncore/settings/networksettings2/ppp/ppp.pro b/noncore/settings/networksettings2/ppp/ppp.pro index dd3408c..10d0f1b 100644 --- a/noncore/settings/networksettings2/ppp/ppp.pro +++ b/noncore/settings/networksettings2/ppp/ppp.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/ppp/ppp_NN.cpp b/noncore/settings/networksettings2/ppp/ppp_NN.cpp index 51ba27d..bd13ab9 100644 --- a/noncore/settings/networksettings2/ppp/ppp_NN.cpp +++ b/noncore/settings/networksettings2/ppp/ppp_NN.cpp | |||
@@ -6,2 +6,8 @@ | |||
6 | 6 | ||
7 | #ifndef MYPLUGIN | ||
8 | |||
9 | #include "netnodeinterface.h" | ||
10 | |||
11 | #endif | ||
12 | |||
7 | QStringList * PPPNetNode::ProperFiles = 0; | 13 | QStringList * PPPNetNode::ProperFiles = 0; |
@@ -80,2 +86,4 @@ void PPPNetNode::saveSpecificAttribute( QTextStream & ) { | |||
80 | 86 | ||
87 | #ifdef MYPLUGIN | ||
88 | |||
81 | extern "C" { | 89 | extern "C" { |
@@ -84,2 +92,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
84 | } | 92 | } |
93 | |||
94 | #else | ||
95 | |||
96 | OPIE_NS2_PLUGIN( NetNodeInterface<PPPNetNode> ) | ||
97 | |||
98 | #endif | ||
99 | |||
85 | } | 100 | } |
diff --git a/noncore/settings/networksettings2/profile/profile.pro b/noncore/settings/networksettings2/profile/profile.pro index f980034..4db7a5d 100644 --- a/noncore/settings/networksettings2/profile/profile.pro +++ b/noncore/settings/networksettings2/profile/profile.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/profile/profile_NN.cpp b/noncore/settings/networksettings2/profile/profile_NN.cpp index b7d8aa0..6028ea5 100644 --- a/noncore/settings/networksettings2/profile/profile_NN.cpp +++ b/noncore/settings/networksettings2/profile/profile_NN.cpp | |||
@@ -4,2 +4,8 @@ | |||
4 | 4 | ||
5 | #ifndef MYPLUGIN | ||
6 | |||
7 | #include "netnodeinterface.h" | ||
8 | |||
9 | #endif | ||
10 | |||
5 | static const char * ProfileNeeds[] = | 11 | static const char * ProfileNeeds[] = |
@@ -55,2 +61,4 @@ void ProfileNetNode::saveSpecificAttribute( QTextStream & ) { | |||
55 | 61 | ||
62 | #ifdef MYPLUGIN | ||
63 | |||
56 | extern "C" { | 64 | extern "C" { |
@@ -59,2 +67,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
59 | } | 67 | } |
68 | |||
69 | #else | ||
70 | |||
71 | OPIE_NS2_PLUGIN( NetNodeInterface<ProfileNetNode> ) | ||
72 | |||
73 | #endif | ||
74 | |||
60 | } | 75 | } |
diff --git a/noncore/settings/networksettings2/usb/usb.pro b/noncore/settings/networksettings2/usb/usb.pro index 37c1bde..d9890b6 100644 --- a/noncore/settings/networksettings2/usb/usb.pro +++ b/noncore/settings/networksettings2/usb/usb.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/usb/usb_NN.cpp b/noncore/settings/networksettings2/usb/usb_NN.cpp index bd9ae2b..9c07b82 100644 --- a/noncore/settings/networksettings2/usb/usb_NN.cpp +++ b/noncore/settings/networksettings2/usb/usb_NN.cpp | |||
@@ -4,2 +4,8 @@ | |||
4 | 4 | ||
5 | #ifndef MYPLUGIN | ||
6 | |||
7 | #include "netnodeinterface.h" | ||
8 | |||
9 | #endif | ||
10 | |||
5 | static const char * USBNeeds[] = | 11 | static const char * USBNeeds[] = |
@@ -57,2 +63,4 @@ void USBNetNode::saveSpecificAttribute( QTextStream & ) { | |||
57 | 63 | ||
64 | #ifdef MYPLUGIN | ||
65 | |||
58 | extern "C" { | 66 | extern "C" { |
@@ -61,2 +69,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
61 | } | 69 | } |
70 | |||
71 | #else | ||
72 | |||
73 | OPIE_NS2_PLUGIN( NetNodeInterface<USBNetNode> ) | ||
74 | |||
75 | #endif | ||
76 | |||
62 | } | 77 | } |
diff --git a/noncore/settings/networksettings2/usb/usb_NNI.cpp b/noncore/settings/networksettings2/usb/usb_NNI.cpp index 600b771..424845c 100644 --- a/noncore/settings/networksettings2/usb/usb_NNI.cpp +++ b/noncore/settings/networksettings2/usb/usb_NNI.cpp | |||
@@ -47,3 +47,3 @@ short AUSB::generateFileEmbedded( SystemFile & SF, | |||
47 | << QPEApplication::qpeDir() | 47 | << QPEApplication::qpeDir() |
48 | << "bin/setmacaddress.sh " | 48 | << "bin/NS2SetMac.sh " |
49 | << NIC | 49 | << NIC |
diff --git a/noncore/settings/networksettings2/vpn/vpn.pro b/noncore/settings/networksettings2/vpn/vpn.pro index a131a1f..349571e 100644 --- a/noncore/settings/networksettings2/vpn/vpn.pro +++ b/noncore/settings/networksettings2/vpn/vpn.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/vpn/vpn_NN.cpp b/noncore/settings/networksettings2/vpn/vpn_NN.cpp index 23ec04a..6dd5332 100644 --- a/noncore/settings/networksettings2/vpn/vpn_NN.cpp +++ b/noncore/settings/networksettings2/vpn/vpn_NN.cpp | |||
@@ -3,2 +3,8 @@ | |||
3 | 3 | ||
4 | #ifndef MYPLUGIN | ||
5 | |||
6 | #include "netnodeinterface.h" | ||
7 | |||
8 | #endif | ||
9 | |||
4 | static const char * VPNNeeds[] = | 10 | static const char * VPNNeeds[] = |
@@ -49,2 +55,4 @@ void VPNNetNode::saveSpecificAttribute( QTextStream & ) { | |||
49 | 55 | ||
56 | #ifdef MYPLUGIN | ||
57 | |||
50 | extern "C" { | 58 | extern "C" { |
@@ -53,2 +61,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
53 | } | 61 | } |
62 | |||
63 | #else | ||
64 | |||
65 | OPIE_NS2_PLUGIN( NetNodeInterface<VPNNetNode> ) | ||
66 | |||
67 | #endif | ||
68 | |||
54 | } | 69 | } |
diff --git a/noncore/settings/networksettings2/wlan/wlan.pro b/noncore/settings/networksettings2/wlan/wlan.pro index f4c55df..a08cbbb 100644 --- a/noncore/settings/networksettings2/wlan/wlan.pro +++ b/noncore/settings/networksettings2/wlan/wlan.pro | |||
@@ -1,3 +1,3 @@ | |||
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 |
diff --git a/noncore/settings/networksettings2/wlan/wlan_NN.cpp b/noncore/settings/networksettings2/wlan/wlan_NN.cpp index 36a5c33..c56da06 100644 --- a/noncore/settings/networksettings2/wlan/wlan_NN.cpp +++ b/noncore/settings/networksettings2/wlan/wlan_NN.cpp | |||
@@ -4,2 +4,8 @@ | |||
4 | 4 | ||
5 | #ifndef MYPLUGIN | ||
6 | |||
7 | #include "netnodeinterface.h" | ||
8 | |||
9 | #endif | ||
10 | |||
5 | static const char * WLanNeeds[] = | 11 | static const char * WLanNeeds[] = |
@@ -65,2 +71,4 @@ void WLanNetNode::saveSpecificAttribute( QTextStream & TS ) { | |||
65 | 71 | ||
72 | #ifdef MYPLUGIN | ||
73 | |||
66 | extern "C" { | 74 | extern "C" { |
@@ -69,2 +77,9 @@ void create_plugin( QList<ANetNode> & PNN ) { | |||
69 | } | 77 | } |
78 | |||
79 | #else | ||
80 | |||
81 | OPIE_NS2_PLUGIN( NetNodeInterface<WLanNetNode> ) | ||
82 | |||
83 | #endif | ||
84 | |||
70 | } | 85 | } |