openappsec/components/include/i_geo_location.h
2024-01-31 17:34:53 +00:00

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__