User`s guide
3 Providing Hardware Information
3-10
Your adaptor's getAvailHW() function must provide the engine with the following
information for each device:
• Device ID
• Device name
• Formats supported by the device, including the default format
• Whether or not the device supports device configuration files (also known as camera
files)
Note You can optionally store additional device-specific information in the adaptor
data of an IDeviceInfo object or an IDeviceFormat object. See “Defining Classes
to Hold Device-Specific Information” on page 3-17 for more information.
The following outlines the steps typically performed by a getAvailHW() function. The
figure that follows presents this algorithm in flowchart form.
1
Determine which devices are available through the adaptor. Adaptors typically make
calls to the device's SDK to get this information.
2
For each device found, create an IDeviceInfo object — see “Storing Device
Information” on page 3-11.
a
For each format supported by the device, create an IDeviceFormat object —
see “Storing Format Information” on page 3-12.
b
Add each device format object that you create to the IDeviceInfo object.
3
Add the IDeviceInfo object to the IHardwareInfo object passed to your
getAvailHW() function by the toolbox engine.
4
Repeat this procedure for each device available on the user's system.