Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / bluetooth_device_dialog.h
bloba0b408f08cfaca5a692006dcf9e704dbf789d338
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef BLUETOOTH_DEVICE_DIALOG_H
11 #define BLUETOOTH_DEVICE_DIALOG_H
13 #include "config.h"
15 #include "wireshark_dialog.h"
16 #include "cfile.h"
18 #include "epan/tap.h"
20 #include "epan/dissectors/packet-bluetooth.h"
22 #include <QMenu>
23 #include <QTableWidget>
25 class QAbstractButton;
26 class QPushButton;
27 class QTreeWidgetItem;
29 typedef struct _bluetooth_device_tapinfo_t {
30 tap_reset_cb tap_reset;
31 tap_packet_cb tap_packet;
32 QString bdAddr;
33 uint32_t interface_id;
34 uint32_t adapter_id;
35 bool is_local;
36 void *ui;
37 unsigned *changes;
38 } bluetooth_device_tapinfo_t;
40 typedef struct _bluetooth_item_data_t {
41 uint32_t interface_id;
42 uint32_t adapter_id;
43 uint32_t frame_number;
44 int changes;
45 } bluetooth_item_data_t;
47 namespace Ui {
48 class BluetoothDeviceDialog;
51 class BluetoothDeviceDialog : public WiresharkDialog
53 Q_OBJECT
55 public:
56 explicit BluetoothDeviceDialog(QWidget &parent, CaptureFile &cf, QString bdAddr, QString name, uint32_t interface_id, uint32_t adapter_id, bool is_local);
57 ~BluetoothDeviceDialog();
59 public slots:
61 signals:
62 void updateFilter(QString &filter, bool force = false);
63 void captureFileChanged(capture_file *cf);
64 void goToPacket(int packet_num);
66 protected:
67 void keyPressEvent(QKeyEvent *event);
68 void captureFileClosing();
70 protected slots:
71 void changeEvent(QEvent* event);
73 private:
74 Ui::BluetoothDeviceDialog *ui;
76 bluetooth_device_tapinfo_t tapinfo_;
77 QMenu context_menu_;
78 unsigned changes_;
80 static void tapReset(void *tapinfo_ptr);
81 static tap_packet_status tapPacket(void *tapinfo_ptr, packet_info *pinfo, epan_dissect_t *, const void *data, tap_flags_t flags);
82 static void updateChanges(QTableWidget *tableWidget, QString value, const int row, unsigned *changes, packet_info *pinfo);
83 static void saveItemData(QTableWidgetItem *item, bluetooth_device_tap_t *tap_device, packet_info *pinfo);
85 private slots:
86 void setTitle(QString bdAddr, QString name);
87 void on_tableWidget_itemActivated(QTableWidgetItem *item);
88 void on_buttonBox_clicked(QAbstractButton *button);
89 void on_actionMark_Unmark_Cell_triggered();
90 void on_actionMark_Unmark_Row_triggered();
91 void on_actionCopy_Cell_triggered();
92 void on_actionCopy_Rows_triggered();
93 void on_actionCopy_All_triggered();
94 void on_actionSave_as_image_triggered();
95 void tableContextMenu(const QPoint &pos);
96 void interfaceCurrentIndexChanged(int index);
97 void showInformationStepsChanged(int state);
100 #endif // BLUETOOTH_DEVICE_DIALOG_H