libonion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Functions
opack.h File Reference
#include <onion/types.h>

Typedefs

typedef void(* onion_opack_renderer )(onion_response *res)

Functions

onion_handleronion_handler_opack (const char *path, onion_opack_renderer opack, unsigned int length)
 Creates a opak handler.

Typedef Documentation

typedef void(* onion_opack_renderer)(onion_response *res)

Function Documentation

onion_handler* onion_handler_opack ( const char *  path,
onion_opack_renderer  render,
unsigned int  length 
)

Creates a opak handler.

Creates a opak handler.

If on the inside level nobody answers, it just returns NULL, so ->next can answer.

Parameters
pathPath of the current data, for example /. It is a normal string; no regular expressions are allowed.
renderFunction to call to render the response.
lengthLenght of the data, or 0 if unknown. Needed to keep alive.

References onion_handler_opack_data_t::length, onion_handler_t::onion_handler_new(), onion_handler_opack_delete(), onion_handler_opack_handler(), onion_low_malloc(), onion_low_strdup(), onion_handler_opack_data_t::path, and onion_handler_opack_data_t::render.