|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Manages a capture file and its associated state and operations. More...
#include <capture_file.h>
Public Slots | |
| 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. | |
Signals | |
| void | captureEvent (CaptureEvent event) |
| Signal emitted when a capture-related event occurs. | |
Public Member Functions | |
| CaptureFile (QObject *parent=0, capture_file *cap_file=NULL) | |
| Constructs a new CaptureFile object. | |
| ~CaptureFile () | |
| Destroys the CaptureFile. | |
| capture_file * | capFile () const |
| Retrieves the underlying capture_file pointer if valid. | |
| void | setCapFile (capture_file *cap_file) |
| Sets the underlying capture_file pointer. | |
| bool | isValid () const |
| Check capture file validity. | |
| const QString | filePath () |
| Return the full pathname. | |
| const QString | fileName () |
| Return the plain filename. | |
| const QString | fileBaseName () |
| Return the plain filename without an extension. | |
| const QString | fileDisplayName () |
| Return a string representing the file suitable for use for display in the UI in places such as a main window title. | |
| const QString | fileTitle () |
| Return a string representing the file suitable for use in an auxiliary window title. | |
| struct _packet_info * | packetInfo () |
| Return the current packet information. | |
| int | timestampPrecision () |
| Timestamp precision for the current file. | |
| void | reload () |
| Reload the capture file. | |
| QString | displayFilter () const |
| Return any set display filter. | |
| void * | window () |
| Retrieves the main window associated with this capture file. | |
Static Public Member Functions | |
| static capture_file * | globalCapFile () |
| Retrieves the global capture_file instance. | |
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.
|
explicit |
Constructs a new CaptureFile object.
| parent | The parent QObject, defaults to 0. |
| cap_file | Pointer to the underlying capture_file structure, defaults to NULL. |
|
inline |
Retrieves the underlying capture_file pointer if valid.
|
signal |
Signal emitted when a capture-related event occurs.
| event | The capture event details. |
| QString CaptureFile::displayFilter | ( | ) | const |
Return any set display filter.
| const QString CaptureFile::fileBaseName | ( | ) |
Return the plain filename without an extension.
| 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.
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.
| const QString CaptureFile::fileName | ( | ) |
Return the plain filename.
| const QString CaptureFile::filePath | ( | ) |
Return the full pathname.
| const QString CaptureFile::fileTitle | ( | ) |
Return a string representing the file suitable for use in an auxiliary window title.
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.
|
static |
Retrieves the global capture_file instance.
| bool CaptureFile::isValid | ( | ) | const |
Check capture file validity.
| struct _packet_info * CaptureFile::packetInfo | ( | ) |
Return the current packet information.
|
inline |
Sets the underlying capture_file pointer.
| cap_file | The new capture_file pointer. |
|
slot |
Sets the capture file's "stop_flag" member.
| stop_flag | If true, stops the current capture file operation. |
| int CaptureFile::timestampPrecision | ( | ) |
Timestamp precision for the current file.
| void * CaptureFile::window | ( | ) |
Retrieves the main window associated with this capture file.