Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > d4a6745d7fbd92dfb64dce5e91e08f80 > files > 85

lib64meanwhile1-doc-1.0.2-1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>meanwhile: mw_channel.h File 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.4 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>mw_channel.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
Life-cycle of an outgoing channel:. 
<p>
1: mwChannel_new is called. If there is a channel in the outgoing collection in state NEW, then it is returned. Otherwise, a channel is allocated, assigned a unique outgoing id, marked as NEW, and returned.<p>
2: channel is set to INIT status (effectively earmarking it as in- use). fields on the channel can then be set as necessary to prepare it for creation.<p>
3: mwChannel_create is called. The channel is marked to WAIT status and a message is sent to the server. The channel is also marked as inactive as of that moment.<p>
4: the channel is accepted (step 5) or rejected (step 7)<p>
5: an accept message is received from the server, and the channel is marked as OPEN, and the inactive mark is removed. And messages in the in or out queues for that channel are processed. The channel is now ready to be used.<p>
6: data is sent and received over the channel<p>
7: the channel is closed either by receipt of a close message or by local action. If by local action, then a close message is sent to the server. The channel is cleaned up, its queues dumped, and it is set to NEW status to await re-use.<p>
Life-cycle of an incoming channel:<p>
1: a channel create message is received. A channel is allocated and given an id matching the message. It is placed in status WAIT, and marked as inactive as of that moment. The service matching that channel is alerted of the incoming creation request.<p>
2: the service can either accept (step 3) or reject (step 5) the channel<p>
3: mwChannel_accept is called. The channel is marked as OPEN, and an accept message is sent to the server. And messages in the in or out queues for that channel are processed. The channel is now ready to be used.<p>
4: data is sent and received over the channel<p>
5: The channel is closed either by receipt of a close message or by local action. If by local action, then a close message is sent to the server. The channel is cleaned up, its queues dumped, and it is deallocated. 
<p>
<code>#include &lt;time.h&gt;</code><br>
<code>#include &quot;<a class="el" href="mw__common_8h-source.html">mw_common.h</a>&quot;</code><br>

<p>
<a href="mw__channel_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#1a2154c83a846c017653a2ee8c1aaa35">MW_MASTER_CHANNEL_ID</a>&nbsp;&nbsp;&nbsp;0x00000000</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">special ID indicating the master channel  <a href="#1a2154c83a846c017653a2ee8c1aaa35"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#74bd8e3a8a90d421b1a9a7e4b7acec89">mwChannel_idIsIncoming</a>(id)&nbsp;&nbsp;&nbsp;(! mwChannel_idIsOutgoing(id))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">non-zero if a channel id appears to be that of an incoming channel  <a href="#74bd8e3a8a90d421b1a9a7e4b7acec89"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#1c4fa767a8f09e32aaa8b180c1b836f5">mwChannel_idIsOutgoing</a>(id)&nbsp;&nbsp;&nbsp;(! (0x80000000 &amp; (id)))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">non-zero if a channel id appears to be that of an outgoing channel  <a href="#1c4fa767a8f09e32aaa8b180c1b836f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#ea68737cfe6d90e09b13ba1b95b9c633">mwChannel_isIncoming</a>(chan)&nbsp;&nbsp;&nbsp;mwChannel_idIsIncoming(mwChannel_getId(chan))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">non-zero if a channel appears to be an incoming channel  <a href="#ea68737cfe6d90e09b13ba1b95b9c633"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#f8dd8d1088786774775243383f8f8f28">mwChannel_isOutgoing</a>(chan)&nbsp;&nbsp;&nbsp;mwChannel_idIsOutgoing(mwChannel_getId(chan))</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">non-zero if a channel appears to be an outgoing channel  <a href="#f8dd8d1088786774775243383f8f8f28"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#cb79280fcff820ba79c7f2a9b9dbe0e0">mwChannel_isState</a>(chan, <a class="el" href="structmwService.html#b5adc0f5a0cbeddaece7a4512ec66099">state</a>)&nbsp;&nbsp;&nbsp;(mwChannel_getState(chan) == (<a class="el" href="structmwService.html#b5adc0f5a0cbeddaece7a4512ec66099">state</a>))</td></tr>

