GeoIpCacheItem Class Reference

#include <geoipcacheitem.h>

List of all members.

Public Member Functions

 GeoIpCacheItem ()
 GeoIpCacheItem (GeoIp geoip, QDateTime timestamp)
QHostAddress ip () const
GeoIp geoip () const
bool isExpired () const
QString toString () const

Static Public Member Functions

static GeoIpCacheItem fromString (QString cacheString)

Private Attributes

GeoIp _geoip
QDateTime _timestamp


Detailed Description

Definition at line 36 of file geoipcacheitem.h.


Constructor & Destructor Documentation

GeoIpCacheItem::GeoIpCacheItem (  )  [inline]

Default constructor

Definition at line 40 of file geoipcacheitem.h.

Referenced by fromString().

GeoIpCacheItem::GeoIpCacheItem ( GeoIp  geoip,
QDateTime  timestamp 
)

Constructor.

Definition at line 34 of file geoipcacheitem.cpp.

References _geoip, _timestamp, and geoip().


Member Function Documentation

QHostAddress GeoIpCacheItem::ip (  )  const [inline]

Returns the IP of this cache item.

Definition at line 45 of file geoipcacheitem.h.

References _geoip, and GeoIp::ip().

GeoIp GeoIpCacheItem::geoip (  )  const [inline]

Returns the cached GeoIp object.

Definition at line 47 of file geoipcacheitem.h.

References _geoip.

Referenced by fromString(), and GeoIpCacheItem().

bool GeoIpCacheItem::isExpired (  )  const

Returns true if this cache item is expired.

Definition at line 67 of file geoipcacheitem.cpp.

References _timestamp.

Referenced by GeoIpCache::saveToDisk().

QString GeoIpCacheItem::toString (  )  const

Returns a string representing the contents of this cache item, suitable for writing to disk.

Definition at line 45 of file geoipcacheitem.cpp.

References _geoip, _timestamp, and GeoIp::toString().

Referenced by GeoIpCache::saveToDisk().

GeoIpCacheItem GeoIpCacheItem::fromString ( QString  cacheString  )  [static]

Returns a GeoIpCacheItem from a string as read from the cache that was written to disk.

Definition at line 55 of file geoipcacheitem.cpp.

References GeoIp::fromString(), geoip(), and GeoIpCacheItem().

Referenced by GeoIpCache::loadFromDisk().


Member Data Documentation

GeoIp GeoIpCacheItem::_geoip [private]

Cached GeoIp item.

Definition at line 59 of file geoipcacheitem.h.

Referenced by geoip(), GeoIpCacheItem(), ip(), and toString().

QDateTime GeoIpCacheItem::_timestamp [private]

Time this item was cached.

Definition at line 60 of file geoipcacheitem.h.

Referenced by GeoIpCacheItem(), isExpired(), and toString().


The documentation for this class was generated from the following files:
Generated on Mon Oct 23 20:08:16 2006 for Vidalia by  doxygen 1.5.0