summaryrefslogtreecommitdiffstats
path: root/wifi/interface_wireless_wirelessextensions.h
blob: b5e9782d52758f5eb9fde6116dbfcdd092cc82d0 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
/***************************************************************************
                          interface_wireless_wirelessextensions.h  -  description
                             -------------------
    begin                : Mon Aug 19 2002
    copyright            : (C) 2002 by Stefan Winter
    email                : mail@stefan-winter.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef INTERFACE_WIRELESS_WIRELESSEXTENSIONS_H
#define INTERFACE_WIRELESS_WIRELESSEXTENSIONS_H

#include "config.h"

#include <tqstring.h>
#include <tqtable.h>

#ifndef WITHOUT_ARTS
#include <arts/iomanager.h>
#include <arts/dispatcher.h>
#endif

#include "interface_wireless.h"

class QTable;
class KProcIO;

extern "C"
{
#include <iwlib.h>
}

class Interface_wireless_wirelessextensions:public Interface_wireless
{
Q_OBJECT public:
  Interface_wireless_wirelessextensions (TQStringList * ignoreInterfaces);
  TQTable* get_available_networks ();

public:
  void setActiveDevice( TQString device );

public slots:  
  bool poll_device_info ();

private:
  bool isSocketOpen();
  void setNoActiveDevice( );
  TQStringList available_wifi_devices();
  bool autodetect_device();

  TQString print_scanning_token (struct iw_event *event);
  int get_info (int skfd, const TQString& interface, struct wireless_info& info);
  TQTable* networks;
private slots:
  void parseScanData ( KProcIO * iwlist );
};

#endif /*  INTERFACE_WIRELESS_WIRELESSEXTENSIONS_H */