IP to Country database handler. More...
#include <ip2c.h>
Public Types | |
enum | Lookup { LOOKUP_IP, LOOKUP_DIRECT, LOOKUP_DONT } |
Indicate how the IP2C resolution should occur. More... | |
Public Member Functions | |
IP2CCountry | countryInfo (const QString &countryCode) |
IP2CCountry | countryInfoForAddress (const QHostAddress &ipaddress) |
IP2CCountry | countryInfoForIPv4 (unsigned int ipaddress) |
IP2CCountry | countryInfoForServer (const Server &server) |
const QPixmap & | flag (const QString &countryCode) |
bool | hasData () const |
bool | isDataAccessLocked () const |
int | numKnownEntries () const |
void | setDataAccessLockEnabled (bool b) |
void | setRangesDatabase (const QList< IP2CRange > &sortedRanges) |
Sets the IP range database to the list specified. | |
Static Public Member Functions | |
static void | deinstantiate () |
static Lookup | howLookup (const QString &countryCode) |
static IP2C * | instance () |
Public Attributes | |
const QPixmap | flagLan |
const QPixmap | flagLocalhost |
const QPixmap | flagUnknown |
IP to Country database handler.
IP2C class provides an interface for translating IP addresses into country names they are in. Additional methods allow to retrieve country's flag picture for given IP.
enum IP2C::Lookup |
IP2CCountry IP2C::countryInfo | ( | const QString & | countryCode | ) |
IP2CCountry IP2C::countryInfoForIPv4 | ( | unsigned int | ipaddress | ) |
|
static |
|
inline |