<!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: JBClientStream 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_1JBClientStream.html">JBClientStream</a> </div> </div> <div class="contents"> <h1>JBClientStream Class Reference</h1><!-- doxytag: class="TelEngine::JBClientStream" --><!-- doxytag: inherits="TelEngine::JBStream" -->A Jabber client to server stream. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="yatejabber_8h-source.html">yatejabber.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for JBClientStream:</div> <div class="dynsection"> <p><center><img src="classTelEngine_1_1JBClientStream.png" usemap="#JBClientStream_map" border="0" alt=""></center> <map name="JBClientStream_map"> <area href="classTelEngine_1_1JBStream.html" alt="JBStream" shape="rect" coords="0,112,98,136"> <area href="classTelEngine_1_1RefObject.html" alt="RefObject" shape="rect" coords="0,56,98,80"> <area href="classTelEngine_1_1GenObject.html" alt="GenObject" shape="rect" coords="0,0,98,24"> </map> </div> <p> <a href="classTelEngine_1_1JBClientStream-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">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#a910a58d01bee6137de5dc3e7e278394">~JBClientStream</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1XMPPUserRoster.html">XMPPUserRoster</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#2bd974d7c72f3fcaf298ab626234ad22">roster</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1JIDResource.html">JIDResource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#eca1e7829f73b83025df5d1bb14a74ad">getResource</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1XMPPUser.html">XMPPUser</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#891bcab3624cec30e3f81efba8b76add">getRemote</a> (const <a class="el" href="classTelEngine_1_1JabberID.html">JabberID</a> &jid)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classTelEngine_1_1JBStream.html#2c3e4bb40f36b262a5214e2da2bca9c5">Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#2baaf83218f9a0eb740d858c3c306a2c">sendStanza</a> (<a class="el" href="classTelEngine_1_1XMLElement.html">XMLElement</a> *stanza, const char *senderId=0)</td></tr> <tr><td colspan="2"><br><h2>Protected 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_1JBClientStream.html#4f88179954926b5b10ffe29a715444d2">JBClientStream</a> (<a class="el" href="classTelEngine_1_1JBEngine.html">JBEngine</a> *engine, <a class="el" href="classTelEngine_1_1XMPPServerInfo.html">XMPPServerInfo</a> &info, const <a class="el" href="classTelEngine_1_1JabberID.html">JabberID</a> &jid, const <a class="el" href="classTelEngine_1_1NamedList.html">NamedList</a> &params)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#575cc72123d2517474f79f5707d749c2">JBClientStream</a> (<a class="el" href="classTelEngine_1_1JBEngine.html">JBEngine</a> *engine, const <a class="el" href="classTelEngine_1_1JabberID.html">JabberID</a> &jid, const <a class="el" href="classTelEngine_1_1String.html">String</a> &password, const <a class="el" href="classTelEngine_1_1SocketAddr.html">SocketAddr</a> &address, bool autoRestart, unsigned int maxRestart, u_int64_t incRestartInterval, bool allowPlainAuth=false, bool outgoing=true)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#26b27be8f0822275eb0c24bfca8adb27">streamRunning</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#7bcbecca852865c5cde2547eb8ecc99c">processRunning</a> (<a class="el" href="classTelEngine_1_1XMLElement.html">XMLElement</a> *xml)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1JBClientStream.html#6c4af71721e75cc8a25bd3573746bd50">checkDestination</a> (<a class="el" href="classTelEngine_1_1XMLElement.html">XMLElement</a> *xml, bool &respond)</td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="238c86427fe073d75f7030dcbd111b42"></a><!-- doxytag: member="TelEngine::JBClientStream::JBEngine" ref="238c86427fe073d75f7030dcbd111b42" args="" --> class </td><td class="memItemRight" valign="bottom"><b>JBEngine</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A Jabber client to server stream. <p> This class holds a Jabber client stream used to connect an user to its server <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a910a58d01bee6137de5dc3e7e278394"></a><!-- doxytag: member="TelEngine::JBClientStream::~JBClientStream" ref="a910a58d01bee6137de5dc3e7e278394" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual ~<a class="el" href="classTelEngine_1_1JBClientStream.html">JBClientStream</a> </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor </div> </div><p> <a class="anchor" name="4f88179954926b5b10ffe29a715444d2"></a><!-- doxytag: member="TelEngine::JBClientStream::JBClientStream" ref="4f88179954926b5b10ffe29a715444d2" args="(JBEngine *engine, XMPPServerInfo &info, const JabberID &jid, const NamedList &params)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1JBClientStream.html">JBClientStream</a> </td> <td>(</td> <td class="paramtype"><a class="el" href="classTelEngine_1_1JBEngine.html">JBEngine</a> * </td> <td class="paramname"> <em>engine</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classTelEngine_1_1XMPPServerInfo.html">XMPPServerInfo</a> & </td> <td class="paramname"> <em>info</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1JabberID.html">JabberID</a> & </td> <td class="paramname"> <em>jid</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1NamedList.html">NamedList</a> & </td> <td class="paramname"> <em>params</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. Build an outgoing stream <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 that owns this stream </td></tr> <tr><td valign="top"></td><td valign="top"><em>info</em> </td><td>Structure containing data used to connect to remote server </td></tr> <tr><td valign="top"></td><td valign="top"><em>jid</em> </td><td>Client's full Jabber ID </td></tr> <tr><td valign="top"></td><td valign="top"><em>params</em> </td><td>Other stream parameters </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="575cc72123d2517474f79f5707d749c2"></a><!-- doxytag: member="TelEngine::JBClientStream::JBClientStream" ref="575cc72123d2517474f79f5707d749c2" args="(JBEngine *engine, const JabberID &jid, const String &password, const SocketAddr &address, bool autoRestart, unsigned int maxRestart, u_int64_t incRestartInterval, bool allowPlainAuth=false, bool outgoing=true)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1JBClientStream.html">JBClientStream</a> </td> <td>(</td> <td class="paramtype"><a class="el" href="classTelEngine_1_1JBEngine.html">JBEngine</a> * </td> <td class="paramname"> <em>engine</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1JabberID.html">JabberID</a> & </td> <td class="paramname"> <em>jid</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1String.html">String</a> & </td> <td class="paramname"> <em>password</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1SocketAddr.html">SocketAddr</a> & </td> <td class="paramname"> <em>address</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>autoRestart</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>maxRestart</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">u_int64_t </td> <td class="paramname"> <em>incRestartInterval</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>allowPlainAuth</em> = <code>false</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>outgoing</em> = <code>true</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor <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 that owns this stream </td></tr> <tr><td valign="top"></td><td valign="top"><em>jid</em> </td><td>User's JID </td></tr> <tr><td valign="top"></td><td valign="top"><em>password</em> </td><td>Password used for authentication </td></tr> <tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>The remote address to connect to </td></tr> <tr><td valign="top"></td><td valign="top"><em>autoRestart</em> </td><td>True to auto restart the stream </td></tr> <tr><td valign="top"></td><td valign="top"><em>maxRestart</em> </td><td>The maximum restart attempts allowed </td></tr> <tr><td valign="top"></td><td valign="top"><em>incRestartInterval</em> </td><td>The interval to increase the restart counter </td></tr> <tr><td valign="top"></td><td valign="top"><em>allowPlainAuth</em> </td><td>Allow plain text password authentication </td></tr> <tr><td valign="top"></td><td valign="top"><em>outgoing</em> </td><td><a class="el" href="classTelEngine_1_1Stream.html" title="An abstract stream class capable of reading and writing.">Stream</a> direction </td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="6c4af71721e75cc8a25bd3573746bd50"></a><!-- doxytag: member="TelEngine::JBClientStream::checkDestination" ref="6c4af71721e75cc8a25bd3573746bd50" args="(XMLElement *xml, bool &respond)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool checkDestination </td> <td>(</td> <td class="paramtype"><a class="el" href="classTelEngine_1_1XMLElement.html">XMLElement</a> * </td> <td class="paramname"> <em>xml</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool & </td> <td class="paramname"> <em>respond</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Check the 'to' attribute of a received element against the local jid. Accept empty or bare/full jid match. Set the 'to' attribute to local jid if empty <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>xml</em> </td><td>The received element </td></tr> <tr><td valign="top"></td><td valign="top"><em>respond</em> </td><td>Action to be taken if not accepted. Always false on exit </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>False to reject it </dd></dl> <p>Reimplemented from <a class="el" href="classTelEngine_1_1JBStream.html#6c4af71721e75cc8a25bd3573746bd50">JBStream</a>.</p> </div> </div><p> <a class="anchor" name="891bcab3624cec30e3f81efba8b76add"></a><!-- doxytag: member="TelEngine::JBClientStream::getRemote" ref="891bcab3624cec30e3f81efba8b76add" args="(const JabberID &jid)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1XMPPUser.html">XMPPUser</a>* getRemote </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1JabberID.html">JabberID</a> & </td> <td class="paramname"> <em>jid</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Get a remote user from roster <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>jid</em> </td><td>The user's bare jid </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Referenced <a class="el" href="classTelEngine_1_1XMPPUser.html" title="An XMPP remote user.">XMPPUser</a> object or 0 if not found </dd></dl> </div> </div><p> <a class="anchor" name="eca1e7829f73b83025df5d1bb14a74ad"></a><!-- doxytag: member="TelEngine::JBClientStream::getResource" ref="eca1e7829f73b83025df5d1bb14a74ad" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1JIDResource.html">JIDResource</a>* getResource </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the client's resource <dl class="return" compact><dt><b>Returns:</b></dt><dd>The client's resource </dd></dl> </div> </div><p> <a class="anchor" name="7bcbecca852865c5cde2547eb8ecc99c"></a><!-- doxytag: member="TelEngine::JBClientStream::processRunning" ref="7bcbecca852865c5cde2547eb8ecc99c" args="(XMLElement *xml)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void processRunning </td> <td>(</td> <td class="paramtype"><a class="el" href="classTelEngine_1_1XMLElement.html">XMLElement</a> * </td> <td class="paramname"> <em>xml</em> </td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Process a received stanza in Running state <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>xml</em> </td><td>Valid <a class="el" href="classTelEngine_1_1XMLElement.html" title="An XML element.">XMLElement</a> pointer </td></tr> </table> </dl> <p>Reimplemented from <a class="el" href="classTelEngine_1_1JBStream.html#7bcbecca852865c5cde2547eb8ecc99c">JBStream</a>.</p> </div> </div><p> <a class="anchor" name="2bd974d7c72f3fcaf298ab626234ad22"></a><!-- doxytag: member="TelEngine::JBClientStream::roster" ref="2bd974d7c72f3fcaf298ab626234ad22" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1XMPPUserRoster.html">XMPPUserRoster</a>* roster </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the roster of this stream's client <dl class="return" compact><dt><b>Returns:</b></dt><dd>Valid <a class="el" href="classTelEngine_1_1XMPPUserRoster.html" title="The roster of a local user.">XMPPUserRoster</a> </dd></dl> </div> </div><p> <a class="anchor" name="2baaf83218f9a0eb740d858c3c306a2c"></a><!-- doxytag: member="TelEngine::JBClientStream::sendStanza" ref="2baaf83218f9a0eb740d858c3c306a2c" args="(XMLElement *stanza, const char *senderId=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classTelEngine_1_1JBStream.html#2c3e4bb40f36b262a5214e2da2bca9c5">Error</a> sendStanza </td> <td>(</td> <td class="paramtype"><a class="el" href="classTelEngine_1_1XMLElement.html">XMLElement</a> * </td> <td class="paramname"> <em>stanza</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>senderId</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Send a stanza. This method is thread safe <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>stanza</em> </td><td>Element to send </td></tr> <tr><td valign="top"></td><td valign="top"><em>senderId</em> </td><td>Optional sender's id. Used for notification events </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The result of posting the stanza </dd></dl> <p>Reimplemented from <a class="el" href="classTelEngine_1_1JBStream.html#2baaf83218f9a0eb740d858c3c306a2c">JBStream</a>.</p> </div> </div><p> <a class="anchor" name="26b27be8f0822275eb0c24bfca8adb27"></a><!-- doxytag: member="TelEngine::JBClientStream::streamRunning" ref="26b27be8f0822275eb0c24bfca8adb27" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void streamRunning </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Notification from parent when steam is authenticated: get roster from server <p>Reimplemented from <a class="el" href="classTelEngine_1_1JBStream.html#26b27be8f0822275eb0c24bfca8adb27">JBStream</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="yatejabber_8h-source.html">yatejabber.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>