2 #include <Device/Protocol/ProtocolSettingsWidget.hpp>
4 #include <ossia/network/sockets/configuration.hpp>
5 #include <ossia/protocols/osc/osc_factory.hpp>
13 using framing_type = decltype(ossia::net::osc_protocol_configuration::framing);
20 auto layout =
new QFormLayout{
this};
21 layout->setContentsMargins(0, 0, 0, 0);
23 m_host =
new QLineEdit(
this);
24 m_host->setText(
"/tmp/ossia.socket");
26 m_framing =
new QComboBox{
this};
27 m_framing->addItems({
"Size prefixing",
"SLIP"});
28 m_framing->setCurrentIndex(1);
30 layout->addRow(tr(
"Path"), m_host);
31 layout->addRow(tr(
"Framing"), m_framing);
34 framing_type framing()
const noexcept
36 return (framing_type)m_framing->currentIndex();
39 ossia::net::unix_stream_configuration settings()
const noexcept
41 ossia::net::unix_stream_configuration conf;
42 conf.fd = m_host->text().toStdString();
47 const ossia::net::osc_protocol_configuration& c,
48 const ossia::net::unix_stream_configuration& conf)
50 m_framing->setCurrentIndex(c.framing);
51 m_host->setText(QString::fromStdString(conf.fd));
55 QComboBox* m_framing{};