LibInsane
1.0.10
Cross-platform Cross-API Cross-driver Cross-image-scanner Image Scan Library
|
Let the insanity begin !
The end goal of Libinsane is to have a consistent behavior across all scan APIs, all scanners, and all drivers. All the workarounds and weird quirks should be implemented in Libinsane and not the applications using it.
For that purpose, Libinsane provides a bunch of components, each solving a specific problem (working around a bug, normalizing the behavior of drivers, etc).
These components all implement a normalized C API (think object-oriented interface). This API provides a generic way to access scanners and their options and a generic way to scan. In other words, there is a single API implemented by all components. Many of the components actually just wrap other implementations with their own, changing slightly the behavior of the wrapped component.
I think at this point, you get the idea ?
Since most of the components wrap other components, they can be stacked easily each on top of another and can be enabled or disabled easily.
While it may sound like a lot of wrapping and layers, this approach allows modularity. Any workaround or behavior normalization component can be enabled or disabled easily for debugging and clear separation of concerns is ensured.