Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_file.h
Go to the documentation of this file.
1
10#ifndef CAPTURE_FILE_H
11#define CAPTURE_FILE_H
12
13#include <QObject>
14
15#include <config.h>
16
17#include "cfile.h"
18#include "capture_event.h"
19
20class CaptureFile : public QObject
21{
22 Q_OBJECT
23public:
24 explicit CaptureFile(QObject *parent = 0, capture_file *cap_file = NULL);
26
27 capture_file *capFile() const { return isValid() ? cap_file_ : NULL; }
28 void setCapFile(capture_file *cap_file) { cap_file_ = cap_file; }
29
35 bool isValid() const;
36
43 const QString filePath();
44
51 const QString fileName();
52
59 const QString fileBaseName();
60
76 const QString fileDisplayName();
77
93 const QString fileTitle();
94
99 struct _packet_info *packetInfo();
100
105 int timestampPrecision();
106
109 void reload();
110
113 QString displayFilter() const;
114
115 // XXX This shouldn't be needed.
116 static capture_file *globalCapFile();
117
118 void *window();
119
120signals:
121 void captureEvent(CaptureEvent);
122
123public slots:
127 void retapPackets();
128
134 void delayedRetapPackets();
135
138 void stopLoading();
139
144 void setCaptureStopFlag(bool stop_flag = true);
145
146private:
147 static void captureFileCallback(int event, void *data, void *user_data);
148#ifdef HAVE_LIBPCAP
149 static void captureCallback(int event, capture_session *cap_session, void *user_data);
150#endif
151
152 void captureFileEvent(int event, void *data);
153 void captureSessionEvent(int event, capture_session *cap_session);
154 const QString &getFileBasename();
155
156 static QString no_capture_file_;
157
158 capture_file *cap_file_;
159 QString file_state_;
160};
161
162#endif // CAPTURE_FILE_H
Definition capture_event.h:21
Definition capture_file.h:21
const QString fileTitle()
Definition capture_file.cpp:178
QString displayFilter() const
Definition capture_file.cpp:230
const QString fileBaseName()
Definition capture_file.cpp:150
void reload()
Definition capture_file.cpp:218
const QString fileDisplayName()
Definition capture_file.cpp:164
void stopLoading()
Definition capture_file.cpp:225
int timestampPrecision()
Definition capture_file.cpp:198
const QString filePath()
Definition capture_file.cpp:106
const QString fileName()
Definition capture_file.cpp:135
void retapPackets()
Definition capture_file.cpp:206
void setCaptureStopFlag(bool stop_flag=true)
Definition capture_file.cpp:248
struct _packet_info * packetInfo()
Definition capture_file.cpp:190
bool isValid() const
Definition capture_file.cpp:98
void delayedRetapPackets()
Definition capture_file.cpp:213
Definition cfile.h:67
Definition capture_session.h:137
Definition packet_info.h:43