Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
interface_toolbar_reader.h
Go to the documentation of this file.
1
10#ifndef INTERFACE_TOOLBAR_READER_H
11#define INTERFACE_TOOLBAR_READER_H
12
13#include <QObject>
14#include <QByteArray>
15
16#ifdef _WIN32
17#include <windows.h>
18#endif
19
20namespace Ui {
22}
23
24class InterfaceToolbarReader : public QObject
25{
26 Q_OBJECT
27
28public:
29 InterfaceToolbarReader(QString ifname, void *control_in, QObject *parent = 0) :
30 QObject(parent),
31 ifname_(ifname),
32#ifdef _WIN32
33 control_in_((HANDLE)control_in)
34#else
35 control_in_((char *)control_in),
36 fd_in_(-1)
37#endif
38 {
39 }
40
41public slots:
42 void loop();
43
44signals:
45 void received(QString ifname, int num, int command, QByteArray payload);
46 void finished();
47
48private:
49#ifdef _WIN32
50 int async_pipe_read(void *data, int nbyte);
51#endif
52 int pipe_read(char *data, int nbyte);
53
54 QString ifname_;
55#ifdef _WIN32
56 HANDLE control_in_;
57#else
58 QString control_in_;
59 int fd_in_;
60#endif
61};
62
63#endif // INTERFACE_TOOLBAR_READER_H
Definition interface_toolbar_reader.h:25