Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 626e7b9df2c26f4a1ac4abc5819592a1 > files > 90

atlascpp-devel-0.6.2-1.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Atlas-C++: Stream.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Atlas-C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Stream.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This file may be redistributed and modified only under the terms of</span>
<a name="l00002"></a>00002 <span class="comment">// the GNU Lesser General Public License (See COPYING for details).</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright (C) 2000-2001 Michael Day, Dmitry Derevyanko, Stefanus Du Toit</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="comment">// $Id$</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef ATLAS_NET_STREAM_H</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define ATLAS_NET_STREAM_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;Atlas/Negotiate.h&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;iosfwd&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="keyword">namespace </span>Atlas { 
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="keyword">class </span>Bridge;
<a name="l00019"></a>00019 
<a name="l00023"></a>00023 <span class="keyword">namespace </span>Net {
<a name="l00024"></a>00024 
<a name="l00036"></a><a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html">00036</a>   <span class="keyword">class </span><a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html" title="Negotiation of codecs and filters for an Atlas connection.">NegotiateHelper</a> {
<a name="l00037"></a>00037 
<a name="l00038"></a>00038   <span class="keyword">public</span>:
<a name="l00039"></a>00039 
<a name="l00040"></a>00040     <a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html" title="Negotiation of codecs and filters for an Atlas connection.">NegotiateHelper</a>(std::list&lt;std::string&gt; &amp; names);
<a name="l00041"></a>00041 
<a name="l00042"></a>00042     <span class="keywordtype">bool</span> <span class="keyword">get</span>(std::string &amp;buf, <span class="keyword">const</span> std::string &amp; header);
<a name="l00043"></a>00043     <span class="keywordtype">void</span> put(std::string &amp;buf, <span class="keyword">const</span> std::string &amp; header);
<a name="l00044"></a>00044 
<a name="l00045"></a>00045   <span class="keyword">private</span>:
<a name="l00046"></a>00046 
<a name="l00047"></a>00047     std::list&lt;std::string&gt; &amp; m_names;
<a name="l00048"></a>00048 
<a name="l00049"></a>00049   };
<a name="l00050"></a>00050 
<a name="l00058"></a><a class="code" href="class_atlas_1_1_net_1_1_stream_connect.html">00058</a> <span class="keyword">class </span><a class="code" href="class_atlas_1_1_net_1_1_stream_connect.html" title="Negotiation of clients building a connection to a remote system.">StreamConnect</a> : <span class="keyword">public</span> Atlas::<a class="code" href="class_atlas_1_1_negotiate.html" title="Negotiation of codecs and filters for an Atlas connection.">Negotiate</a>
<a name="l00059"></a>00059 {
<a name="l00060"></a>00060     <span class="keyword">public</span>:
<a name="l00061"></a>00061 
<a name="l00062"></a>00062     <a class="code" href="class_atlas_1_1_net_1_1_stream_connect.html" title="Negotiation of clients building a connection to a remote system.">StreamConnect</a>(<span class="keyword">const</span> std::string&amp; name, std::iostream&amp;);
<a name="l00063"></a>00063 
<a name="l00064"></a>00064     <span class="keyword">virtual</span> ~<a class="code" href="class_atlas_1_1_net_1_1_stream_connect.html" title="Negotiation of clients building a connection to a remote system.">StreamConnect</a>();
<a name="l00065"></a>00065 
<a name="l00066"></a>00066     <span class="keyword">virtual</span> <span class="keywordtype">void</span> poll(<span class="keywordtype">bool</span> can_read = <span class="keyword">true</span>);
<a name="l00067"></a>00067 
<a name="l00068"></a>00068     <span class="keyword">virtual</span> State getState();
<a name="l00069"></a>00069     <span class="keyword">virtual</span> <a class="code" href="class_atlas_1_1_codec.html" title="Atlas stream codec.">Atlas::Codec</a> * getCodec(<a class="code" href="class_atlas_1_1_bridge.html" title="Atlas stream bridge.">Atlas::Bridge</a>&amp;);
<a name="l00070"></a>00070 
<a name="l00071"></a>00071     <span class="keyword">private</span>:
<a name="l00072"></a>00072 
<a name="l00073"></a>00073     <span class="keyword">enum</span>
<a name="l00074"></a>00074     {
<a name="l00075"></a>00075         SERVER_GREETING,
<a name="l00076"></a>00076         CLIENT_GREETING,
<a name="l00077"></a>00077         CLIENT_CODECS,
<a name="l00078"></a>00078         SERVER_CODECS,
<a name="l00079"></a>00079         <span class="comment">// CLIENT_FILTERS,</span>
<a name="l00080"></a>00080         <span class="comment">// SERVER_FILTERS,</span>
<a name="l00081"></a>00081         DONE
<a name="l00082"></a>00082     };
<a name="l00083"></a>00083 
<a name="l00084"></a>00084     <span class="keywordtype">int</span> m_state;
<a name="l00085"></a>00085 
<a name="l00086"></a>00086     std::string m_outName;
<a name="l00087"></a>00087     std::string m_inName;
<a name="l00088"></a>00088     std::iostream&amp; m_socket;
<a name="l00089"></a>00089     std::list&lt;std::string&gt; m_inCodecs;
<a name="l00090"></a>00090     std::list&lt;std::string&gt; m_inFilters;
<a name="l00091"></a>00091   
<a name="l00092"></a>00092     <a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html" title="Negotiation of codecs and filters for an Atlas connection.">NegotiateHelper</a> m_codecHelper;
<a name="l00093"></a>00093     <a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html" title="Negotiation of codecs and filters for an Atlas connection.">NegotiateHelper</a> m_filterHelper;
<a name="l00094"></a>00094     std::string m_buf;
<a name="l00095"></a>00095 
<a name="l00096"></a>00096     <span class="keywordtype">void</span> processServerCodecs();
<a name="l00097"></a>00097     <span class="keywordtype">void</span> processServerFilters();
<a name="l00098"></a>00098 
<a name="l00099"></a>00099     <span class="comment">//void processClientCodecs();</span>
<a name="l00100"></a>00100     <span class="comment">//void processClientFilters();</span>
<a name="l00101"></a>00101 
<a name="l00102"></a>00102     <span class="keywordtype">bool</span> m_canPacked;
<a name="l00103"></a>00103     <span class="keywordtype">bool</span> m_canXML;
<a name="l00104"></a>00104     <span class="keywordtype">bool</span> m_canBach;
<a name="l00105"></a>00105 
<a name="l00106"></a>00106     <span class="keywordtype">bool</span> m_canGzip;
<a name="l00107"></a>00107     <span class="keywordtype">bool</span> m_canBzip2;
<a name="l00108"></a>00108 };
<a name="l00109"></a>00109  
<a name="l00118"></a><a class="code" href="class_atlas_1_1_net_1_1_stream_accept.html">00118</a> <span class="keyword">class </span><a class="code" href="class_atlas_1_1_net_1_1_stream_accept.html" title="Negotiation of servers accepting a connection from a remote system.">StreamAccept</a> : <span class="keyword">public</span> Atlas::<a class="code" href="class_atlas_1_1_negotiate.html" title="Negotiation of codecs and filters for an Atlas connection.">Negotiate</a>
<a name="l00119"></a>00119 {
<a name="l00120"></a>00120     <span class="keyword">public</span>:
<a name="l00121"></a>00121 
<a name="l00122"></a>00122     <a class="code" href="class_atlas_1_1_net_1_1_stream_accept.html" title="Negotiation of servers accepting a connection from a remote system.">StreamAccept</a>(<span class="keyword">const</span> std::string&amp; name, std::iostream&amp;);
<a name="l00123"></a>00123 
<a name="l00124"></a>00124     <span class="keyword">virtual</span> ~<a class="code" href="class_atlas_1_1_net_1_1_stream_accept.html" title="Negotiation of servers accepting a connection from a remote system.">StreamAccept</a>();
<a name="l00125"></a>00125 
<a name="l00126"></a>00126     <span class="keyword">virtual</span> <span class="keywordtype">void</span> poll(<span class="keywordtype">bool</span> can_read = <span class="keyword">true</span>);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128     <span class="keyword">virtual</span> State getState();
<a name="l00129"></a>00129     <span class="keyword">virtual</span> <a class="code" href="class_atlas_1_1_codec.html" title="Atlas stream codec.">Atlas::Codec</a> * getCodec(<a class="code" href="class_atlas_1_1_bridge.html" title="Atlas stream bridge.">Atlas::Bridge</a>&amp;);
<a name="l00130"></a>00130 
<a name="l00131"></a>00131     <span class="keyword">private</span>:
<a name="l00132"></a>00132 
<a name="l00133"></a>00133     <span class="keyword">enum</span>
<a name="l00134"></a>00134     {
<a name="l00135"></a>00135         SERVER_GREETING,
<a name="l00136"></a>00136         CLIENT_GREETING,
<a name="l00137"></a>00137         CLIENT_CODECS,
<a name="l00138"></a>00138         SERVER_CODECS,
<a name="l00139"></a>00139         CLIENT_FILTERS,
<a name="l00140"></a>00140         SERVER_FILTERS,
<a name="l00141"></a>00141         DONE
<a name="l00142"></a>00142     };
<a name="l00143"></a>00143 
<a name="l00144"></a>00144     <span class="keywordtype">int</span> m_state;
<a name="l00145"></a>00145 
<a name="l00146"></a>00146     std::string m_outName;
<a name="l00147"></a>00147     std::string m_inName;
<a name="l00148"></a>00148     std::iostream&amp; m_socket;
<a name="l00149"></a>00149     std::list&lt;std::string&gt; m_inCodecs;
<a name="l00150"></a>00150     std::list&lt;std::string&gt; m_inFilters;
<a name="l00151"></a>00151   
<a name="l00152"></a>00152     <a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html" title="Negotiation of codecs and filters for an Atlas connection.">NegotiateHelper</a> m_codecHelper;
<a name="l00153"></a>00153     <a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html" title="Negotiation of codecs and filters for an Atlas connection.">NegotiateHelper</a> m_filterHelper;
<a name="l00154"></a>00154     std::string m_buf;
<a name="l00155"></a>00155 
<a name="l00156"></a>00156     <span class="comment">//void processServerCodecs();</span>
<a name="l00157"></a>00157     <span class="comment">//void processServerFilters();</span>
<a name="l00158"></a>00158 
<a name="l00159"></a>00159     <span class="keywordtype">void</span> processClientCodecs();
<a name="l00160"></a>00160     <span class="keywordtype">void</span> processClientFilters();
<a name="l00161"></a>00161 
<a name="l00162"></a>00162     <span class="keywordtype">bool</span> m_canPacked;
<a name="l00163"></a>00163     <span class="keywordtype">bool</span> m_canXML;
<a name="l00164"></a>00164     <span class="keywordtype">bool</span> m_canBach;
<a name="l00165"></a>00165 
<a name="l00166"></a>00166     <span class="keywordtype">bool</span> m_canGzip;
<a name="l00167"></a>00167     <span class="keywordtype">bool</span> m_canBzip2;
<a name="l00168"></a>00168 };
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 } } <span class="comment">// namespace Atlas::Net</span>
<a name="l00171"></a>00171 
<a name="l00172"></a>00172 <span class="preprocessor">#endif</span>
<a name="l00173"></a>00173 <span class="preprocessor"></span>
</pre></div></div>
</div>
<HR>
<P>Copyright 2000-2004 the respective authors.</P>
<P>This document can be licensed under the terms of the GNU Free Documentation
License or the GNU General Public License and may be freely distributed under
the terms given by one of these licenses.</P>