Manages a capture file and its associated state and operations.
More...
#include <capture_file.h>
|
|
void | retapPackets () |
| | Retap the capture file. Convenience wrapper for cf_retap_packets. Application events are processed periodically via update_progress_dlg.
|
|
void | delayedRetapPackets () |
| | Retap the capture file after the current batch of application events is processed. If you call this instead of retapPackets or cf_retap_packets in a dialog's constructor it will be displayed before tapping starts.
|
|
void | stopLoading () |
| | Cancel any tapping that might be in progress.
|
| void | setCaptureStopFlag (bool stop_flag=true) |
| | Sets the capture file's "stop_flag" member.
|
Manages a capture file and its associated state and operations.
This class serves as a Qt-friendly wrapper around the underlying core capture_file struct, handling file validity, paths, events, and tapping operations.
◆ CaptureFile()
| CaptureFile::CaptureFile |
( |
QObject * | parent = 0, |
|
|
capture_file * | cap_file = NULL ) |
|
explicit |
Constructs a new CaptureFile object.
- Parameters
-
| parent | The parent QObject, defaults to 0. |
| cap_file | Pointer to the underlying capture_file structure, defaults to NULL. |
◆ capFile()
◆ captureEvent
Signal emitted when a capture-related event occurs.
- Parameters
-
| event | The capture event details. |
◆ displayFilter()
| QString CaptureFile::displayFilter |
( |
| ) |
const |
Return any set display filter.
- Returns
- The current display filter string.
◆ fileBaseName()
| const QString CaptureFile::fileBaseName |
( |
| ) |
|
Return the plain filename without an extension.
- Returns
- The last component of the pathname, without the extension, converted from the native OS's encoding to Unicode if necessary, or a null string if the conversion can't be done.
◆ fileDisplayName()
| const QString CaptureFile::fileDisplayName |
( |
| ) |
|
Return a string representing the file suitable for use for display in the UI in places such as a main window title.
- Returns
- One of:
the devices on which the capture was done, if the file is a temporary file for a capture;
the last component of the capture file's name, converted from the native OS's encoding to Unicode if necessary (and with REPLACEMENT CHARACTER inserted if the string can't be converted).
a null string, if there is no capture file.
◆ fileName()
| const QString CaptureFile::fileName |
( |
| ) |
|
Return the plain filename.
- Returns
- The last component of the pathname, including the extension, converted from the native OS's encoding to Unicode if necessary, or a null string if the conversion can't be done.
◆ filePath()
| const QString CaptureFile::filePath |
( |
| ) |
|
Return the full pathname.
- Returns
- The entire pathname, converted from the native OS's encoding to Unicode if necessary, or a null string if the conversion can't be done.
◆ fileTitle()
| const QString CaptureFile::fileTitle |
( |
| ) |
|
Return a string representing the file suitable for use in an auxiliary window title.
- Returns
- One of:
the result of fileDisplayName(), if the file is open;
the result of fileDisplayName() followed by [closing], if the file is being closed;
the result of fileDisplayName() followed by [closed], if the file has been closed;
[no capture file], if there is no capture file.
◆ globalCapFile()
◆ isValid()
| bool CaptureFile::isValid |
( |
| ) |
const |
Check capture file validity.
- Returns
- true if the file is open, readable, and tappable. false if the file is closed.
◆ packetInfo()
Return the current packet information.
- Returns
- A pointer to the current packet_info struct or NULL.
◆ setCapFile()
◆ setCaptureStopFlag
| void CaptureFile::setCaptureStopFlag |
( |
bool | stop_flag = true | ) |
|
|
slot |
Sets the capture file's "stop_flag" member.
- Parameters
-
| stop_flag | If true, stops the current capture file operation. |
◆ timestampPrecision()
| int CaptureFile::timestampPrecision |
( |
| ) |
|
Timestamp precision for the current file.
- Returns
- One of the WTAP_TSPREC_x values defined in wiretap/wtap.h, or WTAP_TSPREC_UNKNOWN if no file is open.
◆ window()
| void * CaptureFile::window |
( |
| ) |
|
Retrieves the main window associated with this capture file.
- Returns
- Pointer to the window.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/capture_file.h
- /builds/wireshark/wireshark/ui/qt/capture_file.cpp