Qt: More #include → forward declarations.

Change-Id: Ib6de71f801cd3053374b6c867370acd594dcd396
Reviewed-on: https://code.wireshark.org/review/7089
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-02-12 15:35:59 -08:00
parent a5652c7257
commit 6e88978fd9
27 changed files with 150 additions and 106 deletions

View File

@ -24,11 +24,16 @@
#include "config.h"
#include <errno.h>
#include <glib.h>
#include "color.h"
#include "color_filters.h"
#include "epan/dfilter/dfilter.h"
#include "epan/prefs.h"
#include "ui/utf8_entities.h"
#include "wsutil/filesystem.h"

View File

@ -21,6 +21,8 @@
#include "interface_tree.h"
#include "epan/prefs.h"
#ifdef HAVE_LIBPCAP
#include "ui/capture_globals.h"
#endif

View File

@ -22,6 +22,8 @@
#include "io_graph_dialog.h"
#include "ui_io_graph_dialog.h"
#include "file.h"
#include <epan/stat_tap_ui.h>
#include "epan/stats_tree_priv.h"
#include "epan/uat-int.h"
@ -31,6 +33,8 @@
#include "qt_ui_utils.h"
#include "tango_colors.h"
#include "qcustomplot.h"
#include "syntax_line_edit.h"
#include "wireshark_application.h"
#include <QClipboard>

View File

@ -26,19 +26,14 @@
#include <glib.h>
#include <file.h>
#include "epan/epan_dissect.h"
#include "epan/uat.h"
#include "ui/io_graph_item.h"
#include "syntax_line_edit.h"
#include "wireshark_dialog.h"
#include <QIcon>
#include <QMenu>
#include "qcustomplot.h"
class QComboBox;
class QLineEdit;
@ -46,6 +41,13 @@ class QRubberBand;
class QTimer;
class QTreeWidgetItem;
class SyntaxLineEdit;
class QCPBars;
class QCPGraph;
class QCPItemTracer;
class QCustomPlot;
// GTK+ sets this to 100000 (NUM_IO_ITEMS)
const int max_io_items_ = 250000;

View File

@ -25,6 +25,9 @@
#include "lbm_uimflow_dialog.h"
#include "ui_lbm_uimflow_dialog.h"
#include "file.h"
#include <epan/dissectors/packet-lbm.h>
#include <epan/packet_info.h>
#include <epan/tap.h>
@ -35,6 +38,7 @@
#include "ui/utf8_entities.h"
#include "qt_ui_utils.h"
#include "sequence_diagram.h"
#include "wireshark_application.h"
#include <QDir>

View File

@ -32,6 +32,8 @@
#include "epan/packet.h"
#include "ui/tap-sequence-analysis.h"
#include "sequence_diagram.h"
#include <QDialog>

View File

