Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / interface_toolbar_reader.h
blob88c3b0c0ff314e3880a9b24f7aef883bbf901978
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef INTERFACE_TOOLBAR_READER_H
11 #define INTERFACE_TOOLBAR_READER_H
13 #include <QObject>
14 #include <QByteArray>
16 #ifdef _WIN32
17 #include <windows.h>
18 #endif
20 namespace Ui {
21 class InterfaceToolbarReader;
24 class InterfaceToolbarReader : public QObject
26 Q_OBJECT
28 public:
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
41 public slots:
42 void loop();
44 signals:
45 void received(QString ifname, int num, int command, QByteArray payload);
46 void finished();
48 private:
49 #ifdef _WIN32
50 int async_pipe_read(void *data, int nbyte);
51 #endif
52 int pipe_read(char *data, int nbyte);
54 QString ifname_;
55 #ifdef _WIN32
56 HANDLE control_in_;
57 #else
58 QString control_in_;
59 int fd_in_;
60 #endif
63 #endif // INTERFACE_TOOLBAR_READER_H