wpa_gui: Add peer dialog option for WPS PBC
[libeap.git] / wpa_supplicant / wpa_gui-qt4 / peers.h
1 /*
2  * wpa_gui - Peers class
3  * Copyright (c) 2009, Atheros Communications
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * Alternatively, this software may be distributed under the terms of BSD
10  * license.
11  *
12  * See README and COPYING for more details.
13  */
14
15 #ifndef PEERS_H
16 #define PEERS_H
17
18 #include <QObject>
19 #include <QStandardItemModel>
20 #include "wpamsg.h"
21 #include "ui_peers.h"
22
23 class WpaGui;
24
25 class Peers : public QDialog, public Ui::Peers
26 {
27         Q_OBJECT
28
29 public:
30         Peers(QWidget *parent = 0, const char *name = 0,
31                     bool modal = false, Qt::WFlags fl = 0);
32         ~Peers();
33         void setWpaGui(WpaGui *_wpagui);
34         void event_notify(WpaMsg msg);
35
36 public slots:
37         virtual void context_menu(const QPoint &pos);
38         virtual void enter_pin();
39         virtual void connect_pbc();
40         virtual void ctx_refresh();
41         virtual void properties();
42
43 protected slots:
44         virtual void languageChange();
45         virtual void closeEvent(QCloseEvent *event);
46
47 private:
48         void add_station(QString info);
49         void add_stations();
50         void add_single_station(const char *addr);
51         void add_scan_results();
52         void update_peers();
53         QStandardItem * find_addr(QString addr);
54         QStandardItem * find_uuid(QString uuid);
55         void done(int r);
56         void remove_enrollee_uuid(QString uuid);
57         QString ItemType(int type);
58
59         WpaGui *wpagui;
60         QStandardItemModel model;
61         QIcon *default_icon;
62         QIcon *ap_icon;
63         QIcon *laptop_icon;
64         QStandardItem *ctx_item;
65 };
66
67 #endif /* PEERS_H */