<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11">mwChannelState</a> { <br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd110015e6ab100dcc9072046d4fbccf1c5c">mwChannel_NEW</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd1181856c37ab30b5c5dc918230e74b41be">mwChannel_INIT</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11cc17dbc14dcca5f07db0e1086b1787d7">mwChannel_WAIT</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd119b079efae54c7ce19a75cc72bb4bdf1d">mwChannel_OPEN</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd114dbdbd31d9ff0fb6b973a665ab28a640">mwChannel_DESTROY</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd1113307644c3c44174b3374e165e4bd609">mwChannel_ERROR</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11037260bf612b5b449b9dfc25f14d863c">mwChannel_UNKNOWN</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">channel status  <a href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e">mwChannelStatField</a> { <br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e2fb930374933a4ae3bcbb59c38100453">mwChannelStat_MSG_SENT</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e0b9cd0c35eae32dde00d1757863c0c72">mwChannelStat_MSG_RECV</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e5cb8465381680632b7f9f12c35e36b36">mwChannelStat_U_BYTES_SENT</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e76fcf9b81600e77219e91476087127ca">mwChannelStat_U_BYTES_RECV</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e89b26adcb1a6ecb4cf7f871856c597ce">mwChannelStat_OPENED_AT</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e5eef1f4cfa0960802e63d5c98c1fc987">mwChannelStat_CLOSED_AT</a>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">channel statistic fields.  <a href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd">mwEncryptPolicy</a> { <br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd8fb49fce96dafa93f4574079bcefefcd">mwEncrypt_NONE</a> =  0x0000, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd23970e8fbf808d49e753b76edd2f7dac">mwEncrypt_WHATEVER</a> =  0x0001, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd751e7884abd7fff5bf60df3be83acb49">mwEncrypt_ALL</a> =  0x0002, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778ddb501a631c7ce9cf2afb4c3ae80a5f228">mwEncrypt_RC2_40</a> =  0x1000, 
<br>
&nbsp;&nbsp;<a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd24d43c164f072dfdb19b9b3b739b5e2c">mwEncrypt_RC2_128</a> =  0x2000
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Policy for a channel, dictating what sort of encryption should be used, if any, and when.  <a href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#8c72269dfed1ad1a32a2f44501c3961a">mwChannel_accept</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formally accept an incoming channel.  <a href="#8c72269dfed1ad1a32a2f44501c3961a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#7c85be3b885f7bb2119707e78c9f1c1d">mwChannel_addSupportedCipherInstance</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwCipherInstance.html">mwCipherInstance</a> *ci)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a cipher instance to a channel's list of supported ciphers.  <a href="#7c85be3b885f7bb2119707e78c9f1c1d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#c0b5dba71d6c2ac2780b094bae9bda13">mwChannel_create</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formally open a channel.  <a href="#c0b5dba71d6c2ac2780b094bae9bda13"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#cbfd68a6393902b1e396c19086cb8703">mwChannel_destroy</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, guint32 reason, struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy a channel.  <a href="#cbfd68a6393902b1e396c19086cb8703"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#dbaba2dd85c52344f8ff813673945664">mwChannel_find</a> (struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *cs, guint32 chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Obtain a reference to a channel by its id.  <a href="#dbaba2dd85c52344f8ff813673945664"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#8308d484dffecd66a8c102fc81f614a1">mwChannel_getAddtlAccept</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">direct reference to the accept addtl information for a channel  <a href="#8308d484dffecd66a8c102fc81f614a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#b444dcf0acf717ed89658325aa27ced6">mwChannel_getAddtlCreate</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">direct reference to the create addtl information for a channel  <a href="#b444dcf0acf717ed89658325aa27ced6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwCipherInstance.html">mwCipherInstance</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#8ac75f17835471f500aa0f1219948765">mwChannel_getCipherInstance</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">guint16&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#9eeee87028d25ba9addea3efa02409a4">mwChannel_getEncryptPolicy</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Channel encryption policy.  <a href="#9eeee87028d25ba9addea3efa02409a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">guint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#205fb45f4f128840da446802a5b8858f">mwChannel_getId</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the ID for a channel.  <a href="#205fb45f4f128840da446802a5b8858f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">guint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#6cc4dc53011417c27ad7d34b814ee74d">mwChannel_getOptions</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">guint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#c2d6c9be2a7183b7db1548b737725fa0">mwChannel_getProtoType</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">guint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#a59d3438ea8d7ddaa4aa66e7f96e0d25">mwChannel_getProtoVer</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwService.html">mwService</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#c1fea86d0accdaf564915e7a3d16084b">mwChannel_getService</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the service for a channel.  <a href="#c1fea86d0accdaf564915e7a3d16084b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">gpointer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#9edb54daf4ae35b0eb5d622b2b0a2332">mwChannel_getServiceData</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get service-specific data.  <a href="#9edb54daf4ae35b0eb5d622b2b0a2332"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">guint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#852573bda2f2153ea7bdc3ce4e44ecba">mwChannel_getServiceId</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the ID of the service for a channel.  <a href="#852573bda2f2153ea7bdc3ce4e44ecba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwSession.html">mwSession</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#92bb2b0deb246e539f96c71f07a88836">mwChannel_getSession</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the session for a channel.  <a href="#92bb2b0deb246e539f96c71f07a88836"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11">mwChannelState</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#7bcf55392672ce5cc803019884f0cf82">mwChannel_getState</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the state of a channel  <a href="#7bcf55392672ce5cc803019884f0cf82"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">gpointer&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#5d3eb44fd65ec67e7e04c01ea49bdf2c">mwChannel_getStatistic</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, enum <a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e">mwChannelStatField</a> stat)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">obtain the value for a statistic field as a gpointer  <a href="#5d3eb44fd65ec67e7e04c01ea49bdf2c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GList *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#f5055c726c6d80ed0e451c5c95cc3794">mwChannel_getSupportedCipherInstances</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the list of supported ciphers for a channel.  <a href="#f5055c726c6d80ed0e451c5c95cc3794"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwLoginInfo.html">mwLoginInfo</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#5049f4cfefc749fca12d8d226f098d00">mwChannel_getUser</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">User at the other end of the channel.  <a href="#5049f4cfefc749fca12d8d226f098d00"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#715a0d9c5d7ed3b81519d586cad7e73b">mwChannel_newIncoming</a> (struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *, guint32 id)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an incoming channel with the given channel id.  <a href="#715a0d9c5d7ed3b81519d586cad7e73b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#ca14ac73eda43fe18d5aa691c1705e11">mwChannel_newOutgoing</a> (struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an outgoing channel.  <a href="#ca14ac73eda43fe18d5aa691c1705e11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#d140721caa97992d7e64cd6504965946">mwChannel_populateSupportedCipherInstances</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">automatically adds instances of all ciphers in the session to the list of supported ciphers for a channel  <a href="#d140721caa97992d7e64cd6504965946"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#45bfb6bb37d6db073c593bbfcc48af92">mwChannel_recv</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwMsgChannelSend.html">mwMsgChannelSend</a> *msg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Feed data into a channel.  <a href="#45bfb6bb37d6db073c593bbfcc48af92"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#cdcc28872711d7b7cb17f403472448e5">mwChannel_recvAccept</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwMsgChannelAccept.html">mwMsgChannelAccept</a> *msg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pass an accept message to a channel for handling  <a href="#cdcc28872711d7b7cb17f403472448e5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#1172755c4bb709e9150691848ba4070f">mwChannel_recvCreate</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwMsgChannelCreate.html">mwMsgChannelCreate</a> *msg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pass a create message to a channel for handling  <a href="#1172755c4bb709e9150691848ba4070f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#0e66613f64ea68bebfae4c3e2fe1a50b">mwChannel_recvDestroy</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwMsgChannelDestroy.html">mwMsgChannelDestroy</a> *msg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pass a destroy message to a channel for handling  <a href="#0e66613f64ea68bebfae4c3e2fe1a50b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#288a0fc9ee0e2efbe16d6905a2bf158e">mwChannel_removeServiceData</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#ae6d4fb911cd040fb277d8caccf21d13">mwChannel_selectCipherInstance</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwCipherInstance.html">mwCipherInstance</a> *ci)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">select a cipher instance for a channel.  <a href="#ae6d4fb911cd040fb277d8caccf21d13"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#3c5c8c8fc12b5931e97e1456fac726cf">mwChannel_send</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, guint32 msg_type, struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *msg)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compose a send-on-channel message, encrypt it as per the channel's specification, and send it.  <a href="#3c5c8c8fc12b5931e97e1456fac726cf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#9680f1baac754a86449e2f416fa2ac27">mwChannel_sendEncrypted</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, guint32 msg_type, struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *msg, gboolean encrypt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compose a send-on-channel message, and if encrypt is TRUE, encrypt it as per the channel's specification, and send it.  <a href="#9680f1baac754a86449e2f416fa2ac27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#df361ad42cbffec92a393bc3e059c38e">mwChannel_setOptions</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, guint32 options)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#dc7007d3b03fed371cd1f2a51321f04e">mwChannel_setProtoType</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, guint32 proto_type)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#7f43ceb7857fadd26d24ad1294ba4d8b">mwChannel_setProtoVer</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, guint32 proto_ver)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#730aaae4bae3fdfe485cf4e62510bdd7">mwChannel_setService</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, struct <a class="el" href="structmwService.html">mwService</a> *srvc)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">associate a channel with an owning service  <a href="#730aaae4bae3fdfe485cf4e62510bdd7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#e424543ba6d270f04d4819a7b77b5d47">mwChannel_setServiceData</a> (struct <a class="el" href="structmwChannel.html">mwChannel</a> *chan, gpointer data, GDestroyNotify clean)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set service-specific data.  <a href="#e424543ba6d270f04d4819a7b77b5d47"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#36ca1279d6e68a1e86a9f0126bc545cc">mwChannelSet_free</a> (struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear and deallocate a channel set.  <a href="#36ca1279d6e68a1e86a9f0126bc545cc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="mw__channel_8h.html#78d3c4f046b9b2627f82d9c7a5238048">mwChannelSet_new</a> (struct <a class="el" href="structmwSession.html">mwSession</a> *)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate and initialize a channel set for a session.  <a href="#78d3c4f046b9b2627f82d9c7a5238048"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="1a2154c83a846c017653a2ee8c1aaa35"></a><!-- doxytag: member="mw_channel.h::MW_MASTER_CHANNEL_ID" ref="1a2154c83a846c017653a2ee8c1aaa35" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MW_MASTER_CHANNEL_ID&nbsp;&nbsp;&nbsp;0x00000000          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
special ID indicating the master channel 
<p>

</div>
</div><p>
<a class="anchor" name="74bd8e3a8a90d421b1a9a7e4b7acec89"></a><!-- doxytag: member="mw_channel.h::mwChannel_idIsIncoming" ref="74bd8e3a8a90d421b1a9a7e4b7acec89" args="(id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define mwChannel_idIsIncoming          </td>
          <td>(</td>
          <td class="paramtype">id&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;(! mwChannel_idIsOutgoing(id))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
non-zero if a channel id appears to be that of an incoming channel 
<p>

</div>
</div><p>
<a class="anchor" name="1c4fa767a8f09e32aaa8b180c1b836f5"></a><!-- doxytag: member="mw_channel.h::mwChannel_idIsOutgoing" ref="1c4fa767a8f09e32aaa8b180c1b836f5" args="(id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define mwChannel_idIsOutgoing          </td>
          <td>(</td>
          <td class="paramtype">id&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;(! (0x80000000 &amp; (id)))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
non-zero if a channel id appears to be that of an outgoing channel 
<p>

</div>
</div><p>
<a class="anchor" name="ea68737cfe6d90e09b13ba1b95b9c633"></a><!-- doxytag: member="mw_channel.h::mwChannel_isIncoming" ref="ea68737cfe6d90e09b13ba1b95b9c633" args="(chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define mwChannel_isIncoming          </td>
          <td>(</td>
          <td class="paramtype">chan&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;mwChannel_idIsIncoming(mwChannel_getId(chan))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
non-zero if a channel appears to be an incoming channel 
<p>

</div>
</div><p>
<a class="anchor" name="f8dd8d1088786774775243383f8f8f28"></a><!-- doxytag: member="mw_channel.h::mwChannel_isOutgoing" ref="f8dd8d1088786774775243383f8f8f28" args="(chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define mwChannel_isOutgoing          </td>
          <td>(</td>
          <td class="paramtype">chan&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;mwChannel_idIsOutgoing(mwChannel_getId(chan))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
non-zero if a channel appears to be an outgoing channel 
<p>

</div>
</div><p>
<a class="anchor" name="cb79280fcff820ba79c7f2a9b9dbe0e0"></a><!-- doxytag: member="mw_channel.h::mwChannel_isState" ref="cb79280fcff820ba79c7f2a9b9dbe0e0" args="(chan, state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define mwChannel_isState          </td>
          <td>(</td>
          <td class="paramtype">chan,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmwService.html#b5adc0f5a0cbeddaece7a4512ec66099">state</a>&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;(mwChannel_getState(chan) == (<a class="el" href="structmwService.html#b5adc0f5a0cbeddaece7a4512ec66099">state</a>))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd11"></a><!-- doxytag: member="mw_channel.h::mwChannelState" ref="2f9ff901fd7b6e0f92c4f651b209fd11" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11">mwChannelState</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
channel status 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd110015e6ab100dcc9072046d4fbccf1c5c"></a><!-- doxytag: member="mwChannel_NEW" ref="2f9ff901fd7b6e0f92c4f651b209fd110015e6ab100dcc9072046d4fbccf1c5c" args="" -->mwChannel_NEW</em>&nbsp;</td><td>
channel is newly allocated, in the pool </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd1181856c37ab30b5c5dc918230e74b41be"></a><!-- doxytag: member="mwChannel_INIT" ref="2f9ff901fd7b6e0f92c4f651b209fd1181856c37ab30b5c5dc918230e74b41be" args="" -->mwChannel_INIT</em>&nbsp;</td><td>
channel is being prepared, out of the pool </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd11cc17dbc14dcca5f07db0e1086b1787d7"></a><!-- doxytag: member="mwChannel_WAIT" ref="2f9ff901fd7b6e0f92c4f651b209fd11cc17dbc14dcca5f07db0e1086b1787d7" args="" -->mwChannel_WAIT</em>&nbsp;</td><td>
channel is waiting for accept </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd119b079efae54c7ce19a75cc72bb4bdf1d"></a><!-- doxytag: member="mwChannel_OPEN" ref="2f9ff901fd7b6e0f92c4f651b209fd119b079efae54c7ce19a75cc72bb4bdf1d" args="" -->mwChannel_OPEN</em>&nbsp;</td><td>
channel is accepted and open </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd114dbdbd31d9ff0fb6b973a665ab28a640"></a><!-- doxytag: member="mwChannel_DESTROY" ref="2f9ff901fd7b6e0f92c4f651b209fd114dbdbd31d9ff0fb6b973a665ab28a640" args="" -->mwChannel_DESTROY</em>&nbsp;</td><td>
channel is being destroyed </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd1113307644c3c44174b3374e165e4bd609"></a><!-- doxytag: member="mwChannel_ERROR" ref="2f9ff901fd7b6e0f92c4f651b209fd1113307644c3c44174b3374e165e4bd609" args="" -->mwChannel_ERROR</em>&nbsp;</td><td>
channel is being destroyed due to error </td></tr>
<tr><td valign="top"><em><a class="anchor" name="2f9ff901fd7b6e0f92c4f651b209fd11037260bf612b5b449b9dfc25f14d863c"></a><!-- doxytag: member="mwChannel_UNKNOWN" ref="2f9ff901fd7b6e0f92c4f651b209fd11037260bf612b5b449b9dfc25f14d863c" args="" -->mwChannel_UNKNOWN</em>&nbsp;</td><td>
unknown state, or error determining state </td></tr>
</table>
</dl>

</div>
</div><p>
<a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e"></a><!-- doxytag: member="mw_channel.h::mwChannelStatField" ref="e48ef93585f681efb2f9e4eb702c365e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e">mwChannelStatField</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
channel statistic fields. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="mw__channel_8h.html#5d3eb44fd65ec67e7e04c01ea49bdf2c" title="obtain the value for a statistic field as a gpointer">mwChannel_getStatistic</a> </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e2fb930374933a4ae3bcbb59c38100453"></a><!-- doxytag: member="mwChannelStat_MSG_SENT" ref="e48ef93585f681efb2f9e4eb702c365e2fb930374933a4ae3bcbb59c38100453" args="" -->mwChannelStat_MSG_SENT</em>&nbsp;</td><td>
total send-on-chan messages sent </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e0b9cd0c35eae32dde00d1757863c0c72"></a><!-- doxytag: member="mwChannelStat_MSG_RECV" ref="e48ef93585f681efb2f9e4eb702c365e0b9cd0c35eae32dde00d1757863c0c72" args="" -->mwChannelStat_MSG_RECV</em>&nbsp;</td><td>
total send-on-chan messages received </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e5cb8465381680632b7f9f12c35e36b36"></a><!-- doxytag: member="mwChannelStat_U_BYTES_SENT" ref="e48ef93585f681efb2f9e4eb702c365e5cb8465381680632b7f9f12c35e36b36" args="" -->mwChannelStat_U_BYTES_SENT</em>&nbsp;</td><td>
total bytes sent, pre-encryption </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e76fcf9b81600e77219e91476087127ca"></a><!-- doxytag: member="mwChannelStat_U_BYTES_RECV" ref="e48ef93585f681efb2f9e4eb702c365e76fcf9b81600e77219e91476087127ca" args="" -->mwChannelStat_U_BYTES_RECV</em>&nbsp;</td><td>
total bytes received, post-decryption </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e89b26adcb1a6ecb4cf7f871856c597ce"></a><!-- doxytag: member="mwChannelStat_OPENED_AT" ref="e48ef93585f681efb2f9e4eb702c365e89b26adcb1a6ecb4cf7f871856c597ce" args="" -->mwChannelStat_OPENED_AT</em>&nbsp;</td><td>
time when channel was opened </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e48ef93585f681efb2f9e4eb702c365e5eef1f4cfa0960802e63d5c98c1fc987"></a><!-- doxytag: member="mwChannelStat_CLOSED_AT" ref="e48ef93585f681efb2f9e4eb702c365e5eef1f4cfa0960802e63d5c98c1fc987" args="" -->mwChannelStat_CLOSED_AT</em>&nbsp;</td><td>
time when channel was closed </td></tr>
</table>
</dl>

</div>
</div><p>
<a class="anchor" name="f1a96846496c5953b72b8002821778dd"></a><!-- doxytag: member="mw_channel.h::mwEncryptPolicy" ref="f1a96846496c5953b72b8002821778dd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd">mwEncryptPolicy</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Policy for a channel, dictating what sort of encryption should be used, if any, and when. 
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="f1a96846496c5953b72b8002821778dd8fb49fce96dafa93f4574079bcefefcd"></a><!-- doxytag: member="mwEncrypt_NONE" ref="f1a96846496c5953b72b8002821778dd8fb49fce96dafa93f4574079bcefefcd" args="" -->mwEncrypt_NONE</em>&nbsp;</td><td>
encrypt none </td></tr>
<tr><td valign="top"><em><a class="anchor" name="f1a96846496c5953b72b8002821778dd23970e8fbf808d49e753b76edd2f7dac"></a><!-- doxytag: member="mwEncrypt_WHATEVER" ref="f1a96846496c5953b72b8002821778dd23970e8fbf808d49e753b76edd2f7dac" args="" -->mwEncrypt_WHATEVER</em>&nbsp;</td><td>
encrypt whatever you want </td></tr>
<tr><td valign="top"><em><a class="anchor" name="f1a96846496c5953b72b8002821778dd751e7884abd7fff5bf60df3be83acb49"></a><!-- doxytag: member="mwEncrypt_ALL" ref="f1a96846496c5953b72b8002821778dd751e7884abd7fff5bf60df3be83acb49" args="" -->mwEncrypt_ALL</em>&nbsp;</td><td>
encrypt all, any cipher </td></tr>
<tr><td valign="top"><em><a class="anchor" name="f1a96846496c5953b72b8002821778ddb501a631c7ce9cf2afb4c3ae80a5f228"></a><!-- doxytag: member="mwEncrypt_RC2_40" ref="f1a96846496c5953b72b8002821778ddb501a631c7ce9cf2afb4c3ae80a5f228" args="" -->mwEncrypt_RC2_40</em>&nbsp;</td><td>
encrypt all, RC2/40 cipher </td></tr>
<tr><td valign="top"><em><a class="anchor" name="f1a96846496c5953b72b8002821778dd24d43c164f072dfdb19b9b3b739b5e2c"></a><!-- doxytag: member="mwEncrypt_RC2_128" ref="f1a96846496c5953b72b8002821778dd24d43c164f072dfdb19b9b3b739b5e2c" args="" -->mwEncrypt_RC2_128</em>&nbsp;</td><td>
encrypt all, RC2/128 cipher </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="8c72269dfed1ad1a32a2f44501c3961a"></a><!-- doxytag: member="mw_channel.h::mwChannel_accept" ref="8c72269dfed1ad1a32a2f44501c3961a" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mwChannel_accept           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Formally accept an incoming channel. 
<p>
Instructs the session to send a channel accept message to the server, and to mark the channel as being OPEN. 
</div>
</div><p>
<a class="anchor" name="7c85be3b885f7bb2119707e78c9f1c1d"></a><!-- doxytag: member="mw_channel.h::mwChannel_addSupportedCipherInstance" ref="7c85be3b885f7bb2119707e78c9f1c1d" args="(struct mwChannel *chan, struct mwCipherInstance *ci)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_addSupportedCipherInstance           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwCipherInstance.html">mwCipherInstance</a> *&nbsp;</td>
          <td class="paramname"> <em>ci</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
add a cipher instance to a channel's list of supported ciphers. 
<p>
Channel must be NEW. 
</div>
</div><p>
<a class="anchor" name="c0b5dba71d6c2ac2780b094bae9bda13"></a><!-- doxytag: member="mw_channel.h::mwChannel_create" ref="c0b5dba71d6c2ac2780b094bae9bda13" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mwChannel_create           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Formally open a channel. 
<p>
For outgoing channels: instruct the session to send a channel create message to the server, and to mark the channel (which must be in INIT status) as being in WAIT status.<p>
For incoming channels: configures the channel according to options in the channel create message. Marks the channel as being in WAIT status 
</div>
</div><p>
<a class="anchor" name="cbfd68a6393902b1e396c19086cb8703"></a><!-- doxytag: member="mw_channel.h::mwChannel_destroy" ref="cbfd68a6393902b1e396c19086cb8703" args="(struct mwChannel *chan, guint32 reason, struct mwOpaque *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mwChannel_destroy           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>reason</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroy a channel. 
<p>
Sends a channel-destroy message to the server, and perform cleanup to remove the channel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chan</em>&nbsp;</td><td>the channel to destroy </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>reason</em>&nbsp;</td><td>the reason code for closing the channel </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>optional additional information </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="dbaba2dd85c52344f8ff813673945664"></a><!-- doxytag: member="mw_channel.h::mwChannel_find" ref="dbaba2dd85c52344f8ff813673945664" args="(struct mwChannelSet *cs, guint32 chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwChannel.html">mwChannel</a>* mwChannel_find           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *&nbsp;</td>
          <td class="paramname"> <em>cs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>chan</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Obtain a reference to a channel by its id. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the channel matching chan, or NULL </dd></dl>

</div>
</div><p>
<a class="anchor" name="8308d484dffecd66a8c102fc81f614a1"></a><!-- doxytag: member="mw_channel.h::mwChannel_getAddtlAccept" ref="8308d484dffecd66a8c102fc81f614a1" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwOpaque.html">mwOpaque</a>* mwChannel_getAddtlAccept           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
direct reference to the accept addtl information for a channel 
<p>

</div>
</div><p>
<a class="anchor" name="b444dcf0acf717ed89658325aa27ced6"></a><!-- doxytag: member="mw_channel.h::mwChannel_getAddtlCreate" ref="b444dcf0acf717ed89658325aa27ced6" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwOpaque.html">mwOpaque</a>* mwChannel_getAddtlCreate           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
direct reference to the create addtl information for a channel 
<p>

</div>
</div><p>
<a class="anchor" name="8ac75f17835471f500aa0f1219948765"></a><!-- doxytag: member="mw_channel.h::mwChannel_getCipherInstance" ref="8ac75f17835471f500aa0f1219948765" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwCipherInstance.html">mwCipherInstance</a>* mwChannel_getCipherInstance           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="9eeee87028d25ba9addea3efa02409a4"></a><!-- doxytag: member="mw_channel.h::mwChannel_getEncryptPolicy" ref="9eeee87028d25ba9addea3efa02409a4" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">guint16 mwChannel_getEncryptPolicy           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Channel encryption policy. 
<p>
Cannot currently be set, used internally to automatically negotiate ciphers. Future revisions may allow this to be specified in a new channel to dictate channel encryption.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd>enum <a class="el" href="mw__channel_8h.html#f1a96846496c5953b72b8002821778dd" title="Policy for a channel, dictating what sort of encryption should be used, if any, and...">mwEncryptPolicy</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="205fb45f4f128840da446802a5b8858f"></a><!-- doxytag: member="mw_channel.h::mwChannel_getId" ref="205fb45f4f128840da446802a5b8858f" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">guint32 mwChannel_getId           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get the ID for a channel. 
<p>
0x00 indicates an error, as that is not a permissible value 
</div>
</div><p>
<a class="anchor" name="6cc4dc53011417c27ad7d34b814ee74d"></a><!-- doxytag: member="mw_channel.h::mwChannel_getOptions" ref="6cc4dc53011417c27ad7d34b814ee74d" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">guint32 mwChannel_getOptions           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="c2d6c9be2a7183b7db1548b737725fa0"></a><!-- doxytag: member="mw_channel.h::mwChannel_getProtoType" ref="c2d6c9be2a7183b7db1548b737725fa0" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">guint32 mwChannel_getProtoType           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="a59d3438ea8d7ddaa4aa66e7f96e0d25"></a><!-- doxytag: member="mw_channel.h::mwChannel_getProtoVer" ref="a59d3438ea8d7ddaa4aa66e7f96e0d25" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">guint32 mwChannel_getProtoVer           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="c1fea86d0accdaf564915e7a3d16084b"></a><!-- doxytag: member="mw_channel.h::mwChannel_getService" ref="c1fea86d0accdaf564915e7a3d16084b" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwService.html">mwService</a>* mwChannel_getService           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get the service for a channel. 
<p>
This may be NULL for NEW channels 
</div>
</div><p>
<a class="anchor" name="9edb54daf4ae35b0eb5d622b2b0a2332"></a><!-- doxytag: member="mw_channel.h::mwChannel_getServiceData" ref="9edb54daf4ae35b0eb5d622b2b0a2332" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gpointer mwChannel_getServiceData           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get service-specific data. 
<p>
This is for use by service implementations to easily associate information with the channel 
</div>
</div><p>
<a class="anchor" name="852573bda2f2153ea7bdc3ce4e44ecba"></a><!-- doxytag: member="mw_channel.h::mwChannel_getServiceId" ref="852573bda2f2153ea7bdc3ce4e44ecba" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">guint32 mwChannel_getServiceId           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get the ID of the service for a channel. 
<p>
This may be 0x00 for NEW channels 
</div>
</div><p>
<a class="anchor" name="92bb2b0deb246e539f96c71f07a88836"></a><!-- doxytag: member="mw_channel.h::mwChannel_getSession" ref="92bb2b0deb246e539f96c71f07a88836" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwSession.html">mwSession</a>* mwChannel_getSession           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get the session for a channel. 
<p>

</div>
</div><p>
<a class="anchor" name="7bcf55392672ce5cc803019884f0cf82"></a><!-- doxytag: member="mw_channel.h::mwChannel_getState" ref="7bcf55392672ce5cc803019884f0cf82" args="(struct mwChannel *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="mw__channel_8h.html#2f9ff901fd7b6e0f92c4f651b209fd11">mwChannelState</a> mwChannel_getState           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get the state of a channel 
<p>

</div>
</div><p>
<a class="anchor" name="5d3eb44fd65ec67e7e04c01ea49bdf2c"></a><!-- doxytag: member="mw_channel.h::mwChannel_getStatistic" ref="5d3eb44fd65ec67e7e04c01ea49bdf2c" args="(struct mwChannel *chan, enum mwChannelStatField stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gpointer mwChannel_getStatistic           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="mw__channel_8h.html#e48ef93585f681efb2f9e4eb702c365e">mwChannelStatField</a>&nbsp;</td>
          <td class="paramname"> <em>stat</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
obtain the value for a statistic field as a gpointer 
<p>

</div>
</div><p>
<a class="anchor" name="f5055c726c6d80ed0e451c5c95cc3794"></a><!-- doxytag: member="mw_channel.h::mwChannel_getSupportedCipherInstances" ref="f5055c726c6d80ed0e451c5c95cc3794" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GList* mwChannel_getSupportedCipherInstances           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
the list of supported ciphers for a channel. 
<p>
This list will be empty once a cipher has been selected for the channel 
</div>
</div><p>
<a class="anchor" name="5049f4cfefc749fca12d8d226f098d00"></a><!-- doxytag: member="mw_channel.h::mwChannel_getUser" ref="5049f4cfefc749fca12d8d226f098d00" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwLoginInfo.html">mwLoginInfo</a>* mwChannel_getUser           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
User at the other end of the channel. 
<p>
The target user for outgoing channels, the creator for incoming channels 
</div>
</div><p>
<a class="anchor" name="715a0d9c5d7ed3b81519d586cad7e73b"></a><!-- doxytag: member="mw_channel.h::mwChannel_newIncoming" ref="715a0d9c5d7ed3b81519d586cad7e73b" args="(struct mwChannelSet *, guint32 id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwChannel.html">mwChannel</a>* mwChannel_newIncoming           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>id</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create an incoming channel with the given channel id. 
<p>
Channel's state will be set to WAIT. Primarily for use in mw_session 
</div>
</div><p>
<a class="anchor" name="ca14ac73eda43fe18d5aa691c1705e11"></a><!-- doxytag: member="mw_channel.h::mwChannel_newOutgoing" ref="ca14ac73eda43fe18d5aa691c1705e11" args="(struct mwChannelSet *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwChannel.html">mwChannel</a>* mwChannel_newOutgoing           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create an outgoing channel. 
<p>
Its channel ID will be generated by the owning channel set. Channel's state will be set to INIT 
</div>
</div><p>
<a class="anchor" name="d140721caa97992d7e64cd6504965946"></a><!-- doxytag: member="mw_channel.h::mwChannel_populateSupportedCipherInstances" ref="d140721caa97992d7e64cd6504965946" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_populateSupportedCipherInstances           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
automatically adds instances of all ciphers in the session to the list of supported ciphers for a channel 
<p>

</div>
</div><p>
<a class="anchor" name="45bfb6bb37d6db073c593bbfcc48af92"></a><!-- doxytag: member="mw_channel.h::mwChannel_recv" ref="45bfb6bb37d6db073c593bbfcc48af92" args="(struct mwChannel *chan, struct mwMsgChannelSend *msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_recv           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwMsgChannelSend.html">mwMsgChannelSend</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Feed data into a channel. 
<p>

</div>
</div><p>
<a class="anchor" name="cdcc28872711d7b7cb17f403472448e5"></a><!-- doxytag: member="mw_channel.h::mwChannel_recvAccept" ref="cdcc28872711d7b7cb17f403472448e5" args="(struct mwChannel *chan, struct mwMsgChannelAccept *msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_recvAccept           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwMsgChannelAccept.html">mwMsgChannelAccept</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
pass an accept message to a channel for handling 
<p>

</div>
</div><p>
<a class="anchor" name="1172755c4bb709e9150691848ba4070f"></a><!-- doxytag: member="mw_channel.h::mwChannel_recvCreate" ref="1172755c4bb709e9150691848ba4070f" args="(struct mwChannel *chan, struct mwMsgChannelCreate *msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_recvCreate           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwMsgChannelCreate.html">mwMsgChannelCreate</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
pass a create message to a channel for handling 
<p>

</div>
</div><p>
<a class="anchor" name="0e66613f64ea68bebfae4c3e2fe1a50b"></a><!-- doxytag: member="mw_channel.h::mwChannel_recvDestroy" ref="0e66613f64ea68bebfae4c3e2fe1a50b" args="(struct mwChannel *chan, struct mwMsgChannelDestroy *msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_recvDestroy           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwMsgChannelDestroy.html">mwMsgChannelDestroy</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
pass a destroy message to a channel for handling 
<p>

</div>
</div><p>
<a class="anchor" name="288a0fc9ee0e2efbe16d6905a2bf158e"></a><!-- doxytag: member="mw_channel.h::mwChannel_removeServiceData" ref="288a0fc9ee0e2efbe16d6905a2bf158e" args="(struct mwChannel *chan)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_removeServiceData           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="ae6d4fb911cd040fb277d8caccf21d13"></a><!-- doxytag: member="mw_channel.h::mwChannel_selectCipherInstance" ref="ae6d4fb911cd040fb277d8caccf21d13" args="(struct mwChannel *chan, struct mwCipherInstance *ci)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_selectCipherInstance           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwCipherInstance.html">mwCipherInstance</a> *&nbsp;</td>
          <td class="paramname"> <em>ci</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
select a cipher instance for a channel. 
<p>
A NULL instance indicates that no encryption should be used. 
</div>
</div><p>
<a class="anchor" name="3c5c8c8fc12b5931e97e1456fac726cf"></a><!-- doxytag: member="mw_channel.h::mwChannel_send" ref="3c5c8c8fc12b5931e97e1456fac726cf" args="(struct mwChannel *chan, guint32 msg_type, struct mwOpaque *msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mwChannel_send           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>msg_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compose a send-on-channel message, encrypt it as per the channel's specification, and send it. 
<p>

</div>
</div><p>
<a class="anchor" name="9680f1baac754a86449e2f416fa2ac27"></a><!-- doxytag: member="mw_channel.h::mwChannel_sendEncrypted" ref="9680f1baac754a86449e2f416fa2ac27" args="(struct mwChannel *chan, guint32 msg_type, struct mwOpaque *msg, gboolean encrypt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mwChannel_sendEncrypted           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>msg_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwOpaque.html">mwOpaque</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gboolean&nbsp;</td>
          <td class="paramname"> <em>encrypt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compose a send-on-channel message, and if encrypt is TRUE, encrypt it as per the channel's specification, and send it. 
<p>

</div>
</div><p>
<a class="anchor" name="df361ad42cbffec92a393bc3e059c38e"></a><!-- doxytag: member="mw_channel.h::mwChannel_setOptions" ref="df361ad42cbffec92a393bc3e059c38e" args="(struct mwChannel *chan, guint32 options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_setOptions           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>options</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="dc7007d3b03fed371cd1f2a51321f04e"></a><!-- doxytag: member="mw_channel.h::mwChannel_setProtoType" ref="dc7007d3b03fed371cd1f2a51321f04e" args="(struct mwChannel *chan, guint32 proto_type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_setProtoType           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>proto_type</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="7f43ceb7857fadd26d24ad1294ba4d8b"></a><!-- doxytag: member="mw_channel.h::mwChannel_setProtoVer" ref="7f43ceb7857fadd26d24ad1294ba4d8b" args="(struct mwChannel *chan, guint32 proto_ver)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_setProtoVer           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">guint32&nbsp;</td>
          <td class="paramname"> <em>proto_ver</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="730aaae4bae3fdfe485cf4e62510bdd7"></a><!-- doxytag: member="mw_channel.h::mwChannel_setService" ref="730aaae4bae3fdfe485cf4e62510bdd7" args="(struct mwChannel *chan, struct mwService *srvc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_setService           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structmwService.html">mwService</a> *&nbsp;</td>
          <td class="paramname"> <em>srvc</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
associate a channel with an owning service 
<p>

</div>
</div><p>
<a class="anchor" name="e424543ba6d270f04d4819a7b77b5d47"></a><!-- doxytag: member="mw_channel.h::mwChannel_setServiceData" ref="e424543ba6d270f04d4819a7b77b5d47" args="(struct mwChannel *chan, gpointer data, GDestroyNotify clean)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannel_setServiceData           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannel.html">mwChannel</a> *&nbsp;</td>
          <td class="paramname"> <em>chan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpointer&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GDestroyNotify&nbsp;</td>
          <td class="paramname"> <em>clean</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
set service-specific data. 
<p>
This is for use by service implementations to easily associate information with the channel 
</div>
</div><p>
<a class="anchor" name="36ca1279d6e68a1e86a9f0126bc545cc"></a><!-- doxytag: member="mw_channel.h::mwChannelSet_free" ref="36ca1279d6e68a1e86a9f0126bc545cc" args="(struct mwChannelSet *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mwChannelSet_free           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clear and deallocate a channel set. 
<p>
Closes, clears, and frees all contained channels. 
</div>
</div><p>
<a class="anchor" name="78d3c4f046b9b2627f82d9c7a5238048"></a><!-- doxytag: member="mw_channel.h::mwChannelSet_new" ref="78d3c4f046b9b2627f82d9c7a5238048" args="(struct mwSession *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structmwChannelSet.html">mwChannelSet</a>* mwChannelSet_new           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmwSession.html">mwSession</a> *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocate and initialize a channel set for a session. 
<p>

</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Dec 19 09:10:34 2007 for meanwhile by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>