Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
capture_event.h
1 /* capture_event.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef CAPTURE_EVENT_H
11 #define CAPTURE_EVENT_H
12 
13 #include <QEvent>
14 
15 typedef struct _capture_session capture_session;
16 
17 struct _packet_info;
18 
20 {
21 public:
22  enum Context {
23 #ifdef HAVE_LIBPCAP
24  Capture = 0x0001,
25  Update = 0x0100 | Capture,
26  Fixed = 0x0200 | Capture,
27 #endif
28  File = 0x0002,
29  Reload = 0x0100 | File,
30  Rescan = 0x0200 | File,
31  Save = 0x0400 | File,
32  Retap = 0x0800 | File,
33  Merge = 0x1000 | File
34  };
35 
36  enum EventType {
37  Opened = 0x0001,
38  Started = 0x0002,
39  Finished = 0x0004,
40  Closing = 0x0008,
41  Closed = 0x0010,
42  Failed = 0x0020,
43  Stopped = 0x0040,
44  Flushed = 0x0080,
45  Prepared = 0x0100,
46  Continued = 0x0200,
47  Stopping = 0x0400
48  };
49 
50  CaptureEvent(Context ctx, EventType evt);
51  CaptureEvent(Context ctx, EventType evt, QString file);
52  CaptureEvent(Context ctx, EventType evt, capture_session * session);
53 
54  CaptureEvent(const CaptureEvent &ce);
55 
56  Context captureContext() const;
57  EventType eventType() const;
58  QString filePath() const;
59  capture_session * capSession() const;
60 
61 private:
62  Context _ctx;
63  EventType _evt;
64  QString _filePath;
65  capture_session * _session;
66 };
67 
68 #endif // CAPTURE_EVENT_H
69 
70 /*
71  * Editor modelines
72  *
73  * Local Variables:
74  * c-basic-offset: 4
75  * tab-width: 8
76  * indent-tabs-mode: nil
77  * End:
78  *
79  * ex: set shiftwidth=4 tabstop=8 expandtab:
80  * :indentSize=4:tabSize=8:noTabs=true:
81  */
Definition: packet_info.h:44
Definition: capture_event.h:19
Definition: wslua.h:244
Definition: capture_session.h:63