axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
int axl_stream_inspect_several ( axlStream stream,
int  chunk_num,

Allows to perform several, not excluyen inspect operations, over the given stream.

Here is an example:

1 if (axl_stream_inspect_several (stream, // the stream
2  2, // two chunks to recognize
3  "or", 2, // first chunk and its length
4  "||", 2) > 0) { // second chunk and its length
5  // chunk matched!!
6 }
streamThe stream where the operation will be performed.
chunk_numThe chunk number to inspect.
The function returns the following values:
  • 0: if no chunk is found inside the given stream, according to the provided chunks.
  • N: is returned to denote that the Nth chunk was found.
  • -1: is returned if no more stream is left to satisfy the operation.
  • -2: means that the parameters received are wrong either because stream is NULL or any other parameter.

References axl_return_val_if_fail, and axl_stream_inspect().