mirror of
https://github.com/openappsec/openappsec.git
synced 2025-10-01 03:57:44 +03:00
Jan_31_2024-Dev
This commit is contained in:
22
components/include/i_geo_location.h
Normal file
22
components/include/i_geo_location.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#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__
|
Reference in New Issue
Block a user