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
10 #ifndef FOLLOW_STREAM_DIALOG_H
11 #define FOLLOW_STREAM_DIALOG_H
23 #include "epan/follow.h"
25 #include "wireshark_dialog.h"
29 #include <QPushButton>
33 class FollowStreamDialog
;
36 class FollowStreamDialog
: public WiresharkDialog
41 explicit FollowStreamDialog(QWidget
&parent
, CaptureFile
&cf
, int proto_id
);
42 ~FollowStreamDialog();
44 void addCodecs(const QMap
<QString
, QTextCodec
*> &codecMap
);
45 bool follow(QString previous_filter
= QString(), bool use_stream_index
= false, unsigned stream_num
= 0, unsigned sub_stream_num
= 0);
48 bool eventFilter(QObject
*obj
, QEvent
*event
);
49 void keyPressEvent(QKeyEvent
*event
);
50 void captureFileClosed();
53 void cbCharsetCurrentIndexChanged(int idx
);
54 void deltaComboBoxCurrentIndexChanged(int idx
);
55 void cbDirectionsCurrentIndexChanged(int idx
);
57 void leFindReturnPressed();
63 void useRegexFind(bool use_regex
);
64 void findText(bool go_back
= true);
67 void fillHintLabel(int pkt
= 0);
68 void goToPacketForTextPos(int pkt
= 0);
70 void streamNumberSpinBoxValueChanged(int stream_num
);
71 void subStreamNumberSpinBoxValueChanged(int sub_stream_num
);
73 void buttonBoxRejected();
76 void updateFilter(QString filter
, bool force
);
77 void goToPacket(int packet_num
);
80 // Callback for register_tap_listener
81 static void resetStream(void *tapData
);
83 void removeStreamControls();
84 void resetStream(void);
85 void updateWidgets(bool follow_in_progress
);
86 void updateWidgets() { updateWidgets(false); } // Needed for WiresharkDialog?
87 void showBuffer(QByteArray
&buffer
, size_t nchars
, bool is_from_server
,
88 uint32_t packet_num
, nstime_t abs_ts
, uint32_t *global_pos
);
90 void readFollowStream();
93 void addText(QString text
, bool is_from_server
, uint32_t packet_num
, bool colorize
= true);
95 Ui::FollowStreamDialog
*ui
;
97 QPushButton
*b_filter_out_
;
99 QPushButton
*b_print_
;
100 QPushButton
*b_save_
;
101 QPushButton
*b_back_
;
103 follow_info_t follow_info_
;
104 register_follow_t
* follower_
;
105 QString previous_filter_
;
106 QString filter_out_filter_
;
107 QString output_filter_
;
108 int client_buffer_count_
;
109 int server_buffer_count_
;
110 int client_packet_count_
;
111 int server_packet_count_
;
112 uint32_t last_packet_
;
113 bool last_from_server_
;
117 bool use_regex_find_
;
121 int previous_sub_stream_num_
;
124 #endif // FOLLOW_STREAM_DIALOG_H