|
Yate
|
An endpoint id. More...
#include <yatemgcp.h>
Public Member Functions | |
| MGCPEndpointId () | |
| MGCPEndpointId (const String &src) | |
| MGCPEndpointId (const MGCPEndpointId &value) | |
| MGCPEndpointId (const char *endpoint, const char *host, int port, bool addPort=true) | |
| const String & | id () const |
| const String & | user () const |
| const String & | host () 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 |
An endpoint id.
This class holds an endpoint id in the form "endpoint@host:port"
|
inline |
Constructor
Referenced by MGCPEndpointId(), and MGCPEpInfo::MGCPEpInfo().
|
inline |
Constructor. Construct this endpoint id from a string
| src | The string to construct from |
References set().
|
inline |
Copy constructor
| value | Original Endpoint ID to copy |
References host(), id(), MGCPEndpointId(), port(), and user().
|
inline |
|
inline |
Get the host part of the endpoint URI
Referenced by MGCPEndpoint::append(), MGCPEndpoint::MGCPEndpoint(), MGCPEndpointId(), MGCPEndpointId(), MGCPEpInfo::MGCPEpInfo(), and set().
|
inline |
Get the full id of the endpoint
Referenced by MGCPEndpointId(), MGCPEndpoint::toString(), and MGCPEpInfo::toString().
|
inline |
Get the port used by this endpoint
Referenced by MGCPEndpoint::append(), MGCPEndpoint::MGCPEndpoint(), MGCPEndpointId(), MGCPEndpointId(), MGCPEpInfo::MGCPEpInfo(), and set().
|
inline |
Set the port used by this endpoint
| newPort | The new port used by this endpoint |
| addPort | Add :port at end of id only if port is not zero |
References set().
| void set | ( | const char * | endpoint, |
| const char * | host, | ||
| int | port, | ||
| bool | addPort = true ) |
Set this endpoint id. Convert it to lower case
| 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 |
References host(), and port().
Referenced by MGCPEndpointId(), MGCPEndpointId(), port(), and set().
|
inline |
Set this endpoint id. Convert it to lower case
| src | The string to construct from |
References URI::getHost(), URI::getPort(), URI::getUser(), and set().
|
inline |
Get the user part of the endpoint URI
Referenced by MGCPEndpoint::MGCPEndpoint(), and MGCPEndpointId().
|
inline |
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