# class MGCPEndpointId | An endpoint id. More...
Full name | `TelEngine::MGCPEndpointId`
Definition | `#include <libs/ymgcp/yatemgcp.h>`
Inherited by | MGCPEndpoint, MGCPEpInfo
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline MGCPEndpointId ()
- inline MGCPEndpointId (const String& src)
- inline MGCPEndpointId (const MGCPEndpointId& value)
- inline MGCPEndpointId (const char* endpoint, const char* host, int port, bool addPort = true)
- inline const String& id () const
- inline const String& user () const
- inline const String& host () const
- inline int port () const
- inline void port (int newPort, bool addPort = true)
- void set (const char* endpoint, const char* host, int port, bool addPort = true)
- inline void set (const String& src)
- inline bool valid () const

## Detailed Description

This class holds an endpoint id in the form "endpoint@host:port"

inline MGCPEndpointId () | ### MGCPEndpointId

Constructor

inline MGCPEndpointId (const String& src) | ### MGCPEndpointId

Constructor. Construct this endpoint id from a string

Parameters:

src | The string to construct from

inline MGCPEndpointId (const MGCPEndpointId& value) | ### MGCPEndpointId

Copy constructor

Parameters:

value | Original Endpoint ID to copy

inline MGCPEndpointId (const char* endpoint, const char* host, int port, bool addPort = true) | ### MGCPEndpointId

Constructor. Construct this endpoint id

Parameters:

endpoint | The user part of the endpoint's URI
host | The IP address of the endpoint's URI
port | The port used by the endpoint to receive data
addPort | Add :port at end of id only if port is not zero

inline const String& id () | ### id

[const]

Get the full id of the endpoint

Returns: The full id of the endpoint

inline const String& user () | ### user

[const]

Get the user part of the endpoint URI

Returns: The user part of the endpoint URI

inline const String& host () | ### host

[const]

Get the host part of the endpoint URI

Returns: The host part of the endpoint URI

inline int port () | ### port

[const]

Get the port used by this endpoint

Returns: The port used by this endpoint

inline void port (int newPort, bool addPort = true) | ### port

Set the port used by this endpoint

Parameters:

newPort | The new port used by this endpoint
addPort | Add :port at end of id only if port is not zero

void set (const char* endpoint, const char* host, int port, bool addPort = true) | ### set

Set this endpoint id. Convert it to lower case

Parameters:

endpoint | The user part of the endpoint's URI
host | The IP address of the endpoint's URI
port | The port used by the endpoint to receive data
addPort | Add :port at end of id only if port is not zero

inline void set (const String& src) | ### set

Set this endpoint id. Convert it to lower case

Parameters:

src | The string to construct from

inline bool valid () | ### valid

[const]

Check if this is a valid endpoint id as defined in RFC 3435 3.2.1.3. It is considerred valid if the user and host part lengths are between 1 and 255 and the port is not 0

Returns: True if this is a valid endpoint id

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.