summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/lancard
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/lancard') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/lancard/lancard.pro2
-rw-r--r--noncore/settings/networksettings2/lancard/lancard_NN.cpp15
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 @@
TEMPLATE = lib
-CONFIG += qt warn_on release
+CONFIG += qt warn_on release plugin
DESTDIR = $(OPIEDIR)/plugins/networksettings2
HEADERS = lancard_NN.h \
lancard_NNI.h \
lancardedit.h
SOURCES = lancard_NN.cpp \
lancard_NNI.cpp \
lancardedit.cpp \
lancardrun.cpp
INCLUDEPATH += $(OPIEDIR)/include ../ ../networksettings2
DEPENDPATH += $(OPIEDIR)/include ../ ../networksettings2
LIBS += -lqpe
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 @@
#include "lancard_NN.h"
#include "lancard_NNI.h"
+#ifndef MYPLUGIN
+
+#include "netnodeinterface.h"
+
+#endif
+
static const char * LanCardNeeds[] =
{ 0
};
static const char * LanCardProvides[] =
{ "device",
0
};
/**
* Constructor, find all of the possible interfaces
*/
@@ -61,17 +67,26 @@ void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) {
TS << "interfacecount="
<< InstanceCount
<< endl;
for( QStringList::Iterator it = NICMACAddresses.begin();
it != NICMACAddresses.end();
++it ) {
TS << "macaddress="
<< (*it)
<< endl;
}
}
+#ifdef MYPLUGIN
+
extern "C" {
void create_plugin( QList<ANetNode> & PNN ) {
PNN.append( new LanCardNetNode() );
}
+
+#else
+
+OPIE_NS2_PLUGIN( NetNodeInterface<LanCardNetNode> )
+
+#endif
+
}