These are used to list the device instances currently known to the driver,
and clear that list.
Drivers that don't necessarily clear their list of instances on every scan,
such as genericdmm, need to provide these to the frontend to keep instance
management sane.
To find a driver or device option by name, the sr_drvopt_name_get() and
sr_devopt_name_get() calls are now available. This was the only reason the
driver and device struct sr_hwcap_option arrays were published.
init() now only does whatever administrative stuff it needs (typically not
much), and returns an error code.
scan() can be called multiple times during the life of an application, and
returns a GSList of struct sr_dev_inst * of devices found during that scan.
The instances are a copy of the ones stored in the driver's own instance
list, to be freed by the caller with g_slist_free() only.
The scan() call can be passed a GSList of struct sr_hwopt *, to direct the
scanning.
A raw file descriptor to poll on is not always available, this patch adds
support for adding a source for a GIOChannel or GPollFD.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
All frontends will have to include <libsigrok/libsigrok.h> from now on.
This header includes proto.h and version.h, both installed from the
distribution into $INCLUDE/libsigrok/ as well.
The only dynamically changed header is now version.h, which has both
libsigrok and libtool compile-time versions in it.