2014-04-29 15:10:27 +00:00
|
|
|
/* conversation_dialog.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONVERSATION_DIALOG_H
|
|
|
|
#define CONVERSATION_DIALOG_H
|
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
#include "traffic_table_dialog.h"
|
2014-04-29 15:10:27 +00:00
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
Q_DECLARE_METATYPE(conv_item_t *)
|
2014-04-29 15:10:27 +00:00
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
class ConversationTreeWidget : public TrafficTableTreeWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit ConversationTreeWidget(QWidget *parent, register_ct_t* table);
|
|
|
|
~ConversationTreeWidget();
|
2014-04-29 15:10:27 +00:00
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
static void tapReset(void *conv_hash_ptr);
|
|
|
|
static void tapDraw(void *conv_hash_ptr);
|
2016-08-30 19:12:33 +00:00
|
|
|
double minRelStartTime() { return min_rel_start_time_; }
|
|
|
|
double maxRelStopTime() { return max_rel_stop_time_; }
|
2014-04-29 15:10:27 +00:00
|
|
|
|
2016-09-01 20:51:13 +00:00
|
|
|
public slots:
|
|
|
|
void updateStartTime(bool absolute);
|
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
private:
|
|
|
|
void initDirectionMap();
|
2016-06-23 20:10:52 +00:00
|
|
|
void updateItems();
|
2016-08-30 19:12:33 +00:00
|
|
|
double min_rel_start_time_; // seconds
|
|
|
|
double max_rel_stop_time_; // seconds
|
2014-04-29 15:10:27 +00:00
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
private slots:
|
|
|
|
void filterActionTriggered();
|
|
|
|
};
|
2014-04-29 15:10:27 +00:00
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
class ConversationDialog : public TrafficTableDialog
|
2014-04-29 15:10:27 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2014-07-23 17:38:55 +00:00
|
|
|
/** Create a new conversation window.
|
|
|
|
*
|
|
|
|
* @param parent Parent widget.
|
|
|
|
* @param cf Capture file. No statistics will be calculated if this is NULL.
|
2014-11-08 17:03:23 +00:00
|
|
|
* @param cli_proto_id If valid, add this protocol and bring it to the front.
|
2014-07-23 17:38:55 +00:00
|
|
|
* @param filter Display filter to apply.
|
|
|
|
*/
|
2014-12-22 23:51:36 +00:00
|
|
|
explicit ConversationDialog(QWidget &parent, CaptureFile &cf, int cli_proto_id = -1, const char *filter = NULL);
|
2014-04-29 15:10:27 +00:00
|
|
|
~ConversationDialog();
|
|
|
|
|
|
|
|
public slots:
|
2014-12-21 21:23:02 +00:00
|
|
|
void captureFileClosing();
|
2014-04-29 15:10:27 +00:00
|
|
|
|
|
|
|
signals:
|
2016-06-22 19:44:02 +00:00
|
|
|
void filterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
|
2014-04-29 15:10:27 +00:00
|
|
|
void openFollowStreamDialog(follow_type_t type);
|
|
|
|
void openTcpStreamGraph(int graph_type);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPushButton *follow_bt_;
|
|
|
|
QPushButton *graph_bt_;
|
|
|
|
|
2014-08-06 17:07:42 +00:00
|
|
|
bool addTrafficTable(register_ct_t* table);
|
2014-04-29 15:10:27 +00:00
|
|
|
conv_item_t *currentConversation();
|
|
|
|
|
|
|
|
private slots:
|
2016-06-23 20:10:52 +00:00
|
|
|
void currentTabChanged();
|
2014-04-29 15:10:27 +00:00
|
|
|
void on_displayFilterCheckBox_toggled(bool checked);
|
|
|
|
void followStream();
|
|
|
|
void graphTcp();
|
|
|
|
void on_buttonBox_helpRequested();
|
|
|
|
};
|
|
|
|
|
2014-07-23 17:38:55 +00:00
|
|
|
void init_conversation_table(struct register_ct* ct, const char *filter);
|
|
|
|
|
2014-04-29 15:10:27 +00:00
|
|
|
#endif // CONVERSATION_DIALOG_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|