Harlequin RIP SDK

A structure containing callback functions to create BLOBs from named entities. More...

#include "swblobfactory.h"

Data Fields

sw_api_info info
 Version number, name, display name, instance size. More...
 
sw_blob_result(* open_named )(sw_blob_factory_instance *instance, uint8 *name, size_t name_len, int mode, sw_blob_instance **blob)
 Create a new blob data source based upon a named entity. More...
 

Detailed Description

A structure containing callback functions to create BLOBs from named entities.

The RIP will provide the module with these callbacks to create BLOB objects based on named entities. The callbacks will be presented in the form of factory instances, which are subclassed by the RIP to encapsulate parameters for named blob providers.

Field Documentation

◆ info

sw_api_info sw_blob_factory_api::info

Version number, name, display name, instance size.

This is REQUIRED to be the first field.

◆ open_named

sw_blob_result( * sw_blob_factory_api::open_named) ( sw_blob_factory_instance *instance, uint8 *name, size_t name_len, int mode, sw_blob_instance **blob)

Create a new blob data source based upon a named entity.

This method allows modules to request the RIP to provide a data blob from a location named by the module. This is method is typically connected to an implementation that opens named files on the RIP's filesystem.

Parameters
[in]instanceThe sw_blob_factory_instance pointer provided by the RIP.
[in]nameThe name to use to open a blob. The semantics of the name depend on the implementation. For the file system access implementation, the name must be an absolute device name, a device name and file name, or just a file name.
[in]name_lenThe length of the name.
[in]modeAn access mode composed of one of SW_RDWR, SW_WRONLY, or SW_RDONLY, possibly combined with the flags SW_EXCL and SW_FONT defined in swdevice.h.
[out]blobOn a successful exit, an open blob reference is stored here.
Return values
SW_BLOB_OKReturned if the blob was opened, in which case the blob parameter is updated with a reference to the blob. The blob's sw_blob_api::close() call MUST be called when the module no longer needs the blob to allow the RIP to deallocate the resources used by the blob.
SW_BLOB_ERROR_MEMORYReturned if the RIP cannot allocate a blob instance.
SW_BLOB_ERROR_INVALIDReturned if any of the parameters are invalid (e.g., the name, implementation or return pointer are NULL, or the filename is too long).
SW_BLOB_ERROR_ACCESSReturned if the access mode is not supported.

The documentation for this struct was generated from the following file: