On Tue, Dec 13, 2016 at 11:16 AM, Morten Nielsen <mn at iter.dk> wrote:

> I don?t see any methods in the C-API code that returns a list of all the
> value keys, or a way to interrogate the value type of a key. It seems to me
> you have to magically know which values will be there, and what type they
> are.
>
>
>
> Am I missing just something here, and there?s a completely different way
> to do this?
>

OCPayloadValue has name, type, and a union for values.

You can iterate over the "OCPayloadValue* values" field of OCRepPayload.
See OCRepPayloadFindAndSetValue in ocpayload.c for an example, sort of.

HTH

Gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161213/5a714738/attachment.html>

Reply via email to