2009-09-08 15:28:41 +02:00
|
|
|
/*
|
|
|
|
* wpa_gui - Peers class
|
2010-07-18 23:30:26 +02:00
|
|
|
* Copyright (c) 2009-2010, Atheros Communications
|
2009-09-08 15:28:41 +02:00
|
|
|
*
|
2012-02-11 15:31:36 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2009-09-08 15:28:41 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PEERS_H
|
|
|
|
#define PEERS_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QStandardItemModel>
|
2009-09-29 22:16:21 +02:00
|
|
|
#include "wpamsg.h"
|
2009-09-08 15:28:41 +02:00
|
|
|
#include "ui_peers.h"
|
|
|
|
|
|
|
|
class WpaGui;
|
|
|
|
|
|
|
|
class Peers : public QDialog, public Ui::Peers
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
Peers(QWidget *parent = 0, const char *name = 0,
|
2015-05-08 23:01:01 +02:00
|
|
|
bool modal = false, Qt::WindowFlags fl = 0);
|
2009-09-08 15:28:41 +02:00
|
|
|
~Peers();
|
|
|
|
void setWpaGui(WpaGui *_wpagui);
|
2009-09-29 22:16:21 +02:00
|
|
|
void event_notify(WpaMsg msg);
|
2009-09-08 15:28:41 +02:00
|
|
|
|
|
|
|
public slots:
|
2009-09-10 13:43:08 +02:00
|
|
|
virtual void context_menu(const QPoint &pos);
|
|
|
|
virtual void enter_pin();
|
2009-11-21 16:06:41 +01:00
|
|
|
virtual void connect_pbc();
|
2009-11-21 17:26:21 +01:00
|
|
|
virtual void learn_ap_config();
|
2009-09-10 13:43:08 +02:00
|
|
|
virtual void ctx_refresh();
|
2010-07-18 23:30:26 +02:00
|
|
|
virtual void ctx_p2p_start();
|
|
|
|
virtual void ctx_p2p_stop();
|
|
|
|
virtual void ctx_p2p_listen();
|
|
|
|
virtual void ctx_p2p_start_group();
|
|
|
|
virtual void ctx_p2p_remove_group();
|
|
|
|
virtual void ctx_p2p_connect();
|
|
|
|
virtual void ctx_p2p_req_pin();
|
|
|
|
virtual void ctx_p2p_show_pin();
|
|
|
|
virtual void ctx_p2p_display_pin();
|
|
|
|
virtual void ctx_p2p_display_pin_pd();
|
|
|
|
virtual void ctx_p2p_enter_pin();
|
2009-11-21 14:01:23 +01:00
|
|
|
virtual void properties();
|
2010-07-18 23:30:26 +02:00
|
|
|
virtual void ctx_hide_ap();
|
|
|
|
virtual void ctx_show_ap();
|
|
|
|
virtual void ctx_p2p_show_passphrase();
|
|
|
|
virtual void ctx_p2p_start_persistent();
|
|
|
|
virtual void ctx_p2p_invite();
|
|
|
|
virtual void ctx_p2p_delete();
|
2009-09-08 15:28:41 +02:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual void languageChange();
|
2009-11-19 19:28:41 +01:00
|
|
|
virtual void closeEvent(QCloseEvent *event);
|
2009-09-08 15:28:41 +02:00
|
|
|
|
|
|
|
private:
|
2009-10-16 16:53:02 +02:00
|
|
|
void add_station(QString info);
|
2009-09-11 17:37:16 +02:00
|
|
|
void add_stations();
|
2009-10-16 16:53:02 +02:00
|
|
|
void add_single_station(const char *addr);
|
2010-01-25 03:42:45 +01:00
|
|
|
bool add_bss(const char *cmd);
|
2009-12-30 21:18:18 +01:00
|
|
|
void remove_bss(int id);
|
2009-09-11 17:37:16 +02:00
|
|
|
void add_scan_results();
|
2010-07-18 23:30:26 +02:00
|
|
|
void add_persistent(int id, const char *ssid, const char *bssid);
|
|
|
|
void add_persistent_groups();
|
2009-09-08 15:28:41 +02:00
|
|
|
void update_peers();
|
2009-09-29 22:16:21 +02:00
|
|
|
QStandardItem * find_addr(QString addr);
|
2010-07-18 23:30:26 +02:00
|
|
|
QStandardItem * find_addr_type(QString addr, int type);
|
|
|
|
void add_p2p_group_client(QStandardItem *parent, QString params);
|
2009-11-19 19:28:41 +01:00
|
|
|
QStandardItem * find_uuid(QString uuid);
|
|
|
|
void done(int r);
|
|
|
|
void remove_enrollee_uuid(QString uuid);
|
2009-11-21 14:01:23 +01:00
|
|
|
QString ItemType(int type);
|
2010-07-18 23:30:26 +02:00
|
|
|
void enable_persistent(int id);
|
2009-09-08 15:28:41 +02:00
|
|
|
|
|
|
|
WpaGui *wpagui;
|
|
|
|
QStandardItemModel model;
|
|
|
|
QIcon *default_icon;
|
2009-11-19 20:03:25 +01:00
|
|
|
QIcon *ap_icon;
|
|
|
|
QIcon *laptop_icon;
|
2010-07-18 23:30:26 +02:00
|
|
|
QIcon *group_icon;
|
|
|
|
QIcon *invitation_icon;
|
2009-09-10 13:43:08 +02:00
|
|
|
QStandardItem *ctx_item;
|
2010-07-18 23:30:26 +02:00
|
|
|
|
|
|
|
bool hide_ap;
|
2009-09-08 15:28:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* PEERS_H */
|