Engine Developer Guide

Engine Developer Guide

Interface Example

Interface Example

As an example of one of the C/C++ interfaces, consider a document processor that accepts file input. The processor must implement the
CMXProcessFile
function, which has the following syntax:
int CMXProcessFile( void * sessionToken, const CMXContext *params, const IFfile_char_t * in_file, int in_len, IFfile_char_t ** out_file, int * out_len, CMXEventReporter * reporter)
The following table describes the
CMXProcessFile
parameters:
Parameter
Description
sessionToken
In: A pointer to the current session.
params
In: A structure containing the properties that the script passes to the component.
in_file
In: The full path of the file upon which the component should operate.
in_len
In: The length, in bytes, of the input file path.
out_file
Out: The full path of a file that contains the output of the component.
out_len
Out: The length, in bytes, of the output file path.
reporter
In: Provides the
report
method, which the component can use to write events to the event log.
Return value
Out: 1 if successful, 0 if unsuccessful.

0 COMMENTS

We’d like to hear from you!