106 ,
public Nano::Observer
115 const QString& name()
const noexcept;
120 virtual DeviceResources usedResources()
const noexcept;
122 virtual void disconnect();
123 virtual bool reconnect() = 0;
126 virtual bool connected()
const;
127 W_INVOKABLE(connected)
150 void setListening(
const State::Address&,
bool,
bool reportCurrentValue =
true);
151 void addToListening(
const std::vector<State::Address>&);
153 std::vector<State::Address> listening()
const;
155 std::vector<State::Address> listeningRequests()
const;
157 void restoreListening();
160 virtual void updateAddress(
164 void sendMessage(
const State::Address& addr,
const ossia::value& v);
170 bool isLogging()
const;
171 void setLogging(DeviceLogging);
173 virtual ossia::net::device_base* getDevice()
const = 0;
175 virtual bool isLearning()
const;
176 virtual void setLearning(
bool);
178 virtual QMimeData* mimeData()
const;
179 virtual void setupContextMenu(QMenu&)
const;
181 void nodeCreated(
const ossia::net::node_base&);
182 void nodeRemoving(
const ossia::net::node_base&);
183 void nodeRenamed(
const ossia::net::node_base&, std::string);
184 void addressCreated(
const ossia::net::parameter_base&);
185 void addressUpdated(
const ossia::net::node_base&, ossia::string_view key);
186 void addressRemoved(
const ossia::net::parameter_base& addr);
188 Nano::Signal<void(
const State::Address&,
const ossia::value&)> valueUpdated;
193 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, pathAdded, arg_1)
197 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, pathUpdated, arg_1, arg_2)
199 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, pathRemoved, arg_1)
202 void namespaceUpdated() E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, namespaceUpdated)
205 void deviceChanged(ossia::net::device_base* old_dev, ossia::net::device_base* new_dev)
206 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, deviceChanged, old_dev, new_dev)
211 void deviceClearing(ossia::net::device_base* dev)
212 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, deviceClearing, dev)
216 void logInbound(const QString& arg_1) const
217 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, logInbound, arg_1)
218 void logOutbound(const QString& arg_1) const
219 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, logOutbound, arg_1)
221 void connectionChanged(
bool arg_1) const
222 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, connectionChanged, arg_1)
228 using callback_pair =
std::pair<
229 ossia::net::parameter_base*,
230 ossia::callback_container<ossia::value_callback>::iterator>;
231 score::hash_map<
State::Address, callback_pair> m_callbacks;
233 void removeListening_impl(ossia::net::node_base& node,
State::Address addr);
234 void removeListening_impl(
235 ossia::net::node_base& node,
State::Address addr,
std::vector<
State::Address>&);
236 void renameListening_impl(const
State::Address& parent, const QString& newName);
237 void setLogging_impl(DeviceLogging) const;
238 void enableCallbacks();
239 void disableCallbacks();
245 bool listen_impl(const
State::Address& addr,
bool b,
bool report = true);
249 ossia::hash_set<
State::Address> m_listeningRequests;
250 DeviceLogging m_logging = DeviceLogging::LogNothing;
251 bool m_callbacksEnabled = false;
283 case ossia::parameter_type::MESSAGE:
284 case ossia::parameter_type::AUDIO:
286 case ossia::parameter_type::MIDI:
287 case ossia::parameter_type::TEXTURE:
288 case ossia::parameter_type::GEOMETRY:
bool hasEditableValue(ossia::parameter_type t) noexcept
Whether a parameter of that kind carries a value the explorer can show and edit.
Definition DeviceInterface.hpp:279
constexpr bool carries(NodeKind set, NodeKind wanted) noexcept
Whether every kind in wanted is in set.
Definition DeviceInterface.hpp:74