24 : QObject(parent), _useLocalDatabase(false)
31 #if defined(USE_GEOIP) 32 return _database.open(databaseFile);
48 if (! countryCode.isEmpty()) {
60 #if defined(USE_GEOIP) 62 return _database.recordByAddr(ip);
64 QString countryCode = _database.countryCodeByAddr(ip);
65 if (! countryCode.isEmpty()) {
80 #if defined(USE_GEOIP) void setUseLocalDatabase(bool useLocalDatabase)
GeoIpRecord resolveUsingTor(const QHostAddress &ip)
QString ipToCountry(const QHostAddress &ip, QString *errmsg=0)
static QString countryName(const QString &countryCode)
bool setLocalDatabase(const QString &databaseFile)
static TorControl * torControl()
GeoIpRecord resolve(const QHostAddress &ip)
GeoIpResolver(QObject *parent=0)
GeoIpRecord resolveUsingLocalDatabase(const QHostAddress &ip)
static QPair< float, float > countryLocation(const QString &countryCode)