Harlequin RIP SDK
Harlequin SDK input queue

This is the Harlequin SDK implementation of the input queue API. More...

Files

file  inputq.h
 Input queue implementation.
 
file  inputq.c
 Input queue implementation.
 
file  inputqprv.h
 Input queue implementation.
 

Data Structures

struct  inputq_entry_t
 An input queue entry, as returned from the queue by inputq_first_entry(). More...
 

Typedefs

typedef struct inputq_entry_t inputq_entry_t
 An input queue entry, as returned from the queue by inputq_first_entry(). More...
 

Functions

inputq_entry_tinputq_first_entry (void)
 Take the first entry off the queue, transferring responsibility for freeing the queue entry to the caller. More...
 
void inputq_free_entry (inputq_entry_t *entry)
 Free an input queue entry returned by inputq_first_entry(). More...
 
HqBool inputq_wait (void)
 Block until the input queue is non-empty or explicitly woken up. More...
 

Detailed Description

This is the Harlequin SDK implementation of the input queue API.

The input queue system is part of the Harlequin RIP SDK. It provides a component for building server mode RIP applications, as well as single job instantiated RIP applications. The input queue system registers an implementation of the inputs API (see Input queue and source API), providing functions to submit jobs to the queue, delete jobs from the queue, and iterate job configurations.

The queue system implemented in the Harlequin SDK provides the support functions to dequeue jobs from the queue and free the job entry; to register and deregister input sources that may add entries to the queue; and to block until the queue has entries; and to unblock threads waiting on queue entries.

The input queue is active after the initial call to SwLeSDKStart() until the call to SwLeSDKEnd(). All operations except for iterating configurations through the inputs API can be performed as soon as the SwLeSDKStart() call returns. Iterating configurations can only be performed when the RIP is booted, between calls to SwLeStart() and SwLeStop().

Input job sources such as command line arguments and hotfolders use the input queue API to submit jobs to the queue. The SwLeProcessInputQueue() function in the SDK will dequeue one job entry using inputq_first_entry() and submit it to the RIP, then delete the entry using inputq_free_entry(). SwLeProcessInputQueue() will normally be called in a loop, processing jobs from the queue until it is empty and then deciding whether to wait for more input by calling inputq_wait() or terminate.

Typedef Documentation

◆ inputq_entry_t

An input queue entry, as returned from the queue by inputq_first_entry().

This structure must be freed by calling inputq_free_entry() when the caller has finished with it.

Function Documentation

◆ inputq_first_entry()

inputq_entry_t* inputq_first_entry ( void  )

Take the first entry off the queue, transferring responsibility for freeing the queue entry to the caller.

Returns
The first entry on the input queue, or NULL if there are no entries.

◆ inputq_free_entry()

void inputq_free_entry ( inputq_entry_t entry)

Free an input queue entry returned by inputq_first_entry().

Parameters
entryThe queue entry to free.

◆ inputq_wait()

HqBool inputq_wait ( void  )

Block until the input queue is non-empty or explicitly woken up.

Return values
TRUEThe input queue is not empty. Note that it is possible that the queue entries may be deleted by the time the queue is checked, so callers must be careful to test the return value of inputq_first_entry() on the next call.
FALSEIf the input queue does not have entries, and there are no persistent sources of input registered, then this function does not block waiting for new input jobs, but returns FALSE immediately.