This commit allows the library user to change class, subclass and
protocol values inside net derivated functions. This is needed by
Windows 10 users using RNDIS function with the native driver.
This adds interface name required for "Feature Descriptors". If
specified, we can assume that a Feature Descriptor with the
interface name of the specified string is understood by the
kernel (e.g. interface.rndis).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
[Allow multiple os_desc ifaces per funciton]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
We have two configure options related to libconfig:
1) --disable-gadget-schemes
2) --without-libconfig
Option #1 means that libusbgx itself should be compiled without gadget
schemes support. Option #2 means that everything what requires
libconfig should be turned off. So option #2 is wider than #1 as
libconfig us used also in our testing program.
To fix this meaning let's use HAS_GADGET_SCHEMES inside library source
code to determine if we should use libconfig or not and HAS_LIBCONFIG
inside our tests source code.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Those callback can be used by specific function type to allocate
and then free more memory than in raw usbg_function structure.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Adding support for a new function type was quite complicated.
Moreover the main library source fail was growing realy fast.
As a solution introduce internal OO API for defining function.
Thanks to this support for each function may be placed in
a separate file.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>