Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / ui / qt / follow_stream_dialog.h
blob859c05346f296f5c9bd7bc258fca4cc902244c79
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 FOLLOW_STREAM_DIALOG_H
11 #define FOLLOW_STREAM_DIALOG_H
13 #include <config.h>
15 #include <stdio.h>
17 #ifdef HAVE_UNISTD_H
18 #include <unistd.h>
19 #endif
21 #include "file.h"
23 #include "epan/follow.h"
25 #include "wireshark_dialog.h"
27 #include <QFile>
28 #include <QMap>
29 #include <QPushButton>
30 #include <QTextCodec>
32 namespace Ui {
33 class FollowStreamDialog;
36 class FollowStreamDialog : public WiresharkDialog
38 Q_OBJECT
40 public:
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);
47 protected:
48 bool eventFilter(QObject *obj, QEvent *event);
49 void keyPressEvent(QKeyEvent *event);
50 void captureFileClosed();
52 private slots:
53 void cbCharsetCurrentIndexChanged(int idx);
54 void deltaComboBoxCurrentIndexChanged(int idx);
55 void cbDirectionsCurrentIndexChanged(int idx);
56 void bFindClicked();
57 void leFindReturnPressed();
59 void helpButton();
60 void backButton();
61 void close();
62 void filterOut();
63 void useRegexFind(bool use_regex);
64 void findText(bool go_back = true);
65 void saveAs();
66 void printStream();
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();
75 signals:
76 void updateFilter(QString filter, bool force);
77 void goToPacket(int packet_num);
79 private:
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);
89 void readStream();
90 void readFollowStream();
92 void followStream();
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_;
98 QPushButton *b_find_;
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_;
114 nstime_t last_ts_;
115 int turns_;
117 bool use_regex_find_;
119 bool terminating_;
121 int previous_sub_stream_num_;
124 #endif // FOLLOW_STREAM_DIALOG_H