Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > e9fca32892116c2c27cf46145520942a > files > 20

liblogging-devel-1.0.6-2.mga7.armv7hl.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>liblogging: beepchannel.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>beepchannel.c File Reference</h1>The Implementation of the BEEP Channel object.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;assert.h&gt;</code><br>
<code>#include "<a class="el" href="config_8h-source.html">config.h</a>"</code><br>
<code>#include "<a class="el" href="liblogging_8h-source.html">liblogging.h</a>"</code><br>
<code>#include "<a class="el" href="beepchannel_8h-source.html">beepchannel.h</a>"</code><br>
<code>#include "<a class="el" href="beepframe_8h-source.html">beepframe.h</a>"</code><br>
<code>#include "<a class="el" href="namevaluetree_8h-source.html">namevaluetree.h</a>"</code><br>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a1">sbChanSetChanno</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, int iChanno)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the channel number for this channel (done by channel 0 profile). </em> <a href="#a1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a name="a2" doxytag="beepchannel.c::sbChanConstruct"></a>
<a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td><td class="memItemRight" valign=bottom><b>sbChanConstruct</b> (<a class="el" href="structsbSessObject.html">sbSessObj</a> *pSess)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a name="a3" doxytag="beepchannel.c::sbChanActualSendFram"></a>
<a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><b>sbChanActualSendFram</b> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, <a class="el" href="structsbFramObject.html">sbFramObj</a> *pFram)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a4">sbChanAbort</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Aborts a channel. </em> <a href="#a4"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a5">sbChanDestroy</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. </em> <a href="#a5"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a6">sbChanUpdateChannelState</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, int iNewState)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update the channel status. </em> <a href="#a6"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a name="a7" doxytag="beepchannel.c::sbChanAssignProfile"></a>
<a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><b>sbChanAssignProfile</b> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, <a class="el" href="structsbProfObject.html">sbProfObj</a> *pProf)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a name="a8" doxytag="beepchannel.c::sbChanSetAwaitingClose"></a>
<a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a8">sbChanSetAwaitingClose</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the channel status to "awaiting close". <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a name="a9" doxytag="beepchannel.c::sbChanSetChanClosed"></a>
<a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a9">sbChanSetChanClosed</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set channel state to closed. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a name="a10" doxytag="beepchannel.c::sbChanSendOK"></a>
<a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><b>sbChanSendOK</b> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, void(*OnFrameDestroy)(<a class="el" href="structsbFramObject.html">sbFramObj</a> *), void *pUsr)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a11">sbChanSendSEQ</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, unsigned uAckno, unsigned uWindow)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send a SEQ frame for the current channel. </em> <a href="#a11"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="liblogging_8h.html#a6">srRetVal</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="beepchannel_8c.html#a12">sbChanSendErrResponse</a> (<a class="el" href="structsbChanObject.html">sbChanObj</a> *pThis, unsigned uErrCode, char *pszErrMsg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send an error response to the remote peer. </em> <a href="#a12"></a><em><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The Implementation of the BEEP Channel object. 
<p>
<dl compact><dt><b>Author:</b></dt><dd>Rainer Gerhards &lt;<a href="mailto:rgerhards@adiscon.com">rgerhards@adiscon.com</a>&gt; </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2003-08-04<p>
2003-08-07<ul>
<li>added support for the session's channel linked lies.</li></ul>
</dd></dl>
Copyright 2002-2003 Rainer Gerhards and Adiscon GmbH. All Rights Reserved.<p>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<p>
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<p>
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<p>
* Neither the name of Adiscon GmbH or Rainer Gerhards nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<p>
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<hr><h2>Function Documentation</h2>
<a name="a4" doxytag="beepchannel.c::sbChanAbort"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void sbChanAbort </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pThis</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Aborts a channel. 
<p>
That is, it destroys the channel object itself but DOES NOT remove it from the session's linked list of channels.     </td>
  </tr>
</table>
<a name="a5" doxytag="beepchannel.c::sbChanDestroy"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void sbChanDestroy </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pThis</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Destructor. 
<p>
The channel object itself will be freed and can not be used any longer.     </td>
  </tr>
</table>
<a name="a12" doxytag="beepchannel.c::sbChanSendErrResponse"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="liblogging_8h.html#a6">srRetVal</a> sbChanSendErrResponse </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pThis</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>uErrCode</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname" nowrap> <em>pszErrMsg</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Send an error response to the remote peer. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>uErrCode</em>&nbsp;</td><td>numeric error code as of RC 3080 </td></tr>
    <tr><td valign=top><em>pszErrMsg</em>&nbsp;</td><td>human-readable error message string. MUST NOT be NULL. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="a11" doxytag="beepchannel.c::sbChanSendSEQ"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="liblogging_8h.html#a6">srRetVal</a> sbChanSendSEQ </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pThis</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>uAckno</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>uWindow</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Send a SEQ frame for the current channel. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>pChan</em>&nbsp;</td><td>Channel this SEQ is for. </td></tr>
    <tr><td valign=top><em>uAckno</em>&nbsp;</td><td>ackno to use in the SEQ. Can not be 0. </td></tr>
    <tr><td valign=top><em>uWindow</em>&nbsp;</td><td>Window to use in the SEQ. If 0, use BEEP default. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="a1" doxytag="beepchannel.c::sbChanSetChanno"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="liblogging_8h.html#a6">srRetVal</a> sbChanSetChanno </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pThis</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>iChanno</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the channel number for this channel (done by channel 0 profile). 
<p>
IMPORTANT: the channel number MUST be set only ONCE and this BEFORE any data is sent or received over the channel. The reason for this is that this method also adds the channel to session's list of channel objects. If it would be called multiple times, multiple copies would be present in the list - which would (mildly said) cause unpredictable results).<p>
Of course, we could change the behaviour to handle this case, but I do not see any good reason for this. So far, it looks like a waste of CPU cycles...<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>iChanno</em>&nbsp;</td><td>[in] Channel number to be used on this channel. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="a6" doxytag="beepchannel.c::sbChanUpdateChannelState"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="liblogging_8h.html#a6">srRetVal</a> sbChanUpdateChannelState </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structsbChanObject.html">sbChanObj</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pThis</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>iNewState</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Update the channel status. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>iNewState</em>&nbsp;</td><td>new channel status </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 3 12:29:55 2005 for liblogging by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.2 </small></address>
</body>
</html>