reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
repro::GeoProximityTargetSorter Class Reference

#include <GeoProximityTargetSorter.hxx>

Inheritance diagram for repro::GeoProximityTargetSorter:
[legend]

Public Member Functions

 GeoProximityTargetSorter (ProxyConfig &config)
 
virtual ~GeoProximityTargetSorter ()
 
virtual processor_action_t process (RequestContext &)
 
- Public Member Functions inherited from repro::Processor
 Processor (const resip::Data &name, ChainType type=NO_TYPE)
 
virtual ~Processor ()
 
virtual void setChainType (ChainType type)
 
virtual ChainType getChainType () const
 
virtual void setName (const resip::Data &name)
 
virtual const resip::Data & getName () const
 
virtual void pushAddress (const std::vector< short > &address)
 
virtual void pushAddress (const short address)
 
virtual const std::vector< short > & getAddress () const
 

Static Public Member Functions

static bool geoIPLookup (const resip::Tuple &address, double *latitude, double *longitude, resip::Data *country=0, resip::Data *region=0, resip::Data *city=0)
 

Static Public Attributes

static resip::KeyValueStore::Key mGeoTargetSortingDoneKey = Proxy::allocateRequestKeyValueStoreKey()
 

Protected Member Functions

void getClientGeoLocation (const resip::SipMessage &request, double &latitude, double &longitude)
 
void getTargetGeoLocation (const Target &target, double &latitude, double &longitude)
 
double getTargetDistance (const Target &target, double clientLatitude, double clientLongitude)
 
void parseGeoLocationParameter (const resip::Data &parameter, double &latitude, double &longitude)
 
double calculateDistance (double latitude1, double longitude1, double latitude2, double longitude2)
 

Protected Attributes

resip::Data mRUriRegularExpressionData
 
std::regex * mRUriRegularExpression
 
unsigned long mDefaultDistance
 
bool mLoadBalanceEqualDistantTargets
 
- Protected Attributes inherited from repro::Processor
std::vector< short > mAddress
 
ChainType mType
 
resip::Data mName
 

Static Protected Attributes

static void * mGeoIPv4 = 0
 
static void * mGeoIPv6 = 0
 

Additional Inherited Members

- Public Types inherited from repro::Processor
enum  ChainType { NO_TYPE =0 , REQUEST_CHAIN , RESPONSE_CHAIN , TARGET_CHAIN }
 
enum  processor_action_t { Continue , WaitingForEvent , SkipThisChain , SkipAllChains }
 

Detailed Description

Definition at line 71 of file GeoProximityTargetSorter.hxx.

Constructor & Destructor Documentation

◆ GeoProximityTargetSorter()

GeoProximityTargetSorter::GeoProximityTargetSorter ( ProxyConfig &  config)

Definition at line 68 of file GeoProximityTargetSorter.cxx.

◆ ~GeoProximityTargetSorter()

GeoProximityTargetSorter::~GeoProximityTargetSorter ( )
virtual

Definition at line 173 of file GeoProximityTargetSorter.cxx.

Member Function Documentation

◆ calculateDistance()

double GeoProximityTargetSorter::calculateDistance ( double  latitude1,
double  longitude1,
double  latitude2,
double  longitude2 
)
protected

Definition at line 436 of file GeoProximityTargetSorter.cxx.

◆ geoIPLookup()

bool GeoProximityTargetSorter::geoIPLookup ( const resip::Tuple &  address,
double *  latitude,
double *  longitude,
resip::Data *  country = 0,
resip::Data *  region = 0,
resip::Data *  city = 0 
)
static

Definition at line 452 of file GeoProximityTargetSorter.cxx.

◆ getClientGeoLocation()

void GeoProximityTargetSorter::getClientGeoLocation ( const resip::SipMessage &  request,
double &  latitude,
double &  longitude 
)
protected

Definition at line 327 of file GeoProximityTargetSorter.cxx.

◆ getTargetDistance()

double GeoProximityTargetSorter::getTargetDistance ( const Target &  target,
double  clientLatitude,
double  clientLongitude 
)
protected

Definition at line 388 of file GeoProximityTargetSorter.cxx.

◆ getTargetGeoLocation()

void GeoProximityTargetSorter::getTargetGeoLocation ( const Target &  target,
double &  latitude,
double &  longitude 
)
protected

Definition at line 356 of file GeoProximityTargetSorter.cxx.

◆ parseGeoLocationParameter()

void GeoProximityTargetSorter::parseGeoLocationParameter ( const resip::Data &  parameter,
double &  latitude,
double &  longitude 
)
protected

Definition at line 406 of file GeoProximityTargetSorter.cxx.

◆ process()

Processor::processor_action_t GeoProximityTargetSorter::process ( RequestContext &  rc)
virtual

Implements repro::Processor.

Definition at line 195 of file GeoProximityTargetSorter.cxx.

Member Data Documentation

◆ mDefaultDistance

unsigned long repro::GeoProximityTargetSorter::mDefaultDistance
protected

Definition at line 101 of file GeoProximityTargetSorter.hxx.

◆ mGeoIPv4

void * GeoProximityTargetSorter::mGeoIPv4 = 0
staticprotected

Definition at line 108 of file GeoProximityTargetSorter.hxx.

◆ mGeoIPv6

void * GeoProximityTargetSorter::mGeoIPv6 = 0
staticprotected

Definition at line 109 of file GeoProximityTargetSorter.hxx.

◆ mGeoTargetSortingDoneKey

KeyValueStore::Key GeoProximityTargetSorter::mGeoTargetSortingDoneKey = Proxy::allocateRequestKeyValueStoreKey()
static

Definition at line 75 of file GeoProximityTargetSorter.hxx.

◆ mLoadBalanceEqualDistantTargets

bool repro::GeoProximityTargetSorter::mLoadBalanceEqualDistantTargets
protected

Definition at line 102 of file GeoProximityTargetSorter.hxx.

◆ mRUriRegularExpression

std::regex* repro::GeoProximityTargetSorter::mRUriRegularExpression
protected

Definition at line 99 of file GeoProximityTargetSorter.hxx.

◆ mRUriRegularExpressionData

resip::Data repro::GeoProximityTargetSorter::mRUriRegularExpressionData
protected

Definition at line 98 of file GeoProximityTargetSorter.hxx.


The documentation for this class was generated from the following files: