libkate 0.4.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
High level API

## Functions
int | kate_high_decode_init (kate_state *k)
int | kate_high_decode_packetin (kate_state *k, kate_packet *kp, kate_const kate_event **ev)
int | kate_high_decode_clear (kate_state *k)
const kate_comment * | kate_high_decode_get_comments (kate_state *k)

## Detailed Description

## Function Documentation

int kate_high_decode_clear | ( | kate_state * | k | ) |

Clears a previously initialized kate_state structure

Parameters

  k | the kate_state structure to clear

Returns
  0 success
  KATE_E_* error

References kate_clear(), KATE_E_INIT, and KATE_E_INVALID_PARAMETER.

const kate_comment* kate_high_decode_get_comments | ( | kate_state * | k | ) |

Retrieves the comments structure for the given state

Parameters

  k | the kate_state structure to retrieve comments from

Returns
  a pointer to the comments structure (NULL if error or not found)

int kate_high_decode_init | ( | kate_state * | k | ) |

Initializes a kate_state for high level decoding.

Parameters

  k | the kate_state structure to initialize

Returns
  0 success
  1 success, and we're at end of stream
  KATE_E_* error

References kate_comment_init(), KATE_E_INVALID_PARAMETER, KATE_E_OUT_OF_MEMORY, kate_info_clear(), kate_info_init(), and kate_state::ki.

int kate_high_decode_packetin | ( | kate_state * | k,
|  | kate_packet * | kp,
|  | kate_const kate_event ** | ev
| ) |  |

Processes a packet and outputs an event if possible

Parameters

  k | the kate_state structure representing the stream to decode
  kp | the packet to decode
  ev | where to place a pointer to an event if there we just decoded one

Returns
  0 success
  KATE_E_* error

References kate_decode_eventout(), kate_decode_headerin(), kate_decode_packetin(), KATE_E_INIT, and KATE_E_INVALID_PARAMETER.