Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
glib_mainloop_on_qeventloop.h
Go to the documentation of this file.
1
8#ifndef GLIB_MAINLOOP_ON_QEVENTLOOP_H
9#define GLIB_MAINLOOP_ON_QEVENTLOOP_H
10
11#include <QThread>
12#include <QMutex>
13#include <QWaitCondition>
14
15class GLibPoller : public QThread
16{
17 Q_OBJECT
18
19protected:
20 explicit GLibPoller(GMainContext *context);
22
23 void run() override;
24
25 QMutex mutex_;
26 QWaitCondition dispatched_;
27 GMainContext *ctx_;
28 int priority_;
29 GPollFD *fds_;
30 int allocated_fds_, nfds_;
31
32signals:
33 void polled(void);
34
35 friend class GLibMainloopOnQEventLoop;
36};
37
38class GLibMainloopOnQEventLoop : public QObject
39{
40 Q_OBJECT
41
42protected:
43 explicit GLibMainloopOnQEventLoop(QObject *parent);
45
46protected slots:
47 void checkAndDispatch();
48
49public:
50 static void setup(QObject *parent);
51
52protected:
53 GLibPoller poller_;
54};
55
56#endif /* GLIB_MAINLOOP_ON_QEVENTLOOP_H */
Definition glib_mainloop_on_qeventloop.h:39
Definition glib_mainloop_on_qeventloop.h:16