#pragma once #include "http.h" typedef enum Handler_ret_t{ HR_HANDLED, HR_NEXT, HR_ERROR, } Handler_ret_t; typedef Handler_ret_t (*Handler)(int sock,Headers *headers); typedef void (*register_callback_t)(const char *name,Handler handler); // Override this in the plugin; it will be called from the main application. // It should call the callback with the plugin's handler. // Note that the plugin's handler will be called from multiple threads, so ensure that it is thread-safe. void plugin_register_yourself(register_callback_t callback);