author | mickeyl <mickeyl> | 2002-12-31 14:59:35 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-31 14:59:35 (UTC) |
commit | 76ec681931f01609969b92e75908418d9e8e92d5 (patch) (side-by-side diff) | |
tree | 8230634998f17c66ebb4eb1acd82112cdb77c944 /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | 3f35e5918b5f508139e189d2428d01d6c2933a50 (diff) | |
download | opie-76ec681931f01609969b92e75908418d9e8e92d5.zip opie-76ec681931f01609969b92e75908418d9e8e92d5.tar.gz opie-76ec681931f01609969b92e75908418d9e8e92d5.tar.bz2 |
- catch with latest changes in libwellenreiter
- GUI now identifies and displays device manufacturers
- GUI now displays the number of received beacons for each device
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 9068e3a..b22c5cc 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -26,2 +26,3 @@ #ifdef QWS +#include <qpe/qpeapplication.h> #include <qpe/global.h> @@ -57,8 +58,9 @@ using namespace Opie; +#include <daemon/source/config.hh> +#include <libwellenreiter/source/wl_types.hh> #include <libwellenreiter/source/wl_sock.hh> #include <libwellenreiter/source/wl_proto.hh> -#include <daemon/source/config.hh> Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) - : WellenreiterBase( parent, name, fl ), daemonRunning( false ) + : WellenreiterBase( parent, name, fl ), daemonRunning( false ), manufacturerdb( 0 ) { @@ -71,3 +73,3 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) #ifdef QWS - manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) qApp.qpeDir() ); + manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); #else @@ -94,3 +96,4 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) - daemon_fd = wl_setupsock( GUIADDR, GUIPORT ); + // struct sockaddr_in sockaddr; + daemon_fd = wl_setupsock( GUIADDR, GUIPORT, sockaddr ); if ( daemon_fd == -1 ) @@ -113,2 +116,5 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) netview->setColumnWidthMode( 1, QListView::Manual ); + + if ( manufacturerdb ) + netview->setManufacturerDB( manufacturerdb ); @@ -129,4 +135,6 @@ void Wellenreiter::handleMessage() - char buffer[10000]; - memset( &buffer, 0, sizeof( buffer ) ); + /*char buffer[10000]; + memset( &buffer, 0, sizeof( buffer ) );*/ + + char buffer[WL_SOCKBUF]; @@ -134,2 +142,4 @@ void Wellenreiter::handleMessage() + /* + struct sockaddr from; @@ -138,4 +148,7 @@ void Wellenreiter::handleMessage() int result = recvfrom( daemon_fd, &buffer, 8192, MSG_WAITALL, &from, &len ); - qDebug( "received %d from recv [%d bytes]", result, len ); + + */ + + int result = wl_recv( &daemon_fd, sockaddr, (char*) &buffer, WL_SOCKBUF ); |