| 1 | /********************************************************************\ |
|---|
| 2 | * This program is free software; you can redistribute it and/or * |
|---|
| 3 | * modify it under the terms of the GNU General Public License as * |
|---|
| 4 | * published by the Free Software Foundation; either version 2 of * |
|---|
| 5 | * the License, or (at your option) any later version. * |
|---|
| 6 | * * |
|---|
| 7 | * This program is distributed in the hope that it will be useful, * |
|---|
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
|---|
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
|---|
| 10 | * GNU General Public License for more details. * |
|---|
| 11 | * * |
|---|
| 12 | * You should have received a copy of the GNU General Public License* |
|---|
| 13 | * along with this program; if not, contact: * |
|---|
| 14 | * * |
|---|
| 15 | * Free Software Foundation Voice: +1-617-542-5942 * |
|---|
| 16 | * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * |
|---|
| 17 | * Boston, MA 02111-1307, USA gnu@gnu.org * |
|---|
| 18 | * * |
|---|
| 19 | \********************************************************************/ |
|---|
| 20 | |
|---|
| 21 | /* $Id$ */ |
|---|
| 22 | /** @file http.h |
|---|
| 23 | @brief HTTP IO functions |
|---|
| 24 | @author Copyright (C) 2004 Philippe April <papril777@yahoo.com> |
|---|
| 25 | */ |
|---|
| 26 | |
|---|
| 27 | #ifndef _HTTP_H_ |
|---|
| 28 | #define _HTTP_H_ |
|---|
| 29 | |
|---|
| 30 | #include "httpd.h" |
|---|
| 31 | |
|---|
| 32 | /**@brief Callback for libhttpd, main entry point for captive portal */ |
|---|
| 33 | void http_callback_404(httpd *webserver, request *r); |
|---|
| 34 | /**@brief Callback for libhttpd */ |
|---|
| 35 | void http_callback_wifidog(httpd *webserver, request *r); |
|---|
| 36 | /**@brief Callback for libhttpd */ |
|---|
| 37 | void http_callback_about(httpd *webserver, request *r); |
|---|
| 38 | /**@brief Callback for libhttpd */ |
|---|
| 39 | void http_callback_status(httpd *webserver, request *r); |
|---|
| 40 | /**@brief Callback for libhttpd, main entry point post login for auth confirmation */ |
|---|
| 41 | void http_callback_auth(httpd *webserver, request *r); |
|---|
| 42 | |
|---|
| 43 | /** @brief Sends a HTML page to web browser */ |
|---|
| 44 | void send_http_page(request *r, const char *title, const char* message); |
|---|
| 45 | |
|---|
| 46 | /** @brief Sends a redirect to the web browser */ |
|---|
| 47 | void http_send_redirect(request *r, char *url, char *text); |
|---|
| 48 | /** @brief Convenience function to redirect the web browser to the authe server */ |
|---|
| 49 | void http_send_redirect_to_auth(request *r, char *urlFragment, char *text); |
|---|
| 50 | #endif /* _HTTP_H_ */ |
|---|