summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan/wlanimp2.h
blob: 0e8d53377213c7fe8e6b75dd5f17927c5b9cf833 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef WLANIMP_H
#define WLANIMP_H

#include "wlan.h"
#include "interfaces.h"
#include <qstringlist.h>
#include <opie2/onetutils.h>

class InterfaceSetupImp;
class Interface;
class Config;
namespace Opie {namespace Net {class OPacket;}}
class QListViewItem;

const int col_mode= 0;
const int col_ssid = 1;
const int col_chn = 2;
const int col_mac = 3;

class WLANImp : public WLAN {
  Q_OBJECT

public:
  WLANImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = FALSE, WFlags fl = 0 );
  ~WLANImp();
  void setProfile(const QString &profile);

public slots:
  void rescanNeighbourhood();
  void selectNetwork( QListViewItem* );

protected:
  void accept();

private:
  void parseOpts();
  void writeOpts();

  void parseKeyStr(QString keystr);
  QString formatKey(QString input);
  
  void handlePacket( Opie::Net::OPacket* );
  void displayFoundNetwork( const QString& mode, int channel, const QString& ssid, const Opie::Net::OMacAddress& mac );

  InterfaceSetupImp *interfaceSetup;
  Interfaces *interfaces;
  Interface  *interface;

  QString currentProfile;
};

#endif