iio_context_add_device, which will create a iio_device and add it to the context;
iio_device_add_channel, which will create a iio_channel and add it to the device;
The functions iio_{context,device,channel}_add_attr to add attributes to contexts/devices/channels are now backend API
iio_create_context_from_backend now takes a few extra parameters that will be used to create the iio_context.
With these changes, the XML backend was updated to be fully implemented on top of the public API (be it iio.h or iio-backend.h) and does not use iio-private.h anymore.
In theory, the local backend could do that too but it's a lot more work (due to how it currently creates the context).
The code should be considered very experimental, it was not thoroughly tested.
Modify/add functions:
iio_context_add_device
, which will create aiio_device
and add it to the context;iio_device_add_channel
, which will create aiio_channel
and add it to the device;iio_{context,device,channel}_add_attr
to add attributes to contexts/devices/channels are now backend APIiio_create_context_from_backend
now takes a few extra parameters that will be used to create the iio_context.With these changes, the XML backend was updated to be fully implemented on top of the public API (be it iio.h or iio-backend.h) and does not use iio-private.h anymore.
In theory, the local backend could do that too but it's a lot more work (due to how it currently creates the context).
The code should be considered very experimental, it was not thoroughly tested.