Wireshark  4.3.0
The Wireshark network protocol analyzer
extcap_options_dialog.h
Go to the documentation of this file.
1 
11 #ifndef EXTCAP_OPTIONS_DIALOG_H
12 #define EXTCAP_OPTIONS_DIALOG_H
13 
14 #include <config.h>
15 
16 #include <QWidget>
17 #include <QDialog>
18 #include <QPushButton>
19 #include <QList>
20 
21 #include "ui/qt/extcap_argument.h"
22 
23 #include <extcap.h>
24 #include <extcap_parser.h>
25 
26 namespace Ui {
28 }
29 
30 typedef QList<ExtcapArgument *> ExtcapArgumentList;
31 
32 class ExtcapOptionsDialog : public QDialog
33 {
34  Q_OBJECT
35 
36 public:
38  static ExtcapOptionsDialog * createForDevice(QString &device_name, bool startCaptureOnClose, QWidget *parent = 0);
39 
40  ExtcapValueList loadValuesFor(int argNum, QString call, QString parent = "");
41 
42 private Q_SLOTS:
43  void on_buttonBox_clicked(QAbstractButton *button);
44  void on_buttonBox_helpRequested();
45  void updateWidgets();
46  void anyValueChanged();
47 
48 private:
49  explicit ExtcapOptionsDialog(bool startCaptureOnClose, QWidget *parent = 0);
50 
51  Ui::ExtcapOptionsDialog *ui;
52  QString device_name;
53  unsigned device_idx;
54  QIcon defaultValueIcon_;
55 
56  ExtcapArgumentList extcapArguments;
57 
58  void loadArguments();
59 
60  bool saveOptionToCaptureInfo();
61  GHashTable * getArgumentSettings(bool useCallsAsKey = false, bool includeEmptyValues = true);
62  void storeValues();
63  void resetValues();
64 
65 };
66 
67 #endif // EXTCAP_OPTIONS_DIALOG_H
Definition: extcap_options_dialog.h:33