#include <GeoIpResponse.h>
Public Member Functions | |
GeoIpResponse (const QByteArray &response) | |
int | statusCode () const |
QString | statusMessage () const |
QByteArray | content () const |
Private Member Functions | |
QByteArray | decodeChunked (const QByteArray &chunked) |
Private Attributes | |
QHttpResponseHeader | _header |
QByteArray | _content |
Definition at line 29 of file GeoIpResponse.h.
GeoIpResponse::GeoIpResponse | ( | const QByteArray & | response | ) |
Constructor. Parses the response data for an HTTP header and Geo IP information.
Definition at line 35 of file GeoIpResponse.cpp.
References _content, _header, decodeChunked(), ZlibByteArray::Gzip, ZlibByteArray::None, STATUS_CONTENT_ENCODING_ERR, STATUS_HTTP_OK, STATUS_TRANSFER_ENCODING_ERR, ZlibByteArray::uncompress(), and ZlibByteArray::Zlib.
QByteArray GeoIpResponse::content | ( | ) | const |
Returns the Geo IP information contained in this response.
Definition at line 133 of file GeoIpResponse.cpp.
References _content.
Referenced by GeoIpResolver::disconnected().
QByteArray GeoIpResponse::decodeChunked | ( | const QByteArray & | chunked | ) | [private] |
Decodes a chunked transfer encoding. Returns the unchunked result on success, or an empty QByteArray if decoding fails.
Definition at line 90 of file GeoIpResponse.cpp.
Referenced by GeoIpResponse().
int GeoIpResponse::statusCode | ( | ) | const |
Returns the HTTP status code for this response.
Definition at line 121 of file GeoIpResponse.cpp.
References _header.
Referenced by GeoIpResolver::disconnected().
QString GeoIpResponse::statusMessage | ( | ) | const |
Returns the HTTP status message for this response.
Definition at line 127 of file GeoIpResponse.cpp.
References _header.
Referenced by GeoIpResolver::disconnected().
QByteArray GeoIpResponse::_content [private] |
Geo IP information in this response.
Definition at line 54 of file GeoIpResponse.h.
Referenced by content(), and GeoIpResponse().
QHttpResponseHeader GeoIpResponse::_header [private] |
HTTP response header.
Definition at line 53 of file GeoIpResponse.h.
Referenced by GeoIpResponse(), statusCode(), and statusMessage().