GeoIpResponse Class Reference

#include <geoipresponse.h>

List of all members.

Public Member Functions

 GeoIpResponse (QByteArray response)
int statusCode ()
QString statusMessage ()
QList< GeoIpgeoIps ()

Private Member Functions

QByteArray decodeChunked (QByteArray chunked)

Private Attributes

QHttpResponseHeader _header
QList< GeoIp_geoips


Detailed Description

Definition at line 27 of file geoipresponse.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jul 7 17:00:57 2009 for Vidalia by  doxygen 1.4.7