Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
capture_event.h
Go to the documentation of this file.
1
10#ifndef CAPTURE_EVENT_H
11#define CAPTURE_EVENT_H
12
13#include <QEvent>
14#include <QString>
15
17
18struct _packet_info;
19
24{
25public:
29 enum Context {
30#ifdef HAVE_LIBPCAP
31 Capture = 0x0001,
32 Update = 0x0100 | Capture,
33 Fixed = 0x0200 | Capture,
34#endif
35 File = 0x0002,
36 Reload = 0x0100 | File,
37 Rescan = 0x0200 | File,
38 Save = 0x0400 | File,
39 Retap = 0x0800 | File,
40 Merge = 0x1000 | File
41 };
42
46 enum EventType {
47 Opened = 0x0001,
48 Started = 0x0002,
49 Finished = 0x0004,
50 Closing = 0x0008,
51 Closed = 0x0010,
52 Failed = 0x0020,
53 Stopped = 0x0040,
54 Flushed = 0x0080,
55 Prepared = 0x0100,
56 Continued = 0x0200,
57 Stopping = 0x0400
58 };
59
66
73 CaptureEvent(Context ctx, EventType evt, QString file);
74
81 CaptureEvent(Context ctx, EventType evt, capture_session * session);
82
87 CaptureEvent(const CaptureEvent &ce);
88
93 Context captureContext() const;
94
99 EventType eventType() const;
100
105 QString filePath() const;
106
111 capture_session * capSession() const;
112
113private:
115 Context _ctx;
116
118 EventType _evt;
119
121 QString _filePath;
122
124 capture_session * _session;
125};
126
127#endif // CAPTURE_EVENT_H
Represents an event occurring during a capture or file operation.
Definition capture_event.h:24
Context
Defines the operational context of the event.
Definition capture_event.h:29
@ File
Definition capture_event.h:35
@ Save
Definition capture_event.h:38
@ Rescan
Definition capture_event.h:37
@ Reload
Definition capture_event.h:36
@ Merge
Definition capture_event.h:40
@ Retap
Definition capture_event.h:39
QString filePath() const
Retrieves the associated file path.
Definition capture_file.cpp:67
Context captureContext() const
Retrieves the context of the capture event.
Definition capture_file.cpp:61
EventType
Defines the specific type of event.
Definition capture_event.h:46
@ Closed
Definition capture_event.h:51
@ Stopping
Definition capture_event.h:57
@ Stopped
Definition capture_event.h:53
@ Flushed
Definition capture_event.h:54
@ Failed
Definition capture_event.h:52
@ Finished
Definition capture_event.h:49
@ Continued
Definition capture_event.h:56
@ Closing
Definition capture_event.h:50
@ Opened
Definition capture_event.h:47
@ Started
Definition capture_event.h:48
@ Prepared
Definition capture_event.h:55
EventType eventType() const
Retrieves the type of the capture event.
Definition capture_file.cpp:64
capture_session * capSession() const
Retrieves the associated capture session.
Definition capture_file.cpp:70
Opaque handle representing an active or pending capture session.
Definition capture_session.h:142
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Wraps a wtap file handle or wtap_dumper for read/write access from the Lua scripting environment.
Definition wslua.h:369