#include <geoipresponse.h>
Public Member Functions | |
GeoIpResponse (QByteArray response) | |
int | statusCode () |
QString | statusMessage () |
QList< GeoIp > | geoIps () |
Private Member Functions | |
QByteArray | decodeChunked (QByteArray chunked) |
Private Attributes | |
QHttpResponseHeader | _header |
QList< GeoIp > | _geoips |
Definition at line 38 of file geoipresponse.h.
GeoIpResponse::GeoIpResponse | ( | QByteArray | response | ) |
Constructor. Parses the response data for an HTTP header and Geo IP information.
Constructor. Parses the response data for an HTTP header and Geo IP information.
Definition at line 43 of file geoipresponse.cpp.
References _geoips, _header, decodeChunked(), GeoIp::fromString(), ZlibByteArray::Gzip, GeoIp::isEmpty(), ZlibByteArray::None, STATUS_CONTENT_ENCODING_ERR, STATUS_HTTP_OK, STATUS_TRANSFER_ENCODING_ERR, ZlibByteArray::uncompress(), and ZlibByteArray::Zlib.
int GeoIpResponse::statusCode | ( | ) | [inline] |
Returns the HTTP status code for this response.
Definition at line 46 of file geoipresponse.h.
References _header.
Referenced by GeoIpResolver::disconnected().
QString GeoIpResponse::statusMessage | ( | ) | [inline] |
Returns the HTTP status message for this response.
Definition at line 48 of file geoipresponse.h.
References _header.
Referenced by GeoIpResolver::disconnected().
QList<GeoIp> GeoIpResponse::geoIps | ( | ) | [inline] |
Returns the Geo IP information contained in this response.
Definition at line 50 of file geoipresponse.h.
References _geoips.
Referenced by GeoIpResolver::disconnected().
QByteArray GeoIpResponse::decodeChunked | ( | QByteArray | chunked | ) | [private] |
Decodes a chunked transfer encoding. Returns the unchunked result on success, or an empty QByteArray if decoding fails.
Definition at line 108 of file geoipresponse.cpp.
Referenced by GeoIpResponse().
QHttpResponseHeader GeoIpResponse::_header [private] |
HTTP response header.
Definition at line 57 of file geoipresponse.h.
Referenced by GeoIpResponse(), statusCode(), and statusMessage().
QList<GeoIp> GeoIpResponse::_geoips [private] |
Geo IP information in this response.
Definition at line 58 of file geoipresponse.h.
Referenced by GeoIpResponse(), and geoIps().