Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

interface_toolbar_reader.h
1 /* interface_toolbar_reader.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 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
20 namespace Ui {
21 class InterfaceToolbarReader;
22 }
23
24 class InterfaceToolbarReader : public QObject
25 {
26 Q_OBJECT
27
28 public:
29 InterfaceToolbarReader(QString ifname, void *control_in, QObject *parent = 0) :
30 QObject(parent), ifname_(ifname)
31 {
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 public slots:
41 void loop();
42
43 signals:
44 void received(QString ifname, int num, int command, QByteArray payload);
45 void finished();
46
47 private:
48 #ifdef _WIN32
49 int async_pipe_read(void *data, int nbyte);
50 #endif
51 int pipe_read(char *data, int nbyte);
52
53 QString ifname_;
54 #ifdef _WIN32
55 HANDLE control_in_;
56 #else
57 QString control_in_;
58 int fd_in_;
59 #endif
60 };
61
62 #endif // INTERFACE_TOOLBAR_READER_H
63
64 /*
65 * Editor modelines
66 *
67 * Local Variables:
68 * c-basic-offset: 4
69 * tab-width: 8
70 * indent-tabs-mode: nil
71 * End:
72 *
73 * ex: set shiftwidth=4 tabstop=8 expandtab:
74 * :indentSize=4:tabSize=8:noTabs=true:
75 */
Ui
Definition: ui_about_dialog.h:291
InterfaceToolbarReader
Definition: interface_toolbar_reader.h:24