MGCPEndpoint Class Reference

An MGCP endpoint. More...

#include <yatemgcp.h>

Inheritance diagram for MGCPEndpoint:

RefObject MGCPEndpointId GenObject

List of all members.

Public Member Functions

 MGCPEndpoint (MGCPEngine *engine, const char *user, const char *host, int port)
virtual ~MGCPEndpoint ()
virtual const StringtoString () const
MGCPEngineengine ()
MGCPEpInfoappend (const char *endpoint, const char *host, int port=0)
void clear ()
MGCPEpInfofind (const char *epId)
MGCPEpInfopeer ()


Detailed Description

An MGCP endpoint.

This class holds a local MGCP endpoint (either gateway or call agent) along with its remote peer(s). If the engine owning this endpoint is an MGCP gateway, only 1 remote peer (Call Agent) is allowed


Constructor & Destructor Documentation

MGCPEndpoint ( MGCPEngine engine,
const char *  user,
const char *  host,
int  port 
)

Constructor. Construct this endpoint. Append itself to the engine's list. The endpoint's id will be created from the received user and engine's address

Parameters:
engine The engine owning this endpoint
user The user part of the endpoint's id
host The host part of the endpoint's id
port The port part of the endpoint's id

virtual ~MGCPEndpoint (  )  [virtual]

Destructor. Remove itself from engine's list


Member Function Documentation

virtual const String& toString (  )  const [inline, virtual]

Get a string representation of this endpoint

Returns:
A string representation of this endpoint

Reimplemented from GenObject.

References MGCPEndpointId::id().

MGCPEngine* engine (  )  [inline]

Get the engine owning this endpoint

Returns:
The engine owning this endpoint

MGCPEpInfo* append ( const char *  endpoint,
const char *  host,
int  port = 0 
)

Append info about a remote endpoint controlled by or controlling this endpoint. If the engine owning this endpoint is an MGCP gateway, only 1 remote peer (Call Agent) is allowed

Parameters:
endpoint The endpoint part of the remote endpoint's id
host The IP address of the remote endpoint
port The port used to send data to this endpoint. Set to 0 to set it to the default port defined by the protocol and the opposite of the engine's mode
Returns:
Valid MGCPEpInfo pointer or 0 if the data wasn't added

void clear (  )  [inline]

Clear the list or remote endpoints

MGCPEpInfo* find ( const char *  epId  ) 

Find the info object associated with a remote peer

Parameters:
epId The remote endpoint's id to find
Returns:
MGCPEpInfo pointer or 0 if not found

MGCPEpInfo* peer (  ) 

Find the info object associated with an unique remote peer

Returns:
MGCPEpInfo pointer or 0 if not exactly one peer


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

Generated on Mon Aug 11 16:17:54 2008 for Yate by  doxygen 1.5.6