Wireshark  4.3.0
The Wireshark network protocol analyzer
uihandler.h
1 /* uihandler.h
2  * Author: Roland Knall <rknall@gmail.com>
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef PLUGINIFDEMO_UI_UIHANDLER_H_
12 #define PLUGINIFDEMO_UI_UIHANDLER_H_
13 
14 #ifdef __cplusplus
15 
16 #include <QObject>
17 #include <QDialog>
18 #include <QMutex>
19 
20 #include <epan/plugin_if.h>
21 
22 #include "ws_symbol_export.h"
23 
24 class GuiHandler : public QObject
25 {
26  Q_OBJECT
27 
28 public:
29 
30  static GuiHandler * getInstance();
31 
32  void showAboutDialog(ext_menubar_gui_type gui_type, gpointer gui_data);
33  void showMainDialog(ext_menubar_gui_type gui_type, gpointer gui_data);
34 
35  void doReset();
36 
37  void addLogMessage(QString message);
38 
39  void setToolbar(ext_toolbar_t * toolbar);
40  ext_toolbar_t * toolBar();
41 
42 signals:
43  void reset();
44  void logChanged(QString newEntry);
45 
46 protected:
47 
48  GuiHandler();
49 
50  // Stop the compiler generating methods of "copy the object"
51  GuiHandler(GuiHandler const& copy); // Not implemented
52  GuiHandler& operator=(GuiHandler const& copy); // Not implemented
53 
54 private:
55 
56  static QMutex * singletonMutex;
57 
58  ext_toolbar_t * _toolbar;
59 
60  void executeDialog(QDialog * object);
61 };
62 
63 extern "C" {
64 #endif
65 
66 extern void pluginifdemo_ui_about(ext_menubar_gui_type gui_type, gpointer gui_data);
67 extern void pluginifdemo_ui_main(ext_menubar_gui_type gui_type, gpointer gui_data);
68 extern void pluginifdemo_toolbar_log(const gchar * message);
69 
70 extern void pluginifdemo_toolbar_register(ext_toolbar_t * toolbar);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif /* BURANALYZER_UI_UIHANDLER_H_ */
77 
78 /*
79  * Editor modelines
80  *
81  * Local Variables:
82  * c-basic-offset: 4
83  * tab-width: 8
84  * indent-tabs-mode: nil
85  * End:
86  *
87  * ex: set shiftwidth=4 tabstop=8 expandtab:
88  * :indentSize=4:tabSize=8:noTabs=true:
89  */
Definition: plugin_if.h:101