#include <webforwardpage.h>
Inheritance diagram for WebForwardPage:


Public Member Functions | |
| DECLSPEC | WebForwardPage (const char *uri, const char *location) |
| DECLSPEC void | setLocation (const char *l) |
| virtual DECLSPEC int | send (WebSrvClient *client, Uint32 &responsecode) |
This class forwards a request to another location by sending a "Moved Permanently" response to the browser.
| WebForwardPage::WebForwardPage | ( | const char * | uri, | |
| const char * | location | |||
| ) |
Constructor. Automatically registers itself to be accessible by HTTP requests.
| uri | the URI (after the IP address) of the page; when a HTTP request like http://IP-addr"uri" arrives, the function send() will be called. uri has to start with a '/' (slash)! | |
| location | the URI of the file, where the browser should look for the page. Can be relative, like "index.html", or absolute, like "http://192.168.0.1/websrv/index.html". |
| void WebForwardPage::setLocation | ( | const char * | l | ) |
Changes the location of the aim.
| l | the URL to the aim. Can be absolute (i.e. "http://192.168.0.1/websrv/index.html") or relative (i.e. "index.html") |
| int WebForwardPage::send | ( | WebSrvClient * | client, | |
| Uint32 & | responsecode | |||
| ) | [virtual] |
Use this function in derived classes to respond on requests.
| client | the connected client, that is requesting | |
| responsecode | the return-code of the page, sent to the client (i.e. 200, when OK; 400 on error...) has to be assigned to this variable |
Reimplemented from WebPage.
1.5.1