<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Yate: MGCPEndpoint Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceTelEngine.html">TelEngine</a>::<a class="el" href="classTelEngine_1_1MGCPEndpoint.html">MGCPEndpoint</a> </div> </div> <div class="contents"> <h1>MGCPEndpoint Class Reference</h1><!-- doxytag: class="TelEngine::MGCPEndpoint" --><!-- doxytag: inherits="TelEngine::RefObject,TelEngine::MGCPEndpointId" -->An MGCP endpoint. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="yatemgcp_8h-source.html">yatemgcp.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for MGCPEndpoint:</div> <div class="dynsection"> <p><center><img src="classTelEngine_1_1MGCPEndpoint.png" usemap="#MGCPEndpoint_map" border="0" alt=""></center> <map name="MGCPEndpoint_map"> <area href="classTelEngine_1_1RefObject.html" alt="RefObject" shape="rect" coords="0,56,108,80"> <area href="classTelEngine_1_1MGCPEndpointId.html" alt="MGCPEndpointId" shape="rect" coords="118,56,226,80"> <area href="classTelEngine_1_1GenObject.html" alt="GenObject" shape="rect" coords="0,0,108,24"> </map> </div> <p> <a href="classTelEngine_1_1MGCPEndpoint-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#9ce51bfdb21bb89b9326e794b83f9065">MGCPEndpoint</a> (<a class="el" href="classTelEngine_1_1MGCPEngine.html">MGCPEngine</a> *engine, const char *user, const char *host, int port)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#392a5b9f98d7e4937092f38c7e0facf1">~MGCPEndpoint</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classTelEngine_1_1String.html">String</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#4a7bd56fb99593ace9379ed699f2719c">toString</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1MGCPEngine.html">MGCPEngine</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#bebc8e9f0ca79286f4b1e6b98b8d706d">engine</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1MGCPEpInfo.html">MGCPEpInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#d098a30cd7d2de10963a8c8e5eb71fb0">append</a> (const char *endpoint, const char *host, int port=0)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#c8bb3912a3ce86b15842e79d0b421204">clear</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1MGCPEpInfo.html">MGCPEpInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#6ef81bc7a5056972788580bea0604159">find</a> (const char *epId)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1MGCPEpInfo.html">MGCPEpInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html#9fd8ef18eabd8bc35cb626ad946f0ad3">peer</a> ()</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> An MGCP endpoint. <p> 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 <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="9ce51bfdb21bb89b9326e794b83f9065"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::MGCPEndpoint" ref="9ce51bfdb21bb89b9326e794b83f9065" args="(MGCPEngine *engine, const char *user, const char *host, int port)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1MGCPEndpoint.html">MGCPEndpoint</a> </td> <td>(</td> <td class="paramtype"><a class="el" href="classTelEngine_1_1MGCPEngine.html">MGCPEngine</a> * </td> <td class="paramname"> <em>engine</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>user</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>host</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>port</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> 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 <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>engine</em> </td><td>The engine owning this endpoint </td></tr> <tr><td valign="top"></td><td valign="top"><em>user</em> </td><td>The user part of the endpoint's id </td></tr> <tr><td valign="top"></td><td valign="top"><em>host</em> </td><td>The host part of the endpoint's id </td></tr> <tr><td valign="top"></td><td valign="top"><em>port</em> </td><td>The port part of the endpoint's id </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="392a5b9f98d7e4937092f38c7e0facf1"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::~MGCPEndpoint" ref="392a5b9f98d7e4937092f38c7e0facf1" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual ~<a class="el" href="classTelEngine_1_1MGCPEndpoint.html">MGCPEndpoint</a> </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor. Remove itself from engine's list </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="d098a30cd7d2de10963a8c8e5eb71fb0"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::append" ref="d098a30cd7d2de10963a8c8e5eb71fb0" args="(const char *endpoint, const char *host, int port=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1MGCPEpInfo.html">MGCPEpInfo</a>* append </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>endpoint</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>host</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>port</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> 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 <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>endpoint</em> </td><td>The endpoint part of the remote endpoint's id </td></tr> <tr><td valign="top"></td><td valign="top"><em>host</em> </td><td>The IP address of the remote endpoint </td></tr> <tr><td valign="top"></td><td valign="top"><em>port</em> </td><td>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 </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Valid <a class="el" href="classTelEngine_1_1MGCPEpInfo.html" title="Remote endpoint info class.">MGCPEpInfo</a> pointer or 0 if the data wasn't added </dd></dl> </div> </div><p> <a class="anchor" name="c8bb3912a3ce86b15842e79d0b421204"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::clear" ref="c8bb3912a3ce86b15842e79d0b421204" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void clear </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Clear the list or remote endpoints </div> </div><p> <a class="anchor" name="bebc8e9f0ca79286f4b1e6b98b8d706d"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::engine" ref="bebc8e9f0ca79286f4b1e6b98b8d706d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1MGCPEngine.html">MGCPEngine</a>* engine </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the engine owning this endpoint <dl class="return" compact><dt><b>Returns:</b></dt><dd>The engine owning this endpoint </dd></dl> </div> </div><p> <a class="anchor" name="6ef81bc7a5056972788580bea0604159"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::find" ref="6ef81bc7a5056972788580bea0604159" args="(const char *epId)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1MGCPEpInfo.html">MGCPEpInfo</a>* find </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>epId</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Find the info object associated with a remote peer <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>epId</em> </td><td>The remote endpoint's id to find </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classTelEngine_1_1MGCPEpInfo.html" title="Remote endpoint info class.">MGCPEpInfo</a> pointer or 0 if not found </dd></dl> </div> </div><p> <a class="anchor" name="9fd8ef18eabd8bc35cb626ad946f0ad3"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::peer" ref="9fd8ef18eabd8bc35cb626ad946f0ad3" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1MGCPEpInfo.html">MGCPEpInfo</a>* peer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Find the info object associated with an unique remote peer <dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="classTelEngine_1_1MGCPEpInfo.html" title="Remote endpoint info class.">MGCPEpInfo</a> pointer or 0 if not exactly one peer </dd></dl> </div> </div><p> <a class="anchor" name="4a7bd56fb99593ace9379ed699f2719c"></a><!-- doxytag: member="TelEngine::MGCPEndpoint::toString" ref="4a7bd56fb99593ace9379ed699f2719c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const <a class="el" href="classTelEngine_1_1String.html">String</a>& toString </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get a string representation of this endpoint <dl class="return" compact><dt><b>Returns:</b></dt><dd>A string representation of this endpoint </dd></dl> <p>Reimplemented from <a class="el" href="classTelEngine_1_1GenObject.html#4a7bd56fb99593ace9379ed699f2719c">GenObject</a>.</p> <p>References <a class="el" href="yatemgcp_8h-source.html#l00510">MGCPEndpointId::id()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="yatemgcp_8h-source.html">yatemgcp.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Dec 7 21:36:13 2008 for Yate by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address> </body> </html>