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
bool isEmpty () const
QString toString () const

Static Public Member Functions

static GeoIpCacheItem fromString (QString cacheString)

Private Attributes

GeoIp _geoip
QDateTime _timestamp


Detailed Description

Definition at line 25 of file geoipcacheitem.h.


Constructor & Destructor Documentation

GeoIpCacheItem::GeoIpCacheItem (  )  [inline]

Default constructor

Definition at line 29 of file geoipcacheitem.h.

Referenced by fromString().

GeoIpCacheItem::GeoIpCacheItem ( GeoIp  geoip,
QDateTime  timestamp 
)

Constructor.

Definition at line 23 of file geoipcacheitem.cpp.

References _geoip, _timestamp, and geoip().


Member Function Documentation

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 57 of file geoipcacheitem.cpp.

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

Referenced by GeoIpCache::loadFromDisk().

GeoIp GeoIpCacheItem::geoip (  )  const [inline]

Returns the cached GeoIp object.

Definition at line 36 of file geoipcacheitem.h.

References _geoip.

Referenced by fromString(), and GeoIpCacheItem().

QHostAddress GeoIpCacheItem::ip (  )  const [inline]

Returns the IP of this cache item.

Definition at line 34 of file geoipcacheitem.h.

References _geoip, and GeoIp::ip().

bool GeoIpCacheItem::isEmpty (  )  const

Returns true if this cache item is empty and invalid.

Definition at line 32 of file geoipcacheitem.cpp.

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

bool GeoIpCacheItem::isExpired (  )  const

Returns true if this cache item is expired.

Definition at line 77 of file geoipcacheitem.cpp.

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

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 42 of file geoipcacheitem.cpp.

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

Referenced by GeoIpCache::saveToDisk().


Member Data Documentation

GeoIp GeoIpCacheItem::_geoip [private]

Cached GeoIp item.

Definition at line 50 of file geoipcacheitem.h.

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

QDateTime GeoIpCacheItem::_timestamp [private]

Time this item was cached.

Definition at line 51 of file geoipcacheitem.h.

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


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