Loading...
Searching...
No Matches
ZeroconfBrowser.hpp
1#pragma once
2#include <ossia/detail/config.hpp>
3#if defined(OSSIA_DNSSD)
4#include <QByteArray>
5#include <QMap>
6#include <QObject>
7#include <QString>
8
9#include <score_plugin_deviceexplorer_export.h>
10
11#include <memory>
12#include <verdigris>
13
14class QAction;
15class QDialog;
16class QListView;
17class QLineEdit;
18class QSpinBox;
19class QWidget;
20namespace servus
21{
22class Servus;
23namespace qt
24{
25class ItemModel;
26}
27}
28
29class SCORE_PLUGIN_DEVICEEXPLORER_EXPORT ZeroconfBrowser : public QObject
30{
31 W_OBJECT(ZeroconfBrowser)
32public:
33 ZeroconfBrowser(const QString& service, QWidget* parent);
35 QAction* makeAction();
36
37public:
38 // ip, port, other data
39 void sessionSelected(
40 QString arg_1, QString arg_2, int arg_3, QMap<QString, QByteArray> arg_4)
41 E_SIGNAL(
42 SCORE_PLUGIN_DEVICEEXPLORER_EXPORT, sessionSelected, arg_1, arg_2, arg_3,
43 arg_4)
44
45public:
46 void accept();
47 W_SLOT(accept);
48 void reject();
49 W_SLOT(reject);
50
51private:
52 QDialog* m_dialog{};
53 QLineEdit* m_manualIp{};
54 QSpinBox* m_manualPort{};
55 QListView* m_list{};
56 std::unique_ptr<servus::Servus> m_serv;
57 servus::qt::ItemModel* m_model{};
58};
59#endif
Definition ClipMode.hpp:10
Definition ZeroconfBrowser.hpp:30