ACE_INet
6.1.0
|
#include <HTTP_Status.h>
Public Types | |
enum | Code { INVALID = -1, HTTP_NONE = 0, HTTP_CONTINUE = 100, HTTP_SWITCHING_PROTOCOLS = 101, HTTP_OK = 200, HTTP_CREATED = 201, HTTP_ACCEPTED = 202, HTTP_NONAUTHORITATIVE = 203, HTTP_NO_CONTENT = 204, HTTP_RESET_CONTENT = 205, HTTP_PARTIAL_CONTENT = 206, HTTP_MULTIPLE_CHOICES = 300, HTTP_MOVED_PERMANENTLY = 301, HTTP_FOUND = 302, HTTP_SEE_OTHER = 303, HTTP_NOT_MODIFIED = 304, HTTP_USEPROXY = 305, HTTP_TEMPORARY_REDIRECT = 307, HTTP_BAD_REQUEST = 400, HTTP_UNAUTHORIZED = 401, HTTP_PAYMENT_REQUIRED = 402, HTTP_FORBIDDEN = 403, HTTP_NOT_FOUND = 404, HTTP_METHOD_NOT_ALLOWED = 405, HTTP_NOT_ACCEPTABLE = 406, HTTP_PROXY_AUTHENTICATION_REQUIRED = 407, HTTP_REQUEST_TIMEOUT = 408, HTTP_CONFLICT = 409, HTTP_GONE = 410, HTTP_LENGTH_REQUIRED = 411, HTTP_PRECONDITION_FAILED = 412, HTTP_REQUESTENTITYTOOLARGE = 413, HTTP_REQUESTURITOOLONG = 414, HTTP_UNSUPPORTEDMEDIATYPE = 415, HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416, HTTP_EXPECTATION_FAILED = 417, HTTP_INTERNAL_SERVER_ERROR = 500, HTTP_NOT_IMPLEMENTED = 501, HTTP_BAD_GATEWAY = 502, HTTP_SERVICE_UNAVAILABLE = 503, HTTP_GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505 } |
Public Member Functions | |
Status () | |
Constructor; sets value to OK. | |
Status (Code status) | |
Constructor; sets corresponding reason. | |
Status (Code status, const ACE_CString &reason) | |
Constructor. | |
Status (const Status &status) | |
Copy constructor. | |
Status & | operator= (const Status &status) |
Copy assignment. | |
void | set_status (Code status) |
Set the status code. | |
void | set_status (const ACE_CString &status) |
Code | get_status () const |
Return the status code. | |
void | set_reason (const ACE_CString &reason) |
Set the reason phrase. | |
const ACE_CString & | get_reason () const |
Return the reason phrase. | |
void | set_status_and_reason (Code status) |
Set the status code and corresponding reason phrase. | |
bool | is_valid () const |
Return true if status code != INVALID. | |
bool | is_ok () const |
Return true if status code == OK. | |
operator bool () const | |
Return true in case of a *valid* HTTP status. | |
bool | operator! () const |
Return true if status code == INVALID. | |
Static Public Member Functions | |
static const ACE_CString & | get_reason (Code status) |
Returns an appropriate reason phrase. | |
Static Public Attributes | |
static const ACE_CString | HTTP_REASON_CONTINUE = "Continue" |
static const ACE_CString | HTTP_REASON_SWITCHING_PROTOCOLS = "Switching Protocols" |
static const ACE_CString | HTTP_REASON_OK = "OK" |
static const ACE_CString | HTTP_REASON_CREATED = "Created" |
static const ACE_CString | HTTP_REASON_ACCEPTED = "Accepted" |
static const ACE_CString | HTTP_REASON_NONAUTHORITATIVE = "Non-Authoritative Information" |
static const ACE_CString | HTTP_REASON_NO_CONTENT = "No Content" |
static const ACE_CString | HTTP_REASON_RESET_CONTENT = "Reset Content" |
static const ACE_CString | HTTP_REASON_PARTIAL_CONTENT = "Partial Content" |
static const ACE_CString | HTTP_REASON_MULTIPLE_CHOICES = "Multiple Choices" |
static const ACE_CString | HTTP_REASON_MOVED_PERMANENTLY = "Moved Permanently" |
static const ACE_CString | HTTP_REASON_FOUND = "Found" |
static const ACE_CString | HTTP_REASON_SEE_OTHER = "See Other" |
static const ACE_CString | HTTP_REASON_NOT_MODIFIED = "Not Modified" |
static const ACE_CString | HTTP_REASON_USEPROXY = "Use Proxy" |
static const ACE_CString | HTTP_REASON_TEMPORARY_REDIRECT = "Temporary Redirect" |
static const ACE_CString | HTTP_REASON_BAD_REQUEST = "Bad Request" |
static const ACE_CString | HTTP_REASON_UNAUTHORIZED = "Unauthorized" |
static const ACE_CString | HTTP_REASON_PAYMENT_REQUIRED = "Payment Required" |
static const ACE_CString | HTTP_REASON_FORBIDDEN = "Forbidden" |
static const ACE_CString | HTTP_REASON_NOT_FOUND = "Not Found" |
static const ACE_CString | HTTP_REASON_METHOD_NOT_ALLOWED = "Method Not Allowed" |
static const ACE_CString | HTTP_REASON_NOT_ACCEPTABLE = "Not Acceptable" |
static const ACE_CString | HTTP_REASON_PROXY_AUTHENTICATION_REQUIRED = "Proxy Authentication Required" |
static const ACE_CString | HTTP_REASON_REQUEST_TIMEOUT = "Request Time-out" |
static const ACE_CString | HTTP_REASON_CONFLICT = "Conflict" |
static const ACE_CString | HTTP_REASON_GONE = "Gone" |
static const ACE_CString | HTTP_REASON_LENGTH_REQUIRED = "Length Required" |
static const ACE_CString | HTTP_REASON_PRECONDITION_FAILED = "Precondition Failed" |
static const ACE_CString | HTTP_REASON_REQUESTENTITYTOOLARGE = "Request Entity Too Large" |
static const ACE_CString | HTTP_REASON_REQUESTURITOOLONG = "Request-URI Too Large" |
static const ACE_CString | HTTP_REASON_UNSUPPORTEDMEDIATYPE = "Unsupported Media Type" |
static const ACE_CString | HTTP_REASON_REQUESTED_RANGE_NOT_SATISFIABLE = "Requested Range Not Satisfiable" |
static const ACE_CString | HTTP_REASON_EXPECTATION_FAILED = "Expectation Failed" |
static const ACE_CString | HTTP_REASON_INTERNAL_SERVER_ERROR = "Internal Server Error" |
static const ACE_CString | HTTP_REASON_NOT_IMPLEMENTED = "Not Implemented" |
static const ACE_CString | HTTP_REASON_BAD_GATEWAY = "Bad Gateway" |
static const ACE_CString | HTTP_REASON_SERVICE_UNAVAILABLE = "Service Unavailable" |
static const ACE_CString | HTTP_REASON_GATEWAY_TIMEOUT = "Gateway Time-out" |
static const ACE_CString | HTTP_REASON_VERSION_NOT_SUPPORTED = "HTTP Version not supported" |
static const ACE_CString | HTTP_REASON_UNKNOWN = "???" |
Private Attributes | |
Code | code_ |
ACE_CString | reason_ |
ACE::HTTP::Status::Status | ( | ) |
Constructor; sets value to OK.
ACE::HTTP::Status::Status | ( | Code | status | ) |
Constructor; sets corresponding reason.
ACE::HTTP::Status::Status | ( | Code | status, |
const ACE_CString & | reason | ||
) |
Constructor.
ACE::HTTP::Status::Status | ( | const Status & | status | ) |
Copy constructor.
const ACE_CString & ACE::HTTP::Status::get_reason | ( | ) | const [inline] |
Return the reason phrase.
const ACE_CString & ACE::HTTP::Status::get_reason | ( | Code | status | ) | [static] |
Returns an appropriate reason phrase.
Status::Code ACE::HTTP::Status::get_status | ( | ) | const [inline] |
Return the status code.
bool ACE::HTTP::Status::is_ok | ( | ) | const [inline] |
Return true if status code == OK.
bool ACE::HTTP::Status::is_valid | ( | ) | const [inline] |
Return true if status code != INVALID.
ACE::HTTP::Status::operator bool | ( | ) | const [inline] |
Return true in case of a *valid* HTTP status.
bool ACE::HTTP::Status::operator! | ( | ) | const [inline] |
Return true if status code == INVALID.
void ACE::HTTP::Status::set_reason | ( | const ACE_CString & | reason | ) | [inline] |
Set the reason phrase.
void ACE::HTTP::Status::set_status | ( | Code | status | ) | [inline] |
Set the status code.
void ACE::HTTP::Status::set_status | ( | const ACE_CString & | status | ) |
Set the status code. String must contain valid numeric code.
void ACE::HTTP::Status::set_status_and_reason | ( | Code | status | ) | [inline] |
Set the status code and corresponding reason phrase.
Code ACE::HTTP::Status::code_ [private] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_ACCEPTED = "Accepted" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_BAD_GATEWAY = "Bad Gateway" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_BAD_REQUEST = "Bad Request" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_CONFLICT = "Conflict" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_CONTINUE = "Continue" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_CREATED = "Created" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_EXPECTATION_FAILED = "Expectation Failed" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_FORBIDDEN = "Forbidden" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_FOUND = "Found" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_GATEWAY_TIMEOUT = "Gateway Time-out" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_GONE = "Gone" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_INTERNAL_SERVER_ERROR = "Internal Server Error" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_LENGTH_REQUIRED = "Length Required" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_METHOD_NOT_ALLOWED = "Method Not Allowed" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_MOVED_PERMANENTLY = "Moved Permanently" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_MULTIPLE_CHOICES = "Multiple Choices" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_NO_CONTENT = "No Content" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_NONAUTHORITATIVE = "Non-Authoritative Information" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_NOT_ACCEPTABLE = "Not Acceptable" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_NOT_FOUND = "Not Found" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_NOT_IMPLEMENTED = "Not Implemented" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_NOT_MODIFIED = "Not Modified" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_OK = "OK" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_PARTIAL_CONTENT = "Partial Content" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_PAYMENT_REQUIRED = "Payment Required" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_PRECONDITION_FAILED = "Precondition Failed" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_PROXY_AUTHENTICATION_REQUIRED = "Proxy Authentication Required" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_REQUEST_TIMEOUT = "Request Time-out" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_REQUESTED_RANGE_NOT_SATISFIABLE = "Requested Range Not Satisfiable" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_REQUESTENTITYTOOLARGE = "Request Entity Too Large" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_REQUESTURITOOLONG = "Request-URI Too Large" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_RESET_CONTENT = "Reset Content" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_SEE_OTHER = "See Other" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_SERVICE_UNAVAILABLE = "Service Unavailable" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_SWITCHING_PROTOCOLS = "Switching Protocols" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_TEMPORARY_REDIRECT = "Temporary Redirect" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_UNAUTHORIZED = "Unauthorized" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_UNKNOWN = "???" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_UNSUPPORTEDMEDIATYPE = "Unsupported Media Type" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_USEPROXY = "Use Proxy" [static] |
const ACE_CString ACE::HTTP::Status::HTTP_REASON_VERSION_NOT_SUPPORTED = "HTTP Version not supported" [static] |
ACE_CString ACE::HTTP::Status::reason_ [private] |