Commit 69be9281 authored by Hanspeter Portner's avatar Hanspeter Portner

Squashed 'props.lv2/' changes from 622ce3e..2ff0549

2ff0549 extend last commit.
86a55df introduce hidden properties.

git-subtree-dir: props.lv2
git-subtree-split: 2ff05496fe29522d6a2fee8d2ba79d51a397cfd9
parent 6831d747
...@@ -53,6 +53,7 @@ struct _props_def_t { ...@@ -53,6 +53,7 @@ struct _props_def_t {
const char *type; const char *type;
const char *access; const char *access;
size_t offset; size_t offset;
bool hidden;
uint32_t max_size; uint32_t max_size;
props_event_cb_t event_cb; props_event_cb_t event_cb;
...@@ -378,7 +379,7 @@ _props_impl_restore(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -378,7 +379,7 @@ _props_impl_restore(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
_props_impl_unlock(impl, PROP_STATE_NONE); _props_impl_unlock(impl, PROP_STATE_NONE);
if(*ref) if(*ref && !impl->def->hidden)
*ref = _props_patch_set(props, forge, frames, impl, 0); *ref = _props_patch_set(props, forge, frames, impl, 0);
const props_def_t *def = impl->def; const props_def_t *def = impl->def;
...@@ -604,7 +605,7 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -604,7 +605,7 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
{ {
props_impl_t *impl = &props->impls[i]; props_impl_t *impl = &props->impls[i];
if(*ref) if(*ref && !impl->def->hidden)
*ref = _props_patch_set(props, forge, frames, impl, sequence_num); *ref = _props_patch_set(props, forge, frames, impl, sequence_num);
} }
...@@ -616,18 +617,21 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -616,18 +617,21 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
if(impl) if(impl)
{ {
*ref = _props_patch_set(props, forge, frames, impl, sequence_num); if(*ref && !impl->def->hidden)
*ref = _props_patch_set(props, forge, frames, impl, sequence_num);
return 1; return 1;
} }
else if(sequence_num) else if(sequence_num)
{ {
*ref = _props_patch_error(props, forge, frames, sequence_num); if(*ref)
*ref = _props_patch_error(props, forge, frames, sequence_num);
} }
} }
else if(sequence_num) else if(sequence_num)
{ {
*ref = _props_patch_error(props, forge, frames, sequence_num); if(*ref)
*ref = _props_patch_error(props, forge, frames, sequence_num);
} }
} }
else if(obj->body.otype == props->urid.patch_set) else if(obj->body.otype == props->urid.patch_set)
...@@ -662,7 +666,8 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -662,7 +666,8 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
{ {
if(sequence_num) if(sequence_num)
{ {
*ref = _props_patch_error(props, forge, frames, sequence_num); if(ref)
*ref = _props_patch_error(props, forge, frames, sequence_num);
} }
return 0; return 0;
...@@ -680,14 +685,16 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -680,14 +685,16 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
if(sequence_num) if(sequence_num)
{ {
*ref = _props_patch_ack(props, forge, frames, sequence_num); if(*ref)
*ref = _props_patch_ack(props, forge, frames, sequence_num);
} }
return 1; return 1;
} }
else if(sequence_num) else if(sequence_num)
{ {
*ref = _props_patch_error(props, forge, frames, sequence_num); if(*ref)
*ref = _props_patch_error(props, forge, frames, sequence_num);
} }
} }
else if(obj->body.otype == props->urid.patch_put) else if(obj->body.otype == props->urid.patch_put)
...@@ -720,7 +727,8 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -720,7 +727,8 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
{ {
if(sequence_num) if(sequence_num)
{ {
*ref = _props_patch_error(props, forge, frames, sequence_num); if(*ref)
*ref = _props_patch_error(props, forge, frames, sequence_num);
} }
return 0; return 0;
...@@ -745,7 +753,8 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -745,7 +753,8 @@ props_advance(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
if(sequence_num) if(sequence_num)
{ {
*ref = _props_patch_ack(props, forge, frames, sequence_num); if(*ref)
*ref = _props_patch_ack(props, forge, frames, sequence_num);
} }
return 1; return 1;
...@@ -764,7 +773,7 @@ props_set(props_t *props, LV2_Atom_Forge *forge, uint32_t frames, ...@@ -764,7 +773,7 @@ props_set(props_t *props, LV2_Atom_Forge *forge, uint32_t frames,
{ {
_props_impl_stash(props, impl); _props_impl_stash(props, impl);
if(*ref) //TODO use patch:sequenceNumber if(*ref && !impl->def->hidden) //TODO use patch:sequenceNumber
*ref = _props_patch_set(props, forge, frames, impl, 0); *ref = _props_patch_set(props, forge, frames, impl, 0);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment