Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > c200d180bc1063a7706e0da42a546b51 > files > 90

atlascpp-devel-0.6.1-7.fc12.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>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.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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 class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<h1>Stream.h</h1><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="preprocessor">#ifndef ATLAS_NET_STREAM_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define ATLAS_NET_STREAM_H</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;Atlas/Negotiate.h&gt;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;iosfwd&gt;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 <span class="keyword">namespace </span>Atlas { 
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="keyword">class </span>Bridge;
<a name="l00017"></a>00017 
<a name="l00021"></a>00021 <span class="keyword">namespace </span>Net {
<a name="l00022"></a>00022 
<a name="l00034"></a><a class="code" href="class_atlas_1_1_net_1_1_negotiate_helper.html">00034</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="l00035"></a>00035 
<a name="l00036"></a>00036   <span class="keyword">public</span>:
<a name="l00037"></a>00037 
<a name="l00038"></a>00038     <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="l00039"></a>00039 
<a name="l00040"></a>00040     <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="l00041"></a>00041     <span class="keywordtype">void</span> put(std::string &amp;buf, <span class="keyword">const</span> std::string &amp; header);
<a name="l00042"></a>00042 
<a name="l00043"></a>00043   <span class="keyword">private</span>:
<a name="l00044"></a>00044 
<a name="l00045"></a>00045     std::list&lt;std::string&gt; &amp; m_names;
<a name="l00046"></a>00046 
<a name="l00047"></a>00047   };
<a name="l00048"></a>00048 
<a name="l00056"></a><a class="code" href="class_atlas_1_1_net_1_1_stream_connect.html">00056</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="l00057"></a>00057 {
<a name="l00058"></a>00058     <span class="keyword">public</span>:
<a name="l00059"></a>00059 
<a name="l00060"></a>00060     <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="l00061"></a>00061 
<a name="l00062"></a>00062     <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="l00063"></a>00063 
<a name="l00064"></a>00064     <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="l00065"></a>00065 
<a name="l00066"></a>00066     <span class="keyword">virtual</span> State getState();
<a name="l00067"></a>00067     <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="l00068"></a>00068 
<a name="l00069"></a>00069     <span class="keyword">private</span>:
<a name="l00070"></a>00070 
<a name="l00071"></a>00071     <span class="keyword">enum</span>
<a name="l00072"></a>00072     {
<a name="l00073"></a>00073         SERVER_GREETING,
<a name="l00074"></a>00074         CLIENT_GREETING,
<a name="l00075"></a>00075         CLIENT_CODECS,
<a name="l00076"></a>00076         SERVER_CODECS,
<a name="l00077"></a>00077         <span class="comment">// CLIENT_FILTERS,</span>
<a name="l00078"></a>00078         <span class="comment">// SERVER_FILTERS,</span>
<a name="l00079"></a>00079         DONE
<a name="l00080"></a>00080     };
<a name="l00081"></a>00081 
<a name="l00082"></a>00082     <span class="keywordtype">int</span> m_state;
<a name="l00083"></a>00083 
<a name="l00084"></a>00084     std::string m_outName;
<a name="l00085"></a>00085     std::string m_inName;
<a name="l00086"></a>00086     std::iostream&amp; m_socket;
<a name="l00087"></a>00087     std::list&lt;std::string&gt; m_inCodecs;
<a name="l00088"></a>00088     std::list&lt;std::string&gt; m_inFilters;
<a name="l00089"></a>00089   
<a name="l00090"></a>00090     <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="l00091"></a>00091     <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="l00092"></a>00092     std::string m_buf;
<a name="l00093"></a>00093 
<a name="l00094"></a>00094     <span class="keywordtype">void</span> processServerCodecs();
<a name="l00095"></a>00095     <span class="keywordtype">void</span> processServerFilters();
<a name="l00096"></a>00096 
<a name="l00097"></a>00097     <span class="comment">//void processClientCodecs();</span>
<a name="l00098"></a>00098     <span class="comment">//void processClientFilters();</span>
<a name="l00099"></a>00099 
<a name="l00100"></a>00100     <span class="keywordtype">bool</span> m_canPacked;
<a name="l00101"></a>00101     <span class="keywordtype">bool</span> m_canXML;
<a name="l00102"></a>00102     <span class="keywordtype">bool</span> m_canBach;
<a name="l00103"></a>00103 
<a name="l00104"></a>00104     <span class="keywordtype">bool</span> m_canGzip;
<a name="l00105"></a>00105     <span class="keywordtype">bool</span> m_canBzip2;
<a name="l00106"></a>00106 };
<a name="l00107"></a>00107  
<a name="l00116"></a><a class="code" href="class_atlas_1_1_net_1_1_stream_accept.html">00116</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="l00117"></a>00117 {
<a name="l00118"></a>00118     <span class="keyword">public</span>:
<a name="l00119"></a>00119 
<a name="l00120"></a>00120     <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="l00121"></a>00121 
<a name="l00122"></a>00122     <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="l00123"></a>00123 
<a name="l00124"></a>00124     <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="l00125"></a>00125 
<a name="l00126"></a>00126     <span class="keyword">virtual</span> State getState();
<a name="l00127"></a>00127     <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="l00128"></a>00128 
<a name="l00129"></a>00129     <span class="keyword">private</span>:
<a name="l00130"></a>00130 
<a name="l00131"></a>00131     <span class="keyword">enum</span>
<a name="l00132"></a>00132     {
<a name="l00133"></a>00133         SERVER_GREETING,
<a name="l00134"></a>00134         CLIENT_GREETING,
<a name="l00135"></a>00135         CLIENT_CODECS,
<a name="l00136"></a>00136         SERVER_CODECS,
<a name="l00137"></a>00137         CLIENT_FILTERS,
<a name="l00138"></a>00138         SERVER_FILTERS,
<a name="l00139"></a>00139         DONE
<a name="l00140"></a>00140     };
<a name="l00141"></a>00141 
<a name="l00142"></a>00142     <span class="keywordtype">int</span> m_state;
<a name="l00143"></a>00143 
<a name="l00144"></a>00144     std::string m_outName;
<a name="l00145"></a>00145     std::string m_inName;
<a name="l00146"></a>00146     std::iostream&amp; m_socket;
<a name="l00147"></a>00147     std::list&lt;std::string&gt; m_inCodecs;
<a name="l00148"></a>00148     std::list&lt;std::string&gt; m_inFilters;
<a name="l00149"></a>00149   
<a name="l00150"></a>00150     <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="l00151"></a>00151     <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="l00152"></a>00152     std::string m_buf;
<a name="l00153"></a>00153 
<a name="l00154"></a>00154     <span class="comment">//void processServerCodecs();</span>
<a name="l00155"></a>00155     <span class="comment">//void processServerFilters();</span>
<a name="l00156"></a>00156 
<a name="l00157"></a>00157     <span class="keywordtype">void</span> processClientCodecs();
<a name="l00158"></a>00158     <span class="keywordtype">void</span> processClientFilters();
<a name="l00159"></a>00159 
<a name="l00160"></a>00160     <span class="keywordtype">bool</span> m_canPacked;
<a name="l00161"></a>00161     <span class="keywordtype">bool</span> m_canXML;
<a name="l00162"></a>00162     <span class="keywordtype">bool</span> m_canBach;
<a name="l00163"></a>00163 
<a name="l00164"></a>00164     <span class="keywordtype">bool</span> m_canGzip;
<a name="l00165"></a>00165     <span class="keywordtype">bool</span> m_canBzip2;
<a name="l00166"></a>00166 };
<a name="l00167"></a>00167 
<a name="l00168"></a>00168 } } <span class="comment">// namespace Atlas::Net</span>
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 <span class="preprocessor">#endif</span>
<a name="l00171"></a>00171 <span class="preprocessor"></span>
</pre></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>