summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro5
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp13
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp28
-rw-r--r--noncore/net/wellenreiter/lib/.cvsignore4
-rw-r--r--noncore/net/wellenreiter/lib/lib.pro28
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro3
6 files changed, 68 insertions, 13 deletions
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 505d376..5a8972c 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -16,28 +16,27 @@ HEADERS = wellenreiterbase.h \
SOURCES = main.cpp \
mainwindow.cpp \
wellenreiterbase.cpp \
wellenreiter.cpp \
scanlist.cpp \
logwindow.cpp \
hexwindow.cpp \
configwindow.cpp \
manufacturers.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lopiecore2 -lopieui2 -lopienet2
INTERFACES = configbase.ui
TARGET = wellenreiter
!contains( platform, x11 ) {
message( qws )
include ( $(OPIEDIR)/include.pro )
- LIBS += -lqpe -lopie
+ LIBS += -lqpe -lopie -lopiecore2 -lopieui2 -lopienet2
}
contains( platform, x11 ) {
- LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
+ LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -lwellenreiter
SOURCES += resource.cpp
HEADERS += resource.h
}
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp
index 96a8c1c..8d4ef57 100644
--- a/noncore/net/wellenreiter/gui/main.cpp
+++ b/noncore/net/wellenreiter/gui/main.cpp
@@ -5,23 +5,36 @@
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "mainwindow.h"
+#ifdef QWS
#include <opie2/oapplication.h>
+#else
+#include <qapplication.h>
+#endif
int main( int argc, char **argv )
{
+ #ifdef QWS
OApplication a( argc, argv, "Wellenreiter II" );
+ #else
+ QApplication a( argc, argv );
+ #endif
WellenreiterMainWindow* w = new WellenreiterMainWindow();
+ #ifdef QWS
a.showMainWidget( w );
+ #else
+ a.setMainWidget( w );
+ w->show();
+ #endif
a.exec();
delete w;
return 0;
}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 3bff7c4..41ffdcc 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -4,43 +4,47 @@
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
***********************************************************************/
-// Qt
-
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qsocketnotifier.h>
-
// Opie
#ifdef QWS
#include <opie/odevice.h>
using namespace Opie;
#endif
+#ifdef QWS
#include <opie2/oapplication.h>
+#else
+#include <qapplication.h>
+#endif
#include <opie2/onetwork.h>
#include <opie2/opcap.h>
+// Qt
+
+#include <qpushbutton.h>
+#include <qmessagebox.h>
+#include <qcombobox.h>
+#include <qspinbox.h>
+#include <qsocketnotifier.h>
+
// Standard
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
// Local
#include "wellenreiter.h"
@@ -134,25 +138,29 @@ void Wellenreiter::receivePacket(OPacket* p)
netView()->addNewItem( type, essid, header->macAddress2().toString(), header->usesWep(), channel, 0 );
}
void Wellenreiter::startStopClicked()
{
if ( sniffing )
{
disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
iface->setChannelHopping(); // stop hopping channels
pcap->close();
sniffing = false;
+ #ifdef QWS
oApp->setTitle();
+ #else
+ qApp->mainWidget()->setCaption( "Wellenreiter II" );
+ #endif
// get interface name from config window
const QString& interface = configwindow->interfaceName->currentText();
ONetwork* net = ONetwork::instance();
iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface ));
// switch off monitor mode
iface->setMonitorMode( false );
// switch off promisc flag
iface->setPromiscuousMode( false );
//TODO: Display "please wait..." (use owait?)
@@ -212,17 +220,21 @@ void Wellenreiter::startStopClicked()
}
// set capturer to non-blocking mode
pcap->setBlocking( false );
// start channel hopper
iface->setChannelHopping( 1000 ); //use interval from config window
// connect
connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
logwindow->log( "(i) Daemon has been started." );
+ #ifdef QWS
oApp->setTitle( "Scanning ..." );
+ #else
+ qApp->mainWidget()->setCaption( "Wellenreiter II / Scanning ..." );
+ #endif
sniffing = true;
}
}
diff --git a/noncore/net/wellenreiter/lib/.cvsignore b/noncore/net/wellenreiter/lib/.cvsignore
new file mode 100644
index 0000000..924753a
--- a/dev/null
+++ b/noncore/net/wellenreiter/lib/.cvsignore
@@ -0,0 +1,4 @@
+*.o
+*~
+moc_*
+Makefile
diff --git a/noncore/net/wellenreiter/lib/lib.pro b/noncore/net/wellenreiter/lib/lib.pro
new file mode 100644
index 0000000..8728323
--- a/dev/null
+++ b/noncore/net/wellenreiter/lib/lib.pro
@@ -0,0 +1,28 @@
+MOC_DIR = ./tmp
+OBJECTS_DIR = ./tmp
+DESTDIR = $(OPIEDIR)/lib
+TEMPLATE = lib
+CONFIG = qt warn_on debug
+
+HEADERS = $(OPIEDIR)/libopie2/opieui/olistview.h \
+ $(OPIEDIR)/libopie2/opienet/onetutils.h \
+ $(OPIEDIR)/libopie2/opienet/onetwork.h \
+ $(OPIEDIR)/libopie2/opienet/opcap.h
+
+SOURCES = $(OPIEDIR)/libopie2/opieui/olistview.cpp \
+ $(OPIEDIR)/libopie2/opienet/onetutils.cpp \
+ $(OPIEDIR)/libopie2/opienet/onetwork.cpp \
+ $(OPIEDIR)/libopie2/opienet/opcap.cpp
+
+INCLUDEPATH += $(OPIEDIR)/include
+DEPENDPATH += $(OPIEDIR)/include
+LIBS = -lpcap
+TARGET = wellenreiter
+VERSION = 1.0.0
+
+contains( platform, x11 ) {
+ LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
+ SOURCES += resource.cpp
+ HEADERS += resource.h
+}
+
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index d473695..6fe49c3 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,14 +1,13 @@
TEMPLATE = subdirs
-unix:SUBDIRS = gui
-
+unix:SUBDIRS = lib gui
!contains( platform, x11 ) {
message( Configuring Wellenreiter for build on Opie )
include ( $(OPIEDIR)/include.pro )
}
contains( platform, x11 ) {
message( Configuring Wellenreiter for build on Qt/X11 )
system( mkdir -p $OPIEDIR/lib $OPIEDIR/bin $OPIEDIR/share/pics )
}