libonion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
path.c File Reference
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <regex.h>
#include <stdio.h>
#include <onion/handler.h>
#include <onion/response.h>
#include <onion/log.h>
#include <onion/low.h>
#include "static.h"

Data Structures

struct  onion_handler_path_data_t

Typedefs

typedef struct
onion_handler_path_data_t 
onion_handler_path_data

Functions

int onion_handler_path_handler (onion_handler_path_data *d, onion_request *request, onion_response *response)
void onion_handler_path_delete (void *data)
onion_handleronion_handler_path (const char *path, onion_handler *inside_level)
 Creates an path handler. If the path matches the regex, it reomves that from the regexp and goes to the inside_level.

Typedef Documentation

Function Documentation

onion_handler* onion_handler_path ( const char *  path,
onion_handler inside_level 
)

Creates an path handler. If the path matches the regex, it reomves that from the regexp and goes to the inside_level.

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

References onion_handler_path_data_t::inside, onion_handler_t::onion_handler_new(), onion_handler_path_delete(), onion_handler_path_handler(), onion_low_malloc(), and onion_handler_path_data_t::path.

void onion_handler_path_delete ( void *  data)
int onion_handler_path_handler ( onion_handler_path_data d,
onion_request request,
onion_response response 
)