IP to Country database handler. More...
#include <ip2c.h>
Inheritance diagram for IP2C:Classes | |
| class | IP2CData |
Public Member Functions | |
| void | appendEntryToDatabase (const IP2CData &entry) |
| Adds new country entry to the database. More... | |
| const QPixmap & | flag (const QString &countryShortName) |
| bool | isDataAccessLocked () const |
| const IP2CData & | lookupIP (unsigned int ipaddress) |
| const IP2CData & | lookupIP (const QHostAddress &ipaddress) |
| int | numKnownEntries () const |
| IP2CCountryInfo | obtainCountryInfo (unsigned int ipaddress) |
| IP2CCountryInfo | obtainCountryInfo (const QHostAddress &ipaddress) |
| void | setDataAccessLockEnabled (bool b) |
| void | setDatabase (const QList< IP2CData > &sortedCountryData) |
| Sets database contents to the list specified. More... | |
Static Public Member Functions | |
| static void | deinstantiate () |
| static IP2C * | instance () |
Public Attributes | |
| const QPixmap | flagLan |
| const QPixmap | flagLocalhost |
| const QPixmap | flagUnknown |
Protected Member Functions | |
| bool | isLANAddress (unsigned ipv4Address) |
| bool | isLocalhostAddress (unsigned ipv4Address) |
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.
| void IP2C::appendEntryToDatabase | ( | const IP2CData & | entry | ) |
| const IP2C::IP2CData & IP2C::lookupIP | ( | unsigned int | ipaddress | ) |
| IP2CCountryInfo IP2C::obtainCountryInfo | ( | unsigned int | ipaddress | ) |
|
inline |