ilTapPipe(3X)
NAME
ilTapPipe() − enable a pipe image to be sent down a tap pipe and the main pipe
SYNOPSIS
ilPipe
ilTapPipe (
ilPipe pipe,
unsigned long mustBeZero,
void *mustBeNull);
DESCRIPTION
ilTapPipe() enables the pipe image to be sent down both a newly-created pipe as well as down the main pipe created by ilCreatePipe(). ilTapPipe() returns a new pipe, called a tap pipe, in the IL_PIPE_FORMING state.
The tap pipe must be completed by adding zero or more filters and one consumer before the main pipe is executed by calling ilExecutePipe(). The tap pipe must not be executed by calling ilExecutePipe(); it is implicitly executed when the main pipe is executed. Also, the tap pipe is not destroyed by calling ilDestroyObject(); it is destroyed when the main pipe is destroyed.
Any number of taps may be added to a pipe. Tap pipes may themselves be tapped.
pipe is an existing ilPipe data structure that was created by ilCreatePipe() and has the pipe state IL_PIPE_FORMING. This state means it has a producer and possibly some filters, but no consumer. If the pipe state is not IL_PIPE_FORMING, an IL_ERROR_PIPE_STATE error is declared.
mustBeZero is reserved for future use and must be zero (0).
*mustBeNull is reserved for future use and must be NULL (0).
RETURN VALUE
Upon successful completion, ilTapPipe() returns a tap pipe in the IL_PIPE_FORMING state. If ilTapPipe() fails, NULL (0) is returned.
ERRORS
If the call fails, context->error receives a non-zero error code.
EXAMPLE
The following example creates the new pipe nPipe by tapping off of an existing pipe ePipe.
ilContext context;
ilPipe ePipe;
ilPipe nPipe;
.
.
.
if (!(nPipe = ilTapPipe(ePipe, 0, NULL)))
return (context->error);
AUTHOR
ilTapPipe() was developed by HP.
SEE ALSO
ilCreatePipe(3X), ilExecutePipe(3X), ilerror(3X).
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995