Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rtp_stream_dialog.h
Go to the documentation of this file.
1
10#ifndef RTP_STREAM_DIALOG_H
11#define RTP_STREAM_DIALOG_H
12
13#include "wireshark_dialog.h"
14
15#include <mutex>
16
17#include "ui/rtp_stream.h"
18#include "rtp_player_dialog.h"
19
20#include <QToolButton>
21#include <QMenu>
22
23namespace Ui {
24class RtpStreamDialog;
25}
26
27// Singleton by https://refactoring.guru/design-patterns/singleton/cpp/example#example-1
29{
30 Q_OBJECT
31
32public:
36 static RtpStreamDialog *openRtpStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list);
37
42 void operator=(const RtpStreamDialog &) = delete;
43
44 // Caller must provide ids which are immutable to recap
45 void selectRtpStream(QVector<rtpstream_id_t *> stream_ids);
46 // Caller must provide ids which are immutable to recap
47 void deselectRtpStream(QVector<rtpstream_id_t *> stream_ids);
48
49signals:
50 // Tells the packet list to redraw. An alternative might be to add a
51 // cf_packet_marked callback to file.[ch] but that's synchronous and
52 // might incur too much overhead.
53 void packetsMarked();
54 void updateFilter(QString filter, bool force = false);
55 void goToPacket(int packet_num);
56 void rtpPlayerDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_ids);
57 void rtpPlayerDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_ids);
58 void rtpPlayerDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_ids);
59 void rtpAnalysisDialogReplaceRtpStreams(QVector<rtpstream_id_t *> stream_infos);
60 void rtpAnalysisDialogAddRtpStreams(QVector<rtpstream_id_t *> stream_infos);
61 void rtpAnalysisDialogRemoveRtpStreams(QVector<rtpstream_id_t *> stream_infos);
62
63public slots:
64 void rtpPlayerReplace();
65 void rtpPlayerAdd();
66 void rtpPlayerRemove();
67 void rtpAnalysisReplace();
68 void rtpAnalysisAdd();
69 void rtpAnalysisRemove();
70
71protected:
72 explicit RtpStreamDialog(QWidget &parent, CaptureFile &cf);
74
75 bool eventFilter(QObject *obj, QEvent *event);
76 void captureFileClosing();
77 void captureFileClosed();
78
79private:
80 static RtpStreamDialog *pinstance_;
81 static std::mutex mutex_;
82
83 Ui::RtpStreamDialog *ui;
84 rtpstream_tapinfo_t tapinfo_;
85 QToolButton *find_reverse_button_;
86 QPushButton *prepare_button_;
87 QPushButton *export_button_;
88 QPushButton *copy_button_;
89 QToolButton *analyze_button_;
90 QToolButton *player_button_;
91 QMenu ctx_menu_;
92 bool need_redraw_;
93 QList<rtpstream_id_t> last_selected_;
94
95 static void tapReset(rtpstream_tapinfo_t *tapinfo);
96 static void tapDraw(rtpstream_tapinfo_t *tapinfo);
97 static void tapMarkPacket(rtpstream_tapinfo_t *tapinfo, frame_data *fd);
98
99 void updateStreams();
100 void updateWidgets();
101 void showPlayer();
102
103 void setRtpStreamSelection(rtpstream_id_t *id, bool state);
104
105 QList<QVariant> streamRowData(int row) const;
106 void freeLastSelected();
107 void invertSelection();
108 QVector<rtpstream_id_t *>getSelectedRtpIds();
109
110private slots:
111 void showStreamMenu(QPoint pos);
112 void on_actionCopyAsCsv_triggered();
113 void on_actionCopyAsYaml_triggered();
114 void on_actionFindReverseNormal_triggered();
115 void on_actionFindReversePair_triggered();
116 void on_actionFindReverseSingle_triggered();
117 void on_actionGoToSetup_triggered();
118 void on_actionMarkPackets_triggered();
119 void on_actionPrepareFilter_triggered();
120 void on_streamTreeWidget_itemSelectionChanged();
121 void on_buttonBox_helpRequested();
122 void on_actionExportAsRtpDump_triggered();
123 void captureEvent(CaptureEvent e);
124 void displayFilterCheckBoxToggled(bool checked);
125 void on_todCheckBox_toggled(bool checked);
126 void on_actionSelectAll_triggered();
127 void on_actionSelectInvert_triggered();
128 void on_actionSelectNone_triggered();
129 void on_actionAnalyze_triggered();
130};
131
132#endif // RTP_STREAM_DIALOG_H
Definition capture_event.h:21
Definition capture_file.h:21
Definition rtp_player_dialog.h:66
Definition rtp_stream_dialog.h:29
void captureFileClosed()
Called when the capture file was closed. This can be used to enable or disable widgets according to t...
Definition rtp_stream_dialog.cpp:728
static RtpStreamDialog * openRtpStreamDialog(QWidget &parent, CaptureFile &cf, QObject *packet_list)
Definition rtp_stream_dialog.cpp:306
void captureFileClosing()
Called when the capture file is about to close. This can be used to disconnect taps and similar actio...
Definition rtp_stream_dialog.cpp:721
RtpStreamDialog(RtpStreamDialog &other)=delete
Definition rtp_stream_id.h:33
Definition rtp_stream.h:87