-rw-r--r-- | noncore/net/wellenreiter/gui/manufacturers.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/manufacturers.h | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 36 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.h | 7 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlistitem.cpp | 19 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlistitem.h | 8 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 27 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 19 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.cpp | 18 | ||||
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro | 2 |
10 files changed, 109 insertions, 33 deletions
diff --git a/noncore/net/wellenreiter/gui/manufacturers.cpp b/noncore/net/wellenreiter/gui/manufacturers.cpp index d235989..dad2753 100644 --- a/noncore/net/wellenreiter/gui/manufacturers.cpp +++ b/noncore/net/wellenreiter/gui/manufacturers.cpp | |||
@@ -37,22 +37,24 @@ ManufacturerDB::ManufacturerDB( const QString& filename ) | |||
37 | 37 | ||
38 | while (!s.atEnd()) | 38 | while (!s.atEnd()) |
39 | { | 39 | { |
40 | s >> addr; | 40 | s >> addr; |
41 | s.skipWhiteSpace(); | 41 | s.skipWhiteSpace(); |
42 | manu = s.readLine(); | 42 | manu = s.readLine(); |
43 | #ifdef DEBUG | ||
43 | qDebug( "ManufacturerDB: read pair %s, %s", (const char*) addr, (const char*) manu ); | 44 | qDebug( "ManufacturerDB: read pair %s, %s", (const char*) addr, (const char*) manu ); |
45 | #endif | ||
44 | manufacturers.insert( addr, manu ); | 46 | manufacturers.insert( addr, manu ); |
45 | 47 | ||
46 | } | 48 | } |
47 | } | 49 | } |
48 | 50 | ||
49 | } | 51 | } |
50 | 52 | ||
51 | ManufacturerDB::~ManufacturerDB() | 53 | ManufacturerDB::~ManufacturerDB() |
52 | { | 54 | { |
53 | } | 55 | } |
54 | 56 | ||
55 | QString ManufacturerDB::lookup( const QString& macaddr ) | 57 | const QString& ManufacturerDB::lookup( const QString& macaddr ) const |
56 | { | 58 | { |
57 | return manufacturers[macaddr.upper().left(8)]; | 59 | return manufacturers[macaddr.upper().left(8)]; |
58 | } | 60 | } |
diff --git a/noncore/net/wellenreiter/gui/manufacturers.h b/noncore/net/wellenreiter/gui/manufacturers.h index d69977a..67afe21 100644 --- a/noncore/net/wellenreiter/gui/manufacturers.h +++ b/noncore/net/wellenreiter/gui/manufacturers.h | |||
@@ -22,13 +22,13 @@ | |||
22 | class ManufacturerDB | 22 | class ManufacturerDB |
23 | { | 23 | { |
24 | public: | 24 | public: |
25 | 25 | ||
26 | ManufacturerDB( const QString& filename ); | 26 | ManufacturerDB( const QString& filename ); |
27 | virtual ~ManufacturerDB(); | 27 | virtual ~ManufacturerDB(); |
28 | QString lookup( const QString& macaddr ); | 28 | const QString& lookup( const QString& macaddr ) const; |
29 | 29 | ||
30 | private: | 30 | private: |
31 | 31 | ||
32 | QMap<QString, QString> manufacturers; | 32 | QMap<QString, QString> manufacturers; |
33 | 33 | ||
34 | }; | 34 | }; |
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 6d032aa..ab19701 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -15,21 +15,48 @@ | |||
15 | 15 | ||
16 | #include "scanlist.h" | 16 | #include "scanlist.h" |
17 | #include "scanlistitem.h" | 17 | #include "scanlistitem.h" |
18 | 18 | ||
19 | #include <assert.h> | 19 | #include <assert.h> |
20 | 20 | ||
21 | #include "manufacturers.h" | ||
22 | |||
21 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 23 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
22 | :QListView( parent, name ) | 24 | :QListView( parent, name ), _manufacturerdb( 0 ) |
23 | { | 25 | { |
26 | |||
27 | setFrameShape( QListView::StyledPanel ); | ||
28 | setFrameShadow( QListView::Sunken ); | ||
29 | |||
30 | addColumn( tr( "Net/Station" ) ); | ||
31 | setColumnAlignment( 0, AlignLeft || AlignVCenter ); | ||
32 | addColumn( tr( "B" ) ); | ||
33 | setColumnAlignment( 1, AlignCenter ); | ||
34 | addColumn( tr( "AP" ) ); | ||
35 | setColumnAlignment( 2, AlignCenter ); | ||
36 | addColumn( tr( "Chn" ) ); | ||
37 | setColumnAlignment( 3, AlignCenter ); | ||
38 | addColumn( tr( "W" ) ); | ||
39 | setColumnAlignment( 4, AlignCenter ); | ||
40 | addColumn( tr( "T" ) ); | ||
41 | setColumnAlignment( 5, AlignCenter ); | ||
42 | addColumn( tr( "Manufacturer" ) ); | ||
43 | setColumnAlignment( 6, AlignCenter ); | ||
44 | setRootIsDecorated( true ); | ||
45 | setAllColumnsShowFocus( true ); | ||
24 | }; | 46 | }; |
25 | 47 | ||
26 | MScanListView::~MScanListView() | 48 | MScanListView::~MScanListView() |
27 | { | 49 | { |
28 | }; | 50 | }; |
29 | 51 | ||
52 | void MScanListView::setManufacturerDB( ManufacturerDB* manufacturerdb ) | ||
53 | { | ||
54 | _manufacturerdb = manufacturerdb; | ||
55 | } | ||
56 | |||
30 | void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) | 57 | void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) |
31 | { | 58 | { |
32 | // FIXME: scanlistitem needs a proper encapsulation and not such a damn dealing with text(...) | 59 | // FIXME: scanlistitem needs a proper encapsulation and not such a damn dealing with text(...) |
33 | 60 | ||
34 | qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", | 61 | qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", |
35 | (const char*) type, | 62 | (const char*) type, |
@@ -81,13 +108,16 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
81 | item = static_cast<MScanListItem*> ( item->itemBelow() ); | 108 | item = static_cast<MScanListItem*> ( item->itemBelow() ); |
82 | } | 109 | } |
83 | 110 | ||
84 | if ( item ) | 111 | if ( item ) |
85 | { | 112 | { |
86 | // we have already seen this item, it's a dupe | 113 | // we have already seen this item, it's a dupe |
114 | #ifdef DEBUG | ||
87 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); | 115 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); |
116 | #endif | ||
117 | item->receivedBeacon(); | ||
88 | return; | 118 | return; |
89 | } | 119 | } |
90 | } | 120 | } |
91 | else | 121 | else |
92 | { | 122 | { |
93 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); | 123 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); |
@@ -99,13 +129,15 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
99 | // insert new station as child from network | 129 | // insert new station as child from network |
100 | 130 | ||
101 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? | 131 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? |
102 | 132 | ||
103 | qDebug( "inserting new station %s", (const char*) macaddr ); | 133 | qDebug( "inserting new station %s", (const char*) macaddr ); |
104 | 134 | ||
105 | new MScanListItem( network, type, "", macaddr, wep, channel, signal ); | 135 | MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); |
136 | if ( _manufacturerdb ) | ||
137 | station->setManufacturer( _manufacturerdb->lookup( macaddr ) ); | ||
106 | 138 | ||
107 | if ( type == "managed" ) | 139 | if ( type == "managed" ) |
108 | { | 140 | { |
109 | s.sprintf( "(i) new AP in '%s' [%d]", (const char*) essid, channel ); | 141 | s.sprintf( "(i) new AP in '%s' [%d]", (const char*) essid, channel ); |
110 | } | 142 | } |
111 | else | 143 | else |
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index 6fe6930..9a35a82 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h | |||
@@ -17,21 +17,28 @@ | |||
17 | #define SCANLIST_H | 17 | #define SCANLIST_H |
18 | 18 | ||
19 | #include <qlistview.h> | 19 | #include <qlistview.h> |
20 | 20 | ||
21 | class QString; | 21 | class QString; |
22 | 22 | ||
23 | class ManufacturerDB; | ||
24 | |||
23 | class MScanListView: public QListView | 25 | class MScanListView: public QListView |
24 | { | 26 | { |
25 | Q_OBJECT | 27 | Q_OBJECT |
26 | 28 | ||
27 | public: | 29 | public: |
28 | MScanListView( QWidget* parent = 0, const char* name = 0 ); | 30 | MScanListView( QWidget* parent = 0, const char* name = 0 ); |
29 | virtual ~MScanListView(); | 31 | virtual ~MScanListView(); |
30 | 32 | ||
33 | void setManufacturerDB( ManufacturerDB* manufacturerdb ); | ||
34 | |||
31 | public slots: | 35 | public slots: |
32 | void addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ); | 36 | void addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ); |
37 | |||
38 | private: | ||
39 | ManufacturerDB* _manufacturerdb; | ||
33 | 40 | ||
34 | }; | 41 | }; |
35 | 42 | ||
36 | #endif | 43 | #endif |
37 | 44 | ||
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.cpp b/noncore/net/wellenreiter/gui/scanlistitem.cpp index f4b43a6..15aef0c 100644 --- a/noncore/net/wellenreiter/gui/scanlistitem.cpp +++ b/noncore/net/wellenreiter/gui/scanlistitem.cpp | |||
@@ -27,16 +27,19 @@ const int col_type = 0; | |||
27 | const int col_essid = 0; | 27 | const int col_essid = 0; |
28 | const int col_sig = 1; | 28 | const int col_sig = 1; |
29 | const int col_ap = 2; | 29 | const int col_ap = 2; |
30 | const int col_channel = 3; | 30 | const int col_channel = 3; |
31 | const int col_wep = 4; | 31 | const int col_wep = 4; |
32 | const int col_traffic = 5; | 32 | const int col_traffic = 5; |
33 | const int col_manuf = 6; | ||
33 | 34 | ||
34 | MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr, | 35 | MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr, |
35 | bool wep, int channel, int signal ) | 36 | bool wep, int channel, int signal ) |
36 | :QListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) | 37 | :QListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ), |
38 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), | ||
39 | _channel( channel ), _signal( signal ), _beacons( 0 ) | ||
37 | { | 40 | { |
38 | qDebug( "creating scanlist item" ); | 41 | qDebug( "creating scanlist item" ); |
39 | decorateItem( type, essid, macaddr, wep, channel, signal ); | 42 | decorateItem( type, essid, macaddr, wep, channel, signal ); |
40 | } | 43 | } |
41 | 44 | ||
42 | MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, | 45 | MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, |
@@ -74,6 +77,20 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, | |||
74 | listView()->triggerUpdate(); | 77 | listView()->triggerUpdate(); |
75 | 78 | ||
76 | this->type = type; | 79 | this->type = type; |
77 | 80 | ||
78 | } | 81 | } |
79 | 82 | ||
83 | void MScanListItem::setManufacturer( const QString& manufacturer ) | ||
84 | { | ||
85 | setText( col_manuf, manufacturer ); | ||
86 | } | ||
87 | |||
88 | void MScanListItem::receivedBeacon() | ||
89 | { | ||
90 | _beacons++; | ||
91 | #ifdef DEBUG | ||
92 | qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons ); | ||
93 | #endif | ||
94 | setText( col_sig, QString::number( _beacons ) ); | ||
95 | } | ||
96 | |||
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.h b/noncore/net/wellenreiter/gui/scanlistitem.h index 47a5a4e..c3c6255 100644 --- a/noncore/net/wellenreiter/gui/scanlistitem.h +++ b/noncore/net/wellenreiter/gui/scanlistitem.h | |||
@@ -54,24 +54,26 @@ class MScanListItem: public QListViewItem | |||
54 | //const QString& type() { return _type; }; | 54 | //const QString& type() { return _type; }; |
55 | const QString& essid() { return _essid; }; | 55 | const QString& essid() { return _essid; }; |
56 | const QString& macaddr() { return _macaddr; }; | 56 | const QString& macaddr() { return _macaddr; }; |
57 | bool wep() { return _wep; }; | 57 | bool wep() { return _wep; }; |
58 | int channel() { return _channel; }; | 58 | int channel() { return _channel; }; |
59 | int signal() { return _signal; }; | 59 | int signal() { return _signal; }; |
60 | int received() { return _received; }; | 60 | int beacons() { return _beacons; }; |
61 | 61 | ||
62 | void setSignal( int signal ) { /* TODO */ }; | 62 | void setSignal( int signal ) { /* TODO */ }; |
63 | void incReceived() { _received++; }; | 63 | void receivedBeacon(); |
64 | |||
65 | void setManufacturer( const QString& manufacturer ); | ||
64 | 66 | ||
65 | private: | 67 | private: |
66 | QString _type; | 68 | QString _type; |
67 | QString _essid; | 69 | QString _essid; |
68 | QString _macaddr; | 70 | QString _macaddr; |
69 | bool _wep; | 71 | bool _wep; |
70 | int _channel; | 72 | int _channel; |
71 | int _signal; | 73 | int _signal; |
72 | int _received; | 74 | int _beacons; |
73 | 75 | ||
74 | }; | 76 | }; |
75 | 77 | ||
76 | #endif | 78 | #endif |
77 | 79 | ||
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 | |||
@@ -21,12 +21,13 @@ | |||
21 | #include <qspinbox.h> | 21 | #include <qspinbox.h> |
22 | #include <qsocketnotifier.h> | 22 | #include <qsocketnotifier.h> |
23 | 23 | ||
24 | // Qtopia | 24 | // Qtopia |
25 | 25 | ||
26 | #ifdef QWS | 26 | #ifdef QWS |
27 | #include <qpe/qpeapplication.h> | ||
27 | #include <qpe/global.h> | 28 | #include <qpe/global.h> |
28 | #endif | 29 | #endif |
29 | 30 | ||
30 | // Opie | 31 | // Opie |
31 | 32 | ||
32 | #ifdef QWS | 33 | #ifdef QWS |
@@ -52,27 +53,28 @@ using namespace Opie; | |||
52 | #include "logwindow.h" | 53 | #include "logwindow.h" |
53 | #include "hexwindow.h" | 54 | #include "hexwindow.h" |
54 | #include "configwindow.h" | 55 | #include "configwindow.h" |
55 | 56 | ||
56 | #include "manufacturers.h" | 57 | #include "manufacturers.h" |
57 | 58 | ||
59 | #include <daemon/source/config.hh> | ||
60 | #include <libwellenreiter/source/wl_types.hh> | ||
58 | #include <libwellenreiter/source/wl_sock.hh> | 61 | #include <libwellenreiter/source/wl_sock.hh> |
59 | #include <libwellenreiter/source/wl_proto.hh> | 62 | #include <libwellenreiter/source/wl_proto.hh> |
60 | #include <daemon/source/config.hh> | ||
61 | 63 | ||
62 | Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) | 64 | Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) |
63 | : WellenreiterBase( parent, name, fl ), daemonRunning( false ) | 65 | : WellenreiterBase( parent, name, fl ), daemonRunning( false ), manufacturerdb( 0 ) |
64 | { | 66 | { |
65 | 67 | ||
66 | // | 68 | // |
67 | // construct manufacturer database | 69 | // construct manufacturer database |
68 | // | 70 | // |
69 | 71 | ||
70 | QString manufile; | 72 | QString manufile; |
71 | #ifdef QWS | 73 | #ifdef QWS |
72 | manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) qApp.qpeDir() ); | 74 | manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); |
73 | #else | 75 | #else |
74 | manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" ); | 76 | manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" ); |
75 | #endif | 77 | #endif |
76 | manufacturerdb = new ManufacturerDB( manufile ); | 78 | manufacturerdb = new ManufacturerDB( manufile ); |
77 | 79 | ||
78 | logwindow->log( "(i) Wellenreiter has been started." ); | 80 | logwindow->log( "(i) Wellenreiter has been started." ); |
@@ -89,13 +91,14 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) | |||
89 | #endif | 91 | #endif |
90 | 92 | ||
91 | // | 93 | // |
92 | // setup socket for daemon communication, register socket notifier | 94 | // setup socket for daemon communication, register socket notifier |
93 | // | 95 | // |
94 | 96 | ||
95 | daemon_fd = wl_setupsock( GUIADDR, GUIPORT ); | 97 | // struct sockaddr_in sockaddr; |
98 | daemon_fd = wl_setupsock( GUIADDR, GUIPORT, sockaddr ); | ||
96 | if ( daemon_fd == -1 ) | 99 | if ( daemon_fd == -1 ) |
97 | { | 100 | { |
98 | logwindow->log( "(E) Couldn't get file descriptor for commsocket." ); | 101 | logwindow->log( "(E) Couldn't get file descriptor for commsocket." ); |
99 | } | 102 | } |
100 | else | 103 | else |
101 | { | 104 | { |
@@ -108,12 +111,15 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) | |||
108 | 111 | ||
109 | // setup GUI | 112 | // setup GUI |
110 | 113 | ||
111 | connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); | 114 | connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); |
112 | button->setEnabled( false ); | 115 | button->setEnabled( false ); |
113 | netview->setColumnWidthMode( 1, QListView::Manual ); | 116 | netview->setColumnWidthMode( 1, QListView::Manual ); |
117 | |||
118 | if ( manufacturerdb ) | ||
119 | netview->setManufacturerDB( manufacturerdb ); | ||
114 | 120 | ||
115 | } | 121 | } |
116 | 122 | ||
117 | Wellenreiter::~Wellenreiter() | 123 | Wellenreiter::~Wellenreiter() |
118 | { | 124 | { |
119 | // no need to delete child widgets, Qt does it all for us | 125 | // no need to delete child widgets, Qt does it all for us |
@@ -124,23 +130,30 @@ Wellenreiter::~Wellenreiter() | |||
124 | void Wellenreiter::handleMessage() | 130 | void Wellenreiter::handleMessage() |
125 | { | 131 | { |
126 | // FIXME: receive message and handle it | 132 | // FIXME: receive message and handle it |
127 | 133 | ||
128 | qDebug( "received message from daemon." ); | 134 | qDebug( "received message from daemon." ); |
129 | 135 | ||
130 | char buffer[10000]; | 136 | /*char buffer[10000]; |
131 | memset( &buffer, 0, sizeof( buffer ) ); | 137 | memset( &buffer, 0, sizeof( buffer ) );*/ |
138 | |||
139 | char buffer[WL_SOCKBUF]; | ||
132 | 140 | ||
133 | // int result = #wl_recv( &daemon_fd, (char*) &buffer, sizeof(buffer) ); | 141 | // int result = #wl_recv( &daemon_fd, (char*) &buffer, sizeof(buffer) ); |
134 | 142 | ||
143 | /* | ||
144 | |||
135 | struct sockaddr from; | 145 | struct sockaddr from; |
136 | socklen_t len; | 146 | socklen_t len; |
137 | 147 | ||
138 | int result = recvfrom( daemon_fd, &buffer, 8192, MSG_WAITALL, &from, &len ); | 148 | int result = recvfrom( daemon_fd, &buffer, 8192, MSG_WAITALL, &from, &len ); |
139 | |||
140 | qDebug( "received %d from recv [%d bytes]", result, len ); | 149 | qDebug( "received %d from recv [%d bytes]", result, len ); |
150 | |||
151 | */ | ||
152 | |||
153 | int result = wl_recv( &daemon_fd, sockaddr, (char*) &buffer, WL_SOCKBUF ); | ||
141 | 154 | ||
142 | if ( result == -1 ) | 155 | if ( result == -1 ) |
143 | { | 156 | { |
144 | qDebug( "Warning: %s", strerror( errno ) ); | 157 | qDebug( "Warning: %s", strerror( errno ) ); |
145 | return; | 158 | return; |
146 | } | 159 | } |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index 9715983..0ddc72c 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h | |||
@@ -20,12 +20,28 @@ | |||
20 | 20 | ||
21 | #ifdef QWS | 21 | #ifdef QWS |
22 | #include <opie/odevice.h> | 22 | #include <opie/odevice.h> |
23 | using namespace Opie; | 23 | using namespace Opie; |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | // ugly... not here! | ||
27 | |||
28 | #include <assert.h> | ||
29 | #include <errno.h> | ||
30 | #include <unistd.h> | ||
31 | #include <string.h> | ||
32 | #include <sys/types.h> | ||
33 | #include <sys/socket.h> | ||
34 | #include <stdlib.h> | ||
35 | #include <fcntl.h> | ||
36 | #include <daemon/source/config.hh> | ||
37 | #include <libwellenreiter/source/wl_types.hh> | ||
38 | #include <libwellenreiter/source/wl_sock.hh> | ||
39 | #include <libwellenreiter/source/wl_proto.hh> | ||
40 | |||
41 | |||
26 | class QTimerEvent; | 42 | class QTimerEvent; |
27 | class QPixmap; | 43 | class QPixmap; |
28 | class ManufacturerDB; | 44 | class ManufacturerDB; |
29 | 45 | ||
30 | class Wellenreiter : public WellenreiterBase { | 46 | class Wellenreiter : public WellenreiterBase { |
31 | Q_OBJECT | 47 | Q_OBJECT |
@@ -48,12 +64,15 @@ private: | |||
48 | #ifdef QWS | 64 | #ifdef QWS |
49 | OSystem _system; // Opie Operating System identifier | 65 | OSystem _system; // Opie Operating System identifier |
50 | #endif | 66 | #endif |
51 | void handleMessage(); | 67 | void handleMessage(); |
52 | 68 | ||
53 | ManufacturerDB* manufacturerdb; | 69 | ManufacturerDB* manufacturerdb; |
70 | struct sockaddr_in sockaddr; | ||
54 | 71 | ||
55 | //void readConfig(); | 72 | //void readConfig(); |
56 | //void writeConfig(); | 73 | //void writeConfig(); |
57 | }; | 74 | }; |
58 | 75 | ||
76 | |||
77 | |||
59 | #endif | 78 | #endif |
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index d6b9891..a93c684 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |||
@@ -69,29 +69,13 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f | |||
69 | apLayout = new QVBoxLayout( ap ); | 69 | apLayout = new QVBoxLayout( ap ); |
70 | apLayout->setSpacing( 2 ); | 70 | apLayout->setSpacing( 2 ); |
71 | apLayout->setMargin( 2 ); | 71 | apLayout->setMargin( 2 ); |
72 | 72 | ||
73 | //--------- NETVIEW TAB -------------- | 73 | //--------- NETVIEW TAB -------------- |
74 | 74 | ||
75 | netview = new MScanListView( ap ); | 75 | netview = new MScanListView( ap ); |
76 | netview->addColumn( tr( "SSID" ) ); | ||
77 | netview->setColumnAlignment( 0, AlignLeft || AlignVCenter ); | ||
78 | netview->addColumn( tr( "Sig" ) ); | ||
79 | netview->setColumnAlignment( 1, AlignCenter ); | ||
80 | netview->addColumn( tr( "AP" ) ); | ||
81 | netview->setColumnAlignment( 2, AlignCenter ); | ||
82 | netview->addColumn( tr( "Chn" ) ); | ||
83 | netview->setColumnAlignment( 3, AlignCenter ); | ||
84 | netview->addColumn( tr( "W" ) ); | ||
85 | netview->setColumnAlignment( 4, AlignCenter ); | ||
86 | netview->addColumn( tr( "T" ) ); | ||
87 | netview->setColumnAlignment( 5, AlignCenter ); | ||
88 | |||
89 | netview->setFrameShape( QListView::StyledPanel ); | ||
90 | netview->setFrameShadow( QListView::Sunken ); | ||
91 | netview->setRootIsDecorated( TRUE ); | ||
92 | apLayout->addWidget( netview ); | 76 | apLayout->addWidget( netview ); |
93 | 77 | ||
94 | 78 | ||
95 | //--------- LOG TAB -------------- | 79 | //--------- LOG TAB -------------- |
96 | 80 | ||
97 | logwindow = new MLogWindow( TabWidget, "Log" ); | 81 | logwindow = new MLogWindow( TabWidget, "Log" ); |
diff --git a/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro b/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro index 9cf717e..8a6ed36 100644 --- a/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro +++ b/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro | |||
@@ -1,10 +1,10 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG = warn_on debug | 2 | CONFIG = warn_on debug |
3 | VERSION = 0.2 | 3 | VERSION = 0.2 |
4 | HEADERS = source/cardmode.hh source/wl_log.hh source/wl_proto.hh source/sniff.hh source/wl_sock.hh | 4 | HEADERS = source/cardmode.hh source/wl_log.hh source/wl_proto.hh source/sniff.hh source/wl_sock.hh source/wl_types.hh |
5 | SOURCES = source/cardmode.cc source/wl_log.cc source/wl_proto.cc source/sniff.cc source/wl_sock.cc | 5 | SOURCES = source/cardmode.cc source/wl_log.cc source/wl_proto.cc source/sniff.cc source/wl_sock.cc |
6 | 6 | ||
7 | LIBS = | 7 | LIBS = |
8 | TMAKE_CFLAGS += -D__UNIX__ | 8 | TMAKE_CFLAGS += -D__UNIX__ |
9 | 9 | ||
10 | DESTDIR = $(QTDIR)/lib | 10 | DESTDIR = $(QTDIR)/lib |