The aim of the detect library is hardware detection. It's the engine of HardDrake. Without this library HardDrake isn't able to detect anything!
The detect library uses many different detection methods. Most frequently it uses the system information provided by the kernel in the /proc filesystem. It uses some parts of the Superprobe code (videocard probing program shipped with X) for videocard detection and of libisapnp (from isapnptools) for ISA PNP devices. The informations obtained are linked together with informations from device lookup tables to increase the value of the results.
Because of many new devices (e.g. USB), detect is still under heavy construction. To stay in sync you need to update regularly.
For information about new detect versions, check the HardDrake news site.
The detect library is distributed independantly. So you can use it in any program that needs hardware autodetection. For example, it can be used for your own distribution (it was first developed for this). That's why many people contribute to its development.
The detect library is shipped with the detect program. This tool will generate a file report.txt in the current directory.
Open it and you'll see all devices detected. detect calls all functions provided by the detect library.
Note: You need to be root to call the detect program.
If you find a bug in a program linked with the detect library, try out the detect program to see if the bug is inherent to the library or to the linked program.