D_FIND_DEVICE_TYPE
This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core
D_FIND_DEVICE_TYPE Selector
Parameter: devFindParam * findparam
Note:
By implementing this selector, a plugin implies that it is a multiple‐device output plugin. Single‐device output plugins should implement D_CAPABILITIES
instead. Only one of these selectors should return NOERR
from D_SELECTOR_SUPPORT
.
The RIP calls this selector to retrieve information about output device capabilities and configuration. Since a multiple‐device output plugin may support more than one type of device, the RIP calls D_FIND_DEVICE_TYPE
repeatedly to obtain the full list of device types and associated information.
Figure: Getting a list of device types from a multiple-device output plugin
The RIP continues to call for device types until the f_found
field of the parameter is set to zero. This indicates that the plugin has passed on all the details for the device types it supports.
Note:
Each time the plugin returns a device type description from this call, it should set that device type to be the “current” device type. The RIP expects the plugin to do this, and might follow the call with one or more device‐type‐specific calls intended to refer to that device type. In this respect, D_FIND_DEVICE_TYPE
works like D_SELECT_DEVICE
. See D_SELECT_DEVICE
. For example, a series of D_GET_RASTER_FORMAT
calls can occur immediately after a D_FIND_DEVICE_TYPE
call, as the RIP attempts to get details of valid raster formats for the device type it just learned about.
Note:
D_FIND_DEVICE_TYPE
does not determine which device is being referred to for job output selectors. D_OPEN
through D_CLOSE_ENDJOB
should refer to the device index, which it may store in the deviceFlags[1]
field of the HqnDeviceCapabilities
structure, during this call.
Once the RIP has obtained the list of supported device types, the user can instantiate devices of those types using the Device Manager dialog. When the RIP wants to communicate with a particular device that is, an instance of a supported device type it first selects it with the selector D_SELECT_DEVICE
.
The parameter passed with the selector is described below.
typedef struct devFindParam {
int32 f_startAtBeginning; HqnDeviceCapabilities *f_capabilities; struct DeviceConfig *f_config;
int32 f_found;
int32 f_id;
} devFindParam;
f_startAtBeginning
If non‐zero, the plugin should return the first device from the list of devices. If zero, the plugin should return the next device in the sequence or return with f_found
set to zero when there are no more devices.
f_capabilities
The plugin should copy the capabilities of the device type into the structure pointed to by this field. (See The HqnDeviceCapabilities structure
.) All instances of a particular device type should use a copy of the data from the same HqnDeviceCapabilities
structure.
When a device is instantiated in the Device Manager, a new HqnDeviceCapabilities
structure is created for it, containing the same data as for other devices of that type, with the exception of the name
field. f_capabilities
serves as a default for this structure, with name
being assigned the device name given by the user.
If you construct an identifier scheme for device types, you could store an identifier in one of the spare deviceFlags
elements to help identify the type of the device instance later on, for example in a call to D_SELECT_DEVICE
.
f_config
The plugin should copy the configuration for the device type into the structure pointed to by this field. (See The DeviceConfig structure
.) All instances of a particular device type should use a copy of the data from the same deviceConfig
structure.
f_found
The RIP uses this field to test whether the last device type in the list has been returned. If the plugin is returning valid device type information, it should set this field to a non‐zero value.
When the last device type has been sent, the plugin should respond to the next D_FIND_DEVICE_TYPE
call by setting this field to zero. The RIP understands from this that the list of device types is complete. Note that f_found
is zero on the call after
the last valid format has been returned, not on the last one.
f_id
The plugin should ignore this field. It is obsolete.