Yate
MGCPEpInfo Class Reference

Remote endpoint info class. More...

#include <yatemgcp.h>

Inheritance diagram for MGCPEpInfo:
MGCPEndpointId GenObject

Public Member Functions

 MGCPEpInfo (const char *endpoint, const char *host, int port, bool addPort=true)
 
virtual const StringtoString () const
 
const SocketAddraddress () const
 
const SocketAddraddress ()
 
void address (const SocketAddr &addr)
 
- Public Member Functions inherited from MGCPEndpointId
 MGCPEndpointId ()
 
 MGCPEndpointId (const String &src)
 
 MGCPEndpointId (const MGCPEndpointId &value)
 
 MGCPEndpointId (const char *endpoint, const char *host, int port, bool addPort=true)
 
const Stringid () const
 
const Stringuser () const
 
const Stringhost () const
 
int port () const
 
void port (int newPort, bool addPort=true)
 
void set (const char *endpoint, const char *host, int port, bool addPort=true)
 
void set (const String &src)
 
bool valid () const
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Public Attributes

String alias
 

Additional Inherited Members

- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Detailed Description

Remote endpoint info class.

This class holds data about a remote endpoint (id and address)

Constructor & Destructor Documentation

◆ MGCPEpInfo()

MGCPEpInfo ( const char * endpoint,
const char * host,
int port,
bool addPort = true )
inline

Constructor. Construct this endpoint info

Parameters
endpointThe endpoint part of the endpoint's id
hostThe IP address of this endpoint
portThe port used to send data to this endpoint
addPortAdd :port at end of id only if port is not zero

References MGCPEndpointId::host(), MGCPEndpointId::MGCPEndpointId(), and MGCPEndpointId::port().

Member Function Documentation

◆ address() [1/3]

const SocketAddr & address ( )

Retrieve the address for this endpoint information, resolve name if needed

Returns
Address and port of this endpoint info

◆ address() [2/3]

const SocketAddr & address ( ) const
inline

Retrieve the current address for this endpoint information

Returns
Address and port of this endpoint info

◆ address() [3/3]

void address ( const SocketAddr & addr)
inline

Set a new socket address in the endpoint info

Parameters
addrNew address and port to set in the endpoint

◆ toString()

virtual const String & toString ( ) const
inlinevirtual

Get a string representation of this object

Returns
The endpoint's id

Reimplemented from GenObject.

References MGCPEndpointId::id().

Member Data Documentation

◆ alias

String alias

An alias name of the remote endpoint, may be empty


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