2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2015-04-28 08:26:46 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2015-04-28 08:26:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef EXTCAP_OPTIONS_DIALOG_H
|
|
|
|
#define EXTCAP_OPTIONS_DIALOG_H
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QList>
|
|
|
|
|
|
|
|
#include "ui/qt/extcap_argument.h"
|
|
|
|
|
|
|
|
#include <extcap.h>
|
|
|
|
#include <extcap_parser.h>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ExtcapOptionsDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef QList<ExtcapArgument *> ExtcapArgumentList;
|
|
|
|
|
|
|
|
class ExtcapOptionsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
~ExtcapOptionsDialog();
|
2022-01-06 07:02:11 +00:00
|
|
|
static ExtcapOptionsDialog * createForDevice(QString &device_name, bool startCaptureOnClose, QWidget *parent = 0);
|
2015-04-28 08:26:46 +00:00
|
|
|
|
2018-03-02 14:41:00 +00:00
|
|
|
ExtcapValueList loadValuesFor(int argNum, QString call, QString parent = "");
|
|
|
|
|
2015-12-29 13:50:55 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void on_buttonBox_accepted();
|
2015-04-28 08:26:46 +00:00
|
|
|
void on_buttonBox_rejected();
|
2015-12-29 06:57:36 +00:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
2015-04-28 08:26:46 +00:00
|
|
|
void on_buttonBox_helpRequested();
|
|
|
|
void updateWidgets();
|
2015-12-29 13:50:55 +00:00
|
|
|
void anyValueChanged();
|
2015-04-28 08:26:46 +00:00
|
|
|
|
|
|
|
private:
|
2022-01-06 07:02:11 +00:00
|
|
|
explicit ExtcapOptionsDialog(bool startCaptureOnClose, QWidget *parent = 0);
|
2015-04-28 08:26:46 +00:00
|
|
|
|
|
|
|
Ui::ExtcapOptionsDialog *ui;
|
|
|
|
QString device_name;
|
|
|
|
guint device_idx;
|
2022-01-06 03:48:27 +00:00
|
|
|
QIcon defaultValueIcon_;
|
2015-04-28 08:26:46 +00:00
|
|
|
|
|
|
|
ExtcapArgumentList extcapArguments;
|
|
|
|
|
2015-12-29 06:57:36 +00:00
|
|
|
void loadArguments();
|
|
|
|
|
2015-12-29 13:50:55 +00:00
|
|
|
bool saveOptionToCaptureInfo();
|
2019-04-24 16:02:27 +00:00
|
|
|
GHashTable * getArgumentSettings(bool useCallsAsKey = false, bool includeEmptyValues = true);
|
2015-12-29 06:57:36 +00:00
|
|
|
void storeValues();
|
2015-12-29 06:57:36 +00:00
|
|
|
void resetValues();
|
2018-03-02 14:41:00 +00:00
|
|
|
|
2015-04-28 08:26:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EXTCAP_OPTIONS_DIALOG_H
|