author | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
commit | 0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 (patch) (unidiff) | |
tree | f6a68afa76a9be4099c3de7a286caeadd250c966 /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | d9d68663164078b8dbdbfe70d291291b9fd5aacf (diff) | |
download | opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.zip opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.gz opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.bz2 |
Convert net to ODP and QtAUX
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index ce416e5..e8d9de7 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -52,24 +52,30 @@ using namespace Opie; | |||
52 | #include <qtoolbutton.h> | 52 | #include <qtoolbutton.h> |
53 | #include <qmainwindow.h> | 53 | #include <qmainwindow.h> |
54 | 54 | ||
55 | // Standard | 55 | // Standard |
56 | 56 | ||
57 | #include <assert.h> | 57 | #include <assert.h> |
58 | #include <errno.h> | 58 | #include <errno.h> |
59 | #include <unistd.h> | 59 | #include <unistd.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <sys/types.h> | 61 | #include <sys/types.h> |
62 | #include <stdlib.h> | 62 | #include <stdlib.h> |
63 | 63 | ||
64 | using namespace Opie::Core; | ||
65 | using namespace Opie::Net; | ||
66 | using namespace Opie::Net; | ||
67 | using namespace Opie::Core; | ||
68 | using namespace Opie::Net; | ||
69 | using namespace Opie::Core; | ||
64 | Wellenreiter::Wellenreiter( QWidget* parent ) | 70 | Wellenreiter::Wellenreiter( QWidget* parent ) |
65 | : WellenreiterBase( parent, 0, 0 ), | 71 | : WellenreiterBase( parent, 0, 0 ), |
66 | sniffing( false ), iface( 0 ), configwindow( 0 ) | 72 | sniffing( false ), iface( 0 ), configwindow( 0 ) |
67 | { | 73 | { |
68 | 74 | ||
69 | logwindow->log( "(i) Wellenreiter has been started." ); | 75 | logwindow->log( "(i) Wellenreiter has been started." ); |
70 | 76 | ||
71 | // | 77 | // |
72 | // detect operating system | 78 | // detect operating system |
73 | // | 79 | // |
74 | 80 | ||
75 | #ifdef QWS | 81 | #ifdef QWS |
@@ -437,25 +443,25 @@ void Wellenreiter::receivePacket( OPacket* p ) | |||
437 | handleIPData( p, ip, source, dest ); | 443 | handleIPData( p, ip, source, dest ); |
438 | } | 444 | } |
439 | 445 | ||
440 | //handleNotification( p ); | 446 | //handleNotification( p ); |
441 | 447 | ||
442 | } | 448 | } |
443 | 449 | ||
444 | 450 | ||
445 | void Wellenreiter::stopClicked() | 451 | void Wellenreiter::stopClicked() |
446 | { | 452 | { |
447 | if ( iface ) | 453 | if ( iface ) |
448 | { | 454 | { |
449 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 455 | disconnect( SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); |
450 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 456 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
451 | iface->setChannelHopping(); // stop hopping channels | 457 | iface->setChannelHopping(); // stop hopping channels |
452 | } | 458 | } |
453 | else | 459 | else |
454 | killTimers(); | 460 | killTimers(); |
455 | 461 | ||
456 | pcap->close(); | 462 | pcap->close(); |
457 | sniffing = false; | 463 | sniffing = false; |
458 | 464 | ||
459 | if ( iface ) | 465 | if ( iface ) |
460 | { | 466 | { |
461 | // switch off monitor mode | 467 | // switch off monitor mode |
@@ -602,25 +608,25 @@ void Wellenreiter::startClicked() | |||
602 | pcap->setBlocking( false ); | 608 | pcap->setBlocking( false ); |
603 | 609 | ||
604 | // start channel hopper | 610 | // start channel hopper |
605 | if ( cardtype != DEVTYPE_FILE ) | 611 | if ( cardtype != DEVTYPE_FILE ) |
606 | { | 612 | { |
607 | logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); | 613 | logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); |
608 | iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window | 614 | iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window |
609 | } | 615 | } |
610 | 616 | ||
611 | if ( cardtype != DEVTYPE_FILE ) | 617 | if ( cardtype != DEVTYPE_FILE ) |
612 | { | 618 | { |
613 | // connect socket notifier and start channel hopper | 619 | // connect socket notifier and start channel hopper |
614 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 620 | connect( pcap, SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); |
615 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 621 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
616 | } | 622 | } |
617 | else | 623 | else |
618 | { | 624 | { |
619 | // start timer for reading packets | 625 | // start timer for reading packets |
620 | startTimer( 100 ); | 626 | startTimer( 100 ); |
621 | } | 627 | } |
622 | 628 | ||
623 | logwindow->log( "(i) Started Scanning." ); | 629 | logwindow->log( "(i) Started Scanning." ); |
624 | sniffing = true; | 630 | sniffing = true; |
625 | 631 | ||
626 | #ifdef QWS | 632 | #ifdef QWS |