IGETLINE_GetLine() is a synchronous call. It returns what information is available at present. If it needs to buffer more data before it can determine where the next line ends, it will return IGETLINE_WAIT, and the caller will have to try again later. After receiving a return code of IGETLINE_WAIT, the caller can use the IGETLINE_Peekable() member function to be notified of when IGETLINE_GetLine() should be tried again. In all other cases, IGETLINE_GetLine() should be called without waiting on IGETLINE_Peekable() so that it can examine any buffered data and determine whether the caller should wait on IGETLINE_Peekable().
int32 IGETLINE_GetLine(IGetLine * pIGetLine, GetLine * pline, int32 nTypeEOL);
- One of the following exit codes, describing the reason GetLine returned:
- IGETLINE_WAIT, if the line is not yet complete; try again. In this case,
- pline describes the available data (the incomplete line), but the data is
- not processed. Callers should use IGETLINE_Peekable() to be schedule the
- next call to IGETLINE_GetLine(). In all other cases, the data described
- in pline is consumed, and IGETLINE_Peekable() should not be used.
- IGETLINE_Readable() or ISHELL_Resume() can be used instead.
- IGETLINE_CRLF, the line was terminated at a two-character EOL (CRLF).
- IGETLINE_CR, the line was terminated at a single-character EOL (CR) [not implemented].
- IGETLINE_LF, the line was terminated at a single-character EOL (LF).
- IGETLINE_END, the line ended at end of stream; no EOL seen.
- IGETLINE_ERROR, the line ended at ERROR; no EOL seen.
- IGETLINE_FULL, the data was limited by buffer size; no EOL seen; remainder to follow.