|
Fawkes API
Fawkes Development Version
|
Web request dispatcher. More...
#include "request_dispatcher.h"
Public Member Functions | |
| WebRequestDispatcher (WebUrlManager *url_manager, WebPageHeaderGenerator *headergen=0, WebPageFooterGenerator *footergen=0) | |
| Constructor. | |
| ~WebRequestDispatcher () | |
| Destructor. | |
| void | setup_basic_auth (const char *realm, WebUserVerifier *verifier) |
| Setup basic authentication. | |
Static Public Member Functions | |
| static int | process_request_cb (void *callback_data, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **session_data) |
| Process request callback for libmicrohttpd. | |
Web request dispatcher.
Takes web request received via a webserver run by libmicrohttpd and dispatches pages to registered WebRequestProcessor instances or gives a 404 error if no processor was registered for the given base url.
Definition at line 45 of file request_dispatcher.h.
| fawkes::WebRequestDispatcher::WebRequestDispatcher | ( | WebUrlManager * | url_manager, |
| WebPageHeaderGenerator * | headergen = 0, |
||
| WebPageFooterGenerator * | footergen = 0 |
||
| ) |
Constructor.
| url_manager | URL manager to use for URL to processor mapping |
| headergen | page header generator |
| footergen | page footer generator |
Definition at line 68 of file request_dispatcher.cpp.
| fawkes::WebRequestDispatcher::~WebRequestDispatcher | ( | ) |
Destructor.
Definition at line 80 of file request_dispatcher.cpp.
|
static |
Process request callback for libmicrohttpd.
| callback_data | instance of WebRequestDispatcher to call |
| connection | libmicrohttpd connection instance |
| url | URL, may contain escape sequences |
| method | HTTP method |
| version | HTTP version |
| upload_data | uploaded data |
| upload_data_size | size of upload_data parameter |
| session_data | session data pointer |
Definition at line 122 of file request_dispatcher.cpp.
| void fawkes::WebRequestDispatcher::setup_basic_auth | ( | const char * | realm, |
| WebUserVerifier * | verifier | ||
| ) |
Setup basic authentication.
| realm | authentication realm to display to the user. If NULL basic authentication will be disabled. |
| verifier | verifier to use for checking credentials. If NULL basic authentication will be disabled. |
Definition at line 93 of file request_dispatcher.cpp.