mirror of
https://github.com/openappsec/openappsec.git
synced 2025-06-28 16:41:02 +03:00
23 lines
539 B
C++
23 lines
539 B
C++
#ifndef __I_GEO_LOCATION_H__
|
|
#define __I_GEO_LOCATION_H__
|
|
|
|
#include <string>
|
|
|
|
#include "connkey.h"
|
|
#include "enum_array.h"
|
|
|
|
|
|
class I_GeoLocation
|
|
{
|
|
public:
|
|
enum class GeoLocationField { COUNTRY_NAME, COUNTRY_CODE, CONTINENT_NAME, CONTINENT_CODE, COUNT };
|
|
|
|
virtual Maybe<EnumArray<GeoLocationField, std::string>> lookupLocation(const std::string &ip) = 0;
|
|
virtual Maybe<EnumArray<GeoLocationField, std::string>> lookupLocation(const IPAddr &ip) = 0;
|
|
|
|
protected:
|
|
virtual ~I_GeoLocation() {}
|
|
};
|
|
|
|
#endif // __I_GEO_LOCATION_H__
|