2.3.2. Initialization Routines

The following routines check and initialize the Import API. With the exception of cfxImportStatus the first call to the Import API must be either cfxImportInit for communication with CFX, or cfxImportTest for testing the import routine in stand-alone mode.

2.3.2.1. cfxImportStatus

int cfxImportStatus ()

Returns 0 if descriptor is not opened and -1 if not opened for writing. In the normal case, 1 is returned if opened for writing to CFX, and 2 if opened for writing to a file.

2.3.2.2. cfxImportInit

void cfxImportInit ()

Performs initialization to begin communicating with CFX. This routine should be called early on in the import program to let CFX know that data is to be sent. If not called within 60 seconds, CFX will terminate the import process. If called and there is no connection with CFX, then the routine cfxImportTest("/dev/null") (UNIX) or cfxImportTest("null") (Windows) will be called. This routine will be automatically called by most of the API routines if not already called.

There is no return value for this routine. In the case of an error, cfxImportFatal will be called.

2.3.2.3. cfxImportTest

int cfxImportTest (filename)
    char *filename;

This routine allows testing of import program in isolation from CFX by writing data to a file <filename> instead of attempting to write it to the CFX communication channel.

The routine will return the file descriptor of the output file or will terminate with a call to cfxImportFatal on error.