Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::WebErrorPageReply Class Reference

Static error page reply. More...

#include <>>

Inheritance diagram for fawkes::WebErrorPageReply:

List of all members.

Public Member Functions

 WebErrorPageReply (response_code_t error_code, const char *format=NULL,...)
 Constructor.
- Public Member Functions inherited from fawkes::WebPageReply
 WebPageReply (std::string title, std::string page="")
 Constructor.
virtual const std::string & body ()
 Get body.
virtual std::string::size_type body_length ()
 Get length of body.
virtual void pack ()
 Pack the data.
virtual void pack (std::string active_baseurl, WebPageHeaderGenerator *headergen, WebPageFooterGenerator *footergen)
 Pack web page reply.
virtual void set_html_header (std::string h)
 Set HTML header text.
- Public Member Functions inherited from fawkes::StaticWebReply
 StaticWebReply (response_code_t code, std::string body="")
 Constructor.
void append_body (const char *format,...)
 Append to body.
StaticWebReplyoperator+= (std::string text)
 Append simple text line.
- Public Member Functions inherited from fawkes::WebReply
 WebReply (response_code_t code)
 Constructor.
virtual ~WebReply ()
 Destructor.
response_code_t code () const
 Get response code.
void add_header (std::string header, std::string content)
 Add a HTTP header.
void add_header (std::string header_string)
 Add a HTTP header.
const HeaderMapheaders () const
 get headers.

Additional Inherited Members

- Protected Member Functions inherited from fawkes::WebPageReply
 WebPageReply (response_code_t code)
 Base constructor.
- Protected Attributes inherited from fawkes::WebPageReply
std::string _title
 Title of the page.
- Protected Attributes inherited from fawkes::StaticWebReply
std::string _body
 Body of the reply.

Detailed Description

Static error page reply.

Shows a simple error page based on the given code.

Author:
Tim Niemueller

Definition at line 33 of file error_reply.h.


Constructor & Destructor Documentation

fawkes::WebErrorPageReply::WebErrorPageReply ( response_code_t  code,
const char *  format = NULL,
  ... 
)

Constructor.

Parameters:
codeerror code, must be a 4xx or 5xx HTTP code
formatformat for additional error message, use format as known from sprintf.

Definition at line 45 of file error_reply.cpp.

References fawkes::StaticWebReply::_body, fawkes::WebPageReply::_title, fawkes::WebReply::HTTP_BAD_GATEWAY, fawkes::WebReply::HTTP_BAD_REQUEST, fawkes::WebReply::HTTP_BANDWIDTH_LIMIT_EXCEEDED, fawkes::WebReply::HTTP_CONFLICT, fawkes::WebReply::HTTP_EXPECTATION_FAILED, fawkes::WebReply::HTTP_FAILED_DEPENDENCY, fawkes::WebReply::HTTP_FORBIDDEN, fawkes::WebReply::HTTP_GATEWAY_TIMEOUT, fawkes::WebReply::HTTP_GONE, fawkes::WebReply::HTTP_HTTP_VERSION_NOT_SUPPORTED, fawkes::WebReply::HTTP_INSUFFICIENT_STORAGE, fawkes::WebReply::HTTP_INTERNAL_SERVER_ERROR, fawkes::WebReply::HTTP_LENGTH_REQUIRED, fawkes::WebReply::HTTP_LOCKED, fawkes::WebReply::HTTP_METHOD_NOT_ACCEPTABLE, fawkes::WebReply::HTTP_METHOD_NOT_ALLOWED, fawkes::WebReply::HTTP_NOT_EXTENDED, fawkes::WebReply::HTTP_NOT_FOUND, fawkes::WebReply::HTTP_NOT_IMPLEMENTED, fawkes::WebReply::HTTP_PAYMENT_REQUIRED, fawkes::WebReply::HTTP_PRECONDITION_FAILED, fawkes::WebReply::HTTP_PROXY_AUTHENTICATION_REQUIRED, fawkes::WebReply::HTTP_REQUEST_ENTITY_TOO_LARGE, fawkes::WebReply::HTTP_REQUEST_TIMEOUT, fawkes::WebReply::HTTP_REQUEST_URI_TOO_LONG, fawkes::WebReply::HTTP_REQUESTED_RANGE_NOT_SATISFIABLE, fawkes::WebReply::HTTP_RETRY_WITH, fawkes::WebReply::HTTP_SERVICE_UNAVAILABLE, fawkes::WebReply::HTTP_UNAUTHORIZED, fawkes::WebReply::HTTP_UNORDERED_COLLECTION, fawkes::WebReply::HTTP_UNPROCESSABLE_ENTITY, fawkes::WebReply::HTTP_UNSUPPORTED_MEDIA_TYPE, fawkes::WebReply::HTTP_UPGRADE_REQUIRED, and fawkes::WebReply::HTTP_VARIANT_ALSO_NEGOTIATES.


The documentation for this class was generated from the following files: