ossia / libossia

A modern C++, cross-environment distributed object model for creative coding and interaction scoring
https://ossia.io
GNU Lesser General Public License v3.0
204 stars 33 forks source link

OSCQuery interface displays value even with access mode 'Set' #661

Open x37v opened 3 years ago

x37v commented 3 years ago

I'm using the cpp98 interface. I have a node that should have 'Set' only access. I set it up like below.

auto n = root.create_string("cmd");
n.set_description("command handler");
n.set_access(opp::access_mode::Set);

Unfortunately this still displays the last string set in the json http response (without query strings), and the cmd?VALUE query string also returns the value.

The proposal indicates about value:

If a query is performed for the "VALUE" attribute, but the "ACCESS" attribute indicates that the OSC method isn't readable, the query should return a 204 (no content/inappropriate request).

ossia claims to support both Access and Value

jcelerier commented 3 years ago

Thanks for the report. I guess we could have a "strict" mode by default which would respect the spec - the reason it's done like this is because in practice, lots of users asked fro the ability to see things anyways.

jcelerier commented 3 years ago

paging @bltzr @jln- @avilleret for opinions

x37v commented 3 years ago

Thanks for the report. I guess we could have a "strict" mode by default which would respect the spec - the reason it's done like this is because in practice, lots of users asked fro the ability to see things anyways.

Huh, I guess I don't get why those users don't just use the Bi mode? Maybe ossia doesn't allow you to LISTEN to a Set?

avilleret commented 3 years ago

this seems related to https://github.com/ossia/libossia/issues/504

afaic since lots of people are complaining we are not strictly following the specs regarding access mode, I suggest to change to strictly follow the specs, even if it breaks some code somewhere