idnode: allow property list to be written without an object

This allows the "class" to be written out without the need for an
instanatiation. Useful for auto-generating grid layouts for a given
object type.
This commit is contained in:
Adam Sutton 2013-06-04 11:12:32 +01:00
parent f9b765fcc4
commit a59d888c9e

View file

@ -162,7 +162,8 @@ prop_add_params_to_msg(void *obj, const property_t *p, htsmsg_t *msg)
htsmsg_add_str(m, "type", val2str(p[i].type, typetab) ?: "unknown");
if (p->rdonly)
htsmsg_add_u32(m, "rdonly", 1);
prop_read_value(obj, p+i, m, "value");
if (obj)
prop_read_value(obj, p+i, m, "value");
htsmsg_add_msg(msg, NULL, m);
}
}