OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
qml_protocols.hpp
1#pragma once
2
3#include <ossia/detail/config.hpp>
4
5#include <ossia/network/context_functions.hpp>
6
7#include <QJSValue>
8#include <QObject>
9#include <QVariant>
10
11#include <verdigris>
12
13namespace ossia::qt
14{
15
16class OSSIA_EXPORT qml_protocols : public QObject
17{
18 W_OBJECT(qml_protocols)
19public:
20 explicit qml_protocols(ossia::net::network_context_ptr ctx, QObject* parent);
21 ~qml_protocols() override;
22
23 // All sockets have:
24 // onOpen
25 // onClose
26 // onError
27
28 // write
29 QObject* outboundUDP(QVariant config);
30 W_SLOT(outboundUDP)
31
32 // onMessage
33 QObject* inboundUDP(QVariant config);
34 W_SLOT(inboundUDP)
35
36 // write
37 QObject* outboundUnixDatagram(QVariant config);
38 W_SLOT(outboundUnixDatagram)
39
40 // onMessage
41 QObject* inboundUnixDatagram(QVariant config);
42 W_SLOT(inboundUnixDatagram)
43
44 // write
45 QObject* outboundUnixStream(QVariant config);
46 W_SLOT(outboundUnixStream)
47
48 // onMessage
49 QObject* inboundUnixStream(QVariant config);
50 W_SLOT(inboundUnixStream)
51
52 // write
53 // onBytes
54 QObject* outboundTCP(QVariant config);
55 W_SLOT(outboundTCP)
56
57 // onConnection
58 // -> onBytes
59 // -> write
60 QObject* inboundTCP(QVariant config);
61 W_SLOT(inboundTCP)
62
63 // write
64 // onBytes
65 QObject* outboundWS(QVariant config);
66 W_SLOT(outboundWS)
67
68 // onConnection
69 // -> onBytes
70 // -> onTextMessage
71 // -> onBinaryMessage
72 QObject* inboundWS(QVariant config);
73 W_SLOT(inboundWS)
74
75 void http(QUrl url, QJSValue func, QString verb);
76 W_SLOT(http);
77
78 QJSValue inboundMIDIDevices();
79 W_SLOT(inboundMIDIDevices)
80 QJSValue inboundUMPDevices();
81 W_SLOT(inboundUMPDevices)
82
83 QObject* inboundMIDI(QJSValue config);
84 W_SLOT(inboundMIDI)
85 QObject* inboundUMP(QJSValue config);
86 W_SLOT(inboundUMP)
87
88 QJSValue outboundMIDIDevices();
89 W_SLOT(outboundMIDIDevices)
90 QJSValue outboundUMPDevices();
91 W_SLOT(outboundUMPDevices)
92
93 QObject* outboundMIDI(QJSValue config);
94 W_SLOT(outboundMIDI)
95 QObject* outboundUMP(QJSValue config);
96 W_SLOT(outboundUMP)
97
98 QObject* serial(QVariant config);
99 W_SLOT(serial)
100
101private:
102 ossia::net::network_context_ptr context;
103};
104
105}
Definition qml_device.cpp:43