Diffstat (limited to 'noncore/settings/networksettings2/lancard') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancard.pro | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancard_NN.cpp | 15 |
2 files changed, 16 insertions, 1 deletions
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,14 +1,14 @@ | |||
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 = lancard_NN.h \ | 4 | HEADERS = lancard_NN.h \ |
5 | lancard_NNI.h \ | 5 | lancard_NNI.h \ |
6 | lancardedit.h | 6 | lancardedit.h |
7 | SOURCES = lancard_NN.cpp \ | 7 | SOURCES = lancard_NN.cpp \ |
8 | lancard_NNI.cpp \ | 8 | lancard_NNI.cpp \ |
9 | lancardedit.cpp \ | 9 | lancardedit.cpp \ |
10 | lancardrun.cpp | 10 | lancardrun.cpp |
11 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../networksettings2 | 11 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../networksettings2 |
12 | DEPENDPATH+= $(OPIEDIR)/include ../ ../networksettings2 | 12 | DEPENDPATH+= $(OPIEDIR)/include ../ ../networksettings2 |
13 | LIBS += -lqpe | 13 | LIBS += -lqpe |
14 | INTERFACES= lancardGUI.ui | 14 | INTERFACES= lancardGUI.ui |
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 | |||
@@ -1,15 +1,21 @@ | |||
1 | #include "lancard_NN.h" | 1 | #include "lancard_NN.h" |
2 | #include "lancard_NNI.h" | 2 | #include "lancard_NNI.h" |
3 | 3 | ||
4 | #ifndef MYPLUGIN | ||
5 | |||
6 | #include "netnodeinterface.h" | ||
7 | |||
8 | #endif | ||
9 | |||
4 | static const char * LanCardNeeds[] = | 10 | static const char * LanCardNeeds[] = |
5 | { 0 | 11 | { 0 |
6 | }; | 12 | }; |
7 | 13 | ||
8 | static const char * LanCardProvides[] = | 14 | static const char * LanCardProvides[] = |
9 | { "device", | 15 | { "device", |
10 | 0 | 16 | 0 |
11 | }; | 17 | }; |
12 | 18 | ||
13 | /** | 19 | /** |
14 | * Constructor, find all of the possible interfaces | 20 | * Constructor, find all of the possible interfaces |
15 | */ | 21 | */ |
@@ -61,17 +67,26 @@ void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { | |||
61 | TS << "interfacecount=" | 67 | TS << "interfacecount=" |
62 | << InstanceCount | 68 | << InstanceCount |
63 | << endl; | 69 | << endl; |
64 | for( QStringList::Iterator it = NICMACAddresses.begin(); | 70 | for( QStringList::Iterator it = NICMACAddresses.begin(); |
65 | it != NICMACAddresses.end(); | 71 | it != NICMACAddresses.end(); |
66 | ++it ) { | 72 | ++it ) { |
67 | TS << "macaddress=" | 73 | TS << "macaddress=" |
68 | << (*it) | 74 | << (*it) |
69 | << endl; | 75 | << endl; |
70 | } | 76 | } |
71 | } | 77 | } |
72 | 78 | ||
79 | #ifdef MYPLUGIN | ||
80 | |||
73 | extern "C" { | 81 | extern "C" { |
74 | void create_plugin( QList<ANetNode> & PNN ) { | 82 | void create_plugin( QList<ANetNode> & PNN ) { |
75 | PNN.append( new LanCardNetNode() ); | 83 | PNN.append( new LanCardNetNode() ); |
76 | } | 84 | } |
85 | |||
86 | #else | ||
87 | |||
88 | OPIE_NS2_PLUGIN( NetNodeInterface<LanCardNetNode> ) | ||
89 | |||
90 | #endif | ||
91 | |||
77 | } | 92 | } |