Allow C++ applications to have the input format automatically detected,
and get a corresponding InputFormat instance. This makes the format match
logic available to PulseView.
Split the data type detection from the actual data type conversion in
the ConfigKey::parse_string() method. Allow the Option class to re-use
the public ConfigKey method, to share the maximum amount of data type
conversion code for both Driver and InputFormat option specs.
This is the least intrusive yet most reliable and consistent approach in
the libsigrok C++ binding that allows applications to support driver scan
and input file format options from command line arguments.
This is more specific and prevents any potential issues e.g. when
multiple distro packages might ship with a generic file like
sigrok-logo-notext.png that's supposed to be installed in the same place.
The Input::send() method allocated glib strings and copied input data,
but only released the glib string container and leaked the actual string
content. This led to leaks in the size of the verbatim input file, which
is especially wasteful for uncompressed textual representations.
This fixes bug #976.
The new methods wrap the new libsigrok C API helper functions and eliminate
the need to pass complex types back to the user and wrap them with SWIG.
Fixes bugs #479 and #480.
The source file enum.hpp was not found when not building in the source
tree. Also, extraction of the brief description did not work correctly
when there was additional XML markup inside the <para> element.
std::default_delete<> is originally defined as struct, not class.
This does not really make much of a difference, but some compilers
complain when the struct/class tag is not consistent across all
declarations of the type.
Make the Python and Java bindings use the same set of preprocessor
macros for the SWIG parsing stage, taken from a make variable. Add
G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS to that set.
Writing to an object through a pointer of incompatible type is
really evil. Even when the data size matches, it is still a
violation of strict aliasing rules.
Replace all instances by direct casts of the value, without the
unnecessary and dangerous indirection.