#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 27 of file geoipresponse.h.
GeoIpResponse::GeoIpResponse | ( | QByteArray | response | ) |
Constructor. Parses the response data for an HTTP header and Geo IP information.
Definition at line 32 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.
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 97 of file geoipresponse.cpp.
Referenced by GeoIpResponse().
QList<GeoIp> GeoIpResponse::geoIps | ( | ) | [inline] |
Returns the Geo IP information contained in this response.
Definition at line 39 of file geoipresponse.h.
References _geoips.
Referenced by GeoIpResolver::disconnected().
int GeoIpResponse::statusCode | ( | ) | [inline] |
Returns the HTTP status code for this response.
Definition at line 35 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 37 of file geoipresponse.h.
References _header.
Referenced by GeoIpResolver::disconnected().
QList<GeoIp> GeoIpResponse::_geoips [private] |
Geo IP information in this response.
Definition at line 47 of file geoipresponse.h.
Referenced by GeoIpResponse(), and geoIps().
QHttpResponseHeader GeoIpResponse::_header [private] |
HTTP response header.
Definition at line 46 of file geoipresponse.h.
Referenced by GeoIpResponse(), statusCode(), and statusMessage().