@ -23,6 +23,10 @@
#include <glib.h>
#include "file.h"
#include "capchild/capture_session.h"
#include "epan/expert.h"
#include "wsutil/filesystem.h"
@ -39,7 +43,6 @@
#include "tango_colors.h"
// XXX - The GTK+ code assigns priorities to these and pushes/pops accordingly.
enum StatusContext {
@ -222,7 +225,7 @@ void MainStatusBar::expertUpdate() {
expert_status_.show();
}
void MainStatusBar::setCaptureFile(capture_file *cf)
void MainStatusBar::setCaptureFile(_capture_file *cf)
{
cap_file_ = cf;
comment_label_.setEnabled(cap_file_ != NULL);
@ -313,7 +316,7 @@ void MainStatusBar::popProfileStatus() {
profile_status_.popText(STATUS_CTX_MAIN);
}
void MainStatusBar::updateCaptureStatistics(capture_session *cap_session _U_)
void MainStatusBar::updateCaptureStatistics(struct _capture_session *cap_session)
{
QString packets_str;

View File

@ -30,7 +30,8 @@
#include <QMenu>
#include <QStatusBar>
#include "cfile.h"
struct _capture_session;
struct _capture_file;
class MainStatusBar : public QStatusBar
{
@ -48,7 +49,7 @@ private:
ProgressBar progress_bar_;
LabelStack packet_status_;
LabelStack profile_status_;
capture_file *cap_file_;
struct _capture_file *cap_file_;
QMenu profile_menu_;
QMenu ctx_menu_;
QAction *edit_action_;
@ -59,7 +60,7 @@ signals:
public slots:
void setCaptureFile(capture_file *cf);
void setCaptureFile(struct _capture_file *cf);
void pushTemporaryStatus(QString &message);
void popTemporaryStatus();
void pushFileStatus(QString &message);
@ -71,7 +72,7 @@ public slots:
void pushFilterStatus(QString &message);
void popFilterStatus();
void pushProfileName();
void updateCaptureStatistics(capture_session * cap_session);
void updateCaptureStatistics(struct _capture_session * cap_session);
private slots:
void pushPacketStatus(QString &message);

View File

@ -22,6 +22,8 @@
#include "packet_dialog.h"
#include "ui_packet_dialog.h"
#include "file.h"
#include "epan/column.h"
#include "epan/ftypes/ftypes.h"

View File

@ -23,6 +23,8 @@
#include <glib.h>
#include "file.h"
#include <epan/epan.h>
#include <epan/epan_dissect.h>

View File

@ -22,6 +22,8 @@
#include "protocol_hierarchy_dialog.h"
#include "ui_protocol_hierarchy_dialog.h"
#include "cfile.h"
#include "ui/proto_hier_stats.h"
#include "ui/utf8_entities.h"

View File

@ -19,16 +19,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "qt_ui_utils.h"
#include <ui/recent.h>
#include <ui/ui_util.h>
#include <epan/addr_resolv.h>
#include <epan/to_str.h>
#include <epan/value_string.h>
#include <ui/recent.h>
#include <ui/ui_util.h>
#include <wsutil/str_util.h>

View File

@ -29,17 +29,14 @@
* Utility functions for working with the Wireshark and GLib APIs.
*/
#include <stdio.h>
#include "config.h"
#include <glib.h>
#include <epan/timestamp.h>
#include <epan/value_string.h>
#include <QFont>
#include <QString>
class QFont;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@ -60,16 +57,16 @@ extern "C" {
// CAPTURE_AUTH_PWD /**< User/password authentication */
//} capture_auth;
struct remote_host_t {
gchar *remote_host; /**< Host name or network address for remote capturing */
gchar *remote_port; /**< TCP port of remote RPCAP server */
gint auth_type; /**< Authentication type */
gchar *auth_username; /**< Remote authentication parameters */
gchar *auth_password; /**< Remote authentication parameters */
gboolean datatx_udp;
gboolean nocap_rpcap;
gboolean nocap_local;
};
//struct remote_host_t {
// gchar *remote_host; /**< Host name or network address for remote capturing */
// gchar *remote_port; /**< TCP port of remote RPCAP server */
// gint auth_type; /**< Authentication type */
// gchar *auth_username; /**< Remote authentication parameters */
// gchar *auth_password; /**< Remote authentication parameters */
// gboolean datatx_udp;
// gboolean nocap_rpcap;
// gboolean nocap_local;
//};
struct _address;
@ -118,7 +115,7 @@ const QString address_to_display_qstring(const struct _address *address);
*
* @return A QString representation of the value_string.
*/
const QString val_to_qstring(const guint32 val, const value_string *vs, const char *fmt)
const QString val_to_qstring(const guint32 val, const struct _value_string *vs, const char *fmt)
G_GNUC_PRINTF(3, 0);
/** Convert an value_string_ext to a QString using val_to_str_ext_wmem().
@ -129,7 +126,7 @@ G_GNUC_PRINTF(3, 0);
*
* @return A QString representation of the value_string_ext.
*/
const QString val_ext_to_qstring(const guint32 val, value_string_ext *vse, const char *fmt)
const QString val_ext_to_qstring(const guint32 val, struct _value_string_ext *vse, const char *fmt)
G_GNUC_PRINTF(3, 0);
/** Convert bits per second value human-readable QString using format_size().

View File

@ -23,9 +23,17 @@
#include "ui_sctp_graph_arwnd_dialog.h"
#include "sctp_assoc_analyse_dialog.h"
#include <file.h>
#include <math.h>
#include <epan/dissectors/packet-sctp.h>
#include "epan/packet.h"
#include "ui/tap-sctp-analysis.h"
#include "qcustomplot.h"
#include "sctp_graph_dialog.h"
SCTPGraphArwndDialog::SCTPGraphArwndDialog(QWidget *parent, sctp_assoc_info_t *assoc, capture_file *cf, int dir) :
SCTPGraphArwndDialog::SCTPGraphArwndDialog(QWidget *parent, sctp_assoc_info_t *assoc, _capture_file *cf, int dir) :
QDialog(parent),
ui(new Ui::SCTPGraphArwndDialog),
selected_assoc(assoc),

View File

@ -23,35 +23,29 @@
#define SCTP_GRAPH_ARWND_DIALOG_H
#include "config.h"
#include "qcustomplot.h"
#include <glib.h>
#include <file.h>
#include <math.h>
#include <epan/dissectors/packet-sctp.h>
#include "epan/packet.h"
#include "ui/tap-sctp-analysis.h"
#include <QDialog>
#include <QObject>
#include <QMessageBox>
namespace Ui {
class SCTPGraphArwndDialog;
}
class QCPAbstractPlottable;
struct _capture_file;
struct _sctp_assoc_info;
class SCTPGraphArwndDialog : public QDialog
{
Q_OBJECT
public:
explicit SCTPGraphArwndDialog(QWidget *parent = 0, sctp_assoc_info_t *assoc = NULL, capture_file *cf = NULL, int dir = 0);
explicit SCTPGraphArwndDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, struct _capture_file *cf = NULL, int dir = 0);
~SCTPGraphArwndDialog();
public slots:
void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
void setCaptureFile(struct _capture_file *cf) { cap_file_ = cf; }
private slots:
void on_pushButton_4_clicked();
@ -62,8 +56,8 @@ private slots:
private:
Ui::SCTPGraphArwndDialog *ui;
sctp_assoc_info_t *selected_assoc;
capture_file *cap_file_;
struct _sctp_assoc_info *selected_assoc;
struct _capture_file *cap_file_;
int frame_num;
int direction;
int startArwnd;

View File

@ -22,6 +22,14 @@
#include "sctp_graph_byte_dialog.h"
#include "ui_sctp_graph_byte_dialog.h"
#include <file.h>
#include <math.h>
#include <epan/dissectors/packet-sctp.h>
#include "epan/packet.h"
#include "ui/tap-sctp-analysis.h"
#include "qcustomplot.h"
#include "sctp_graph_dialog.h"
#include "sctp_assoc_analyse_dialog.h"

View File

@ -23,35 +23,29 @@
#define SCTP_GRAPH_BYTE_DIALOG_H
#include "config.h"
#include "qcustomplot.h"
#include <glib.h>
#include <file.h>
#include <math.h>
#include <epan/dissectors/packet-sctp.h>
#include "epan/packet.h"
#include "ui/tap-sctp-analysis.h"
#include <QDialog>
#include <QObject>
#include <QMessageBox>
namespace Ui {
class SCTPGraphByteDialog;
}
class QCPAbstractPlottable;
struct _capture_file;
struct _sctp_assoc_info;
class SCTPGraphByteDialog : public QDialog
{
Q_OBJECT
public:
explicit SCTPGraphByteDialog(QWidget *parent = 0, sctp_assoc_info_t *assoc = NULL, capture_file *cf = NULL, int dir = 0);
explicit SCTPGraphByteDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, struct _capture_file *cf = NULL, int dir = 0);
~SCTPGraphByteDialog();
public slots:
void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
void setCaptureFile(struct _capture_file *cf) { cap_file_ = cf; }
private slots:
void on_pushButton_4_clicked();
@ -62,8 +56,8 @@ private slots:
private:
Ui::SCTPGraphByteDialog *ui;
sctp_assoc_info_t *selected_assoc;
capture_file *cap_file_;
struct _sctp_assoc_info *selected_assoc;
struct _capture_file *cap_file_;
int frame_num;
int direction;
QVector<double> xb, yb;

View File

@ -25,6 +25,17 @@
#include "ui_sctp_graph_dialog.h"
#include "sctp_assoc_analyse_dialog.h"
#include <file.h>
#include <math.h>
#include <epan/dissectors/packet-sctp.h>
#include "epan/packet.h"
#include "ui/tap-sctp-analysis.h"
#include <QFileDialog>
#include <QMessageBox>
#include "qcustomplot.h"
#include "wireshark_application.h"
SCTPGraphDialog::SCTPGraphDialog(QWidget *parent, sctp_assoc_info_t *assoc, capture_file *cf, int dir) :

View File

@ -23,26 +23,20 @@
#define SCTP_GRAPH_DIALOG_H
#include "config.h"
#include "qcustomplot.h"
#include <glib.h>
#include <file.h>
#include <math.h>
#include <epan/dissectors/packet-sctp.h>
#include "epan/packet.h"
#include "ui/tap-sctp-analysis.h"
#include <QDialog>
#include <QObject>
#include <QMessageBox>
#include <QDir>
#include <QFileDialog>
namespace Ui {
class SCTPGraphDialog;
}
class QCPAbstractPlottable;
class QCustomPlot;
struct _capture_file;
struct _sctp_assoc_info;
struct chunk_header {
guint8 type;
guint8 flags;
@ -94,12 +88,12 @@ class SCTPGraphDialog : public QDialog
Q_OBJECT
public:
explicit SCTPGraphDialog(QWidget *parent = 0, sctp_assoc_info_t *assoc = NULL, capture_file *cf = NULL, int dir = 0);
explicit SCTPGraphDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, struct _capture_file *cf = NULL, int dir = 0);
~SCTPGraphDialog();
static void save_graph(QDialog *dlg, QCustomPlot *plot);
public slots:
void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
void setCaptureFile(struct _capture_file *cf) { cap_file_ = cf; }
private slots:
void on_pushButton_clicked();
@ -116,8 +110,8 @@ private slots:
private:
Ui::SCTPGraphDialog *ui;
sctp_assoc_info_t *selected_assoc;
capture_file *cap_file_;
struct _sctp_assoc_info *selected_assoc;
struct _capture_file *cap_file_;
int frame_num;
int direction;
QVector<double> xt, yt, xs, ys, xg, yg, xd, yd, xn, yn;

View File

@ -22,6 +22,8 @@
#include "search_frame.h"
#include "ui_search_frame.h"
#include "file.h"
#include <epan/proto.h>
#include <epan/strutil.h>

View File

@ -23,6 +23,8 @@
#include "epan/addr_resolv.h"
#include "ui/tap-sequence-analysis.h"
#include "qt_ui_utils.h"
#include <QFont>
@ -42,7 +44,7 @@ WSCPSeqData::WSCPSeqData() :
{
}
WSCPSeqData::WSCPSeqData(double key, seq_analysis_item_t *value) :
WSCPSeqData::WSCPSeqData(double key, struct _seq_analysis_item *value) :
key(key),
value(value)
{
@ -93,7 +95,7 @@ SequenceDiagram::SequenceDiagram(QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *
// valueAxis->setTickLabelRotation(30);
}
void SequenceDiagram::setData(seq_analysis_info_t *sainfo)
void SequenceDiagram::setData(_seq_analysis_info *sainfo)
{
data_->clear();
sainfo_ = sainfo;
@ -150,7 +152,7 @@ void SequenceDiagram::setSelectedPacket(int selected_packet)
mParentPlot->replot();
}
seq_analysis_item_t *SequenceDiagram::itemForPosY(int ypos)
_seq_analysis_item *SequenceDiagram::itemForPosY(int ypos)
{
double key_pos = qRound(key_axis_->pixelToCoord(ypos));

View File

@ -28,20 +28,21 @@
#include <epan/address.h>
#include "ui/tap-sequence-analysis.h"
#include <QObject>
#include <QMultiMap>
#include "qcustomplot.h"
struct _seq_analysis_info;
struct _seq_analysis_item;
// Most of this is probably unnecessary
class WSCPSeqData
{
public:
WSCPSeqData();
WSCPSeqData(double key, seq_analysis_item_t *value);
WSCPSeqData(double key, _seq_analysis_item *value);
double key;
seq_analysis_item_t *value;
struct _seq_analysis_item *value;
};
Q_DECLARE_TYPEINFO(WSCPSeqData, Q_MOVABLE_TYPE);
@ -58,10 +59,10 @@ public:
// getters:
// setters:
void setData(seq_analysis_info_t *sainfo);
void setData(struct _seq_analysis_info *sainfo);
// non-property methods:
seq_analysis_item_t *itemForPosY(int ypos);
struct _seq_analysis_item *itemForPosY(int ypos);
// reimplemented virtual methods:
virtual void clearData() { data_->clear(); }
@ -81,7 +82,7 @@ private:
QCPAxis *value_axis_;
QCPAxis *comment_axis_;
WSCPSeqDataMap *data_;
seq_analysis_info_t *sainfo_;
struct _seq_analysis_info *sainfo_;
guint32 selected_packet_;
};

View File

@ -25,6 +25,7 @@
#include "epan/strutil.h"
#include "epan/to_str.h"
#include "epan/uat-int.h"
#include "epan/value_string.h"
#include "ui/help_url.h"
#include <wsutil/report_err.h>
@ -43,7 +44,7 @@
#include <QDebug>
UatDialog::UatDialog(QWidget *parent, uat_t *uat) :
UatDialog::UatDialog(QWidget *parent, epan_uat *uat) :
QDialog(parent),
ui(new Ui::UatDialog),
uat_(NULL),
@ -82,7 +83,7 @@ UatDialog::~UatDialog()
delete ui;
}
void UatDialog::setUat(uat_t *uat)
void UatDialog::setUat(epan_uat *uat)
{
QString title(tr("Unknown User Accessible Table"));

View File

@ -26,8 +26,6 @@
#include <glib.h>
#include "epan/uat-int.h"
#include "syntax_line_edit.h"
#include <QDialog>
@ -36,6 +34,8 @@ class QComboBox;
class QPushButton;
class QTreeWidgetItem;
struct epan_uat;
namespace Ui {
class UatDialog;
}
@ -45,10 +45,10 @@ class UatDialog : public QDialog
Q_OBJECT
public:
explicit UatDialog(QWidget *parent = 0, uat_t *uat = NULL);
explicit UatDialog(QWidget *parent = 0, struct epan_uat *uat = NULL);
~UatDialog();
void setUat(uat_t *uat = NULL);
void setUat(struct epan_uat *uat = NULL);
protected:
void keyPressEvent(QKeyEvent *evt);
@ -73,7 +73,7 @@ private:
Ui::UatDialog *ui;
QPushButton *ok_button_;
QPushButton *help_button_;
uat_t *uat_;
struct epan_uat *uat_;
int cur_column_;
SyntaxLineEdit *cur_line_edit_;
QString saved_string_pref_;

View File

@ -26,14 +26,14 @@
#include <glib.h>
#include "cfile.h"
#include "ui/voip_calls.h"
#include "wireshark_dialog.h"
#include <QMenu>
struct _capture_file;
class QAbstractButton;
class QTreeWidgetItem;
@ -54,7 +54,7 @@ public slots:
signals:
void updateFilter(QString &filter, bool force = false);
void captureFileChanged(capture_file *cf);
void captureFileChanged(struct _capture_file *cf);
void goToPacket(int packet_num);
protected:

View File

@ -21,10 +21,15 @@
#include "wireshark_application.h"
#include <errno.h>
#include "wsutil/filesystem.h"
#include "epan/addr_resolv.h"
#include "epan/disabled_protos.h"
#include "epan/ftypes/ftypes.h"
#include "epan/prefs.h"
#include "epan/proto.h"
#include "epan/tap.h"
#include "epan/timestamp.h"
@ -67,7 +72,6 @@
#include <QMutableListIterator>
#include <QSocketNotifier>
#include <QThread>
#include <QTimer>
#include <QUrl>
#ifdef Q_OS_WIN
@ -668,7 +672,7 @@ void WiresharkApplication::allSystemsGo()
#endif
}
e_prefs * WiresharkApplication::readConfigurationFiles(char **gdp_path, char **dp_path)
_e_prefs *WiresharkApplication::readConfigurationFiles(char **gdp_path, char **dp_path)
{
int gpf_open_errno, gpf_read_errno;
int cf_open_errno, df_open_errno;

View File

@ -26,11 +26,6 @@
#include <glib.h>
#include "epan/prefs.h"
#include "capture_opts.h"
#include <capchild/capture_session.h>
#include "file.h"
#include "register.h"
#include "ui/help_url.h"
@ -42,6 +37,8 @@
#include <QTimer>
#include <QTranslator>
struct _e_prefs;
class QSocketNotifier;
// Recent items:
@ -77,7 +74,7 @@ public:
void emitStatCommandSignal(const QString &menu_path, const char *arg, void *userdata);
void allSystemsGo();
void refreshLocalInterfaces();
e_prefs * readConfigurationFiles(char **gdp_path, char **dp_path);
struct _e_prefs * readConfigurationFiles(char **gdp_path, char **dp_path);
QList<recent_item_status *> recentItems() const;
void addRecentItem(const QString &filename, qint64 size, bool accessible);
QDir lastOpenDir();