libonion
|
#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_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. |
typedef struct onion_handler_path_data_t onion_handler_path_data |
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 | ) |
References onion_handler_path_data_t::inside, onion_handler_t::onion_handler_free(), onion_low_free(), and onion_handler_path_data_t::path.
Referenced by onion_handler_path().
int onion_handler_path_handler | ( | onion_handler_path_data * | d, |
onion_request * | request, | ||
onion_response * | response | ||
) |