<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ccRTP: ioqueue.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a> | <a class="qindex" href="examples.html">Examples</a></div> <div class="nav"> <a class="el" href="dir_000000.html">src</a> » <a class="el" href="dir_000001.html">ccrtp</a></div> <h1>ioqueue.h</h1><a href="ioqueue_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2001,2002,2004 Federico Montesino Pouzols <fedemp@altern.org>.</span> <a name="l00002"></a>00002 <span class="comment">// </span> <a name="l00003"></a>00003 <span class="comment">// This program is free software; you can redistribute it and/or modify</span> <a name="l00004"></a>00004 <span class="comment">// it under the terms of the GNU General Public License as published by</span> <a name="l00005"></a>00005 <span class="comment">// the Free Software Foundation; either version 2 of the License, or</span> <a name="l00006"></a>00006 <span class="comment">// (at your option) any later version.</span> <a name="l00007"></a>00007 <span class="comment">// </span> <a name="l00008"></a>00008 <span class="comment">// This program is distributed in the hope that it will be useful,</span> <a name="l00009"></a>00009 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00010"></a>00010 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00011"></a>00011 <span class="comment">// GNU General Public License for more details.</span> <a name="l00012"></a>00012 <span class="comment">// </span> <a name="l00013"></a>00013 <span class="comment">// You should have received a copy of the GNU General Public License</span> <a name="l00014"></a>00014 <span class="comment">// along with this program; if not, write to the Free Software </span> <a name="l00015"></a>00015 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span> <a name="l00016"></a>00016 <span class="comment">// </span> <a name="l00017"></a>00017 <span class="comment">// As a special exception, you may use this file as part of a free software</span> <a name="l00018"></a>00018 <span class="comment">// library without restriction. Specifically, if other files instantiate</span> <a name="l00019"></a>00019 <span class="comment">// templates or use macros or inline functions from this file, or you compile</span> <a name="l00020"></a>00020 <span class="comment">// this file and link it with other files to produce an executable, this</span> <a name="l00021"></a>00021 <span class="comment">// file does not by itself cause the resulting executable to be covered by</span> <a name="l00022"></a>00022 <span class="comment">// the GNU General Public License. This exception does not however </span> <a name="l00023"></a>00023 <span class="comment">// invalidate any other reasons why the executable file might be covered by</span> <a name="l00024"></a>00024 <span class="comment">// the GNU General Public License. </span> <a name="l00025"></a>00025 <span class="comment">//</span> <a name="l00026"></a>00026 <span class="comment">// This exception applies only to the code released under the name GNU</span> <a name="l00027"></a>00027 <span class="comment">// ccRTP. If you copy code from other releases into a copy of GNU</span> <a name="l00028"></a>00028 <span class="comment">// ccRTP, as the General Public License permits, the exception does</span> <a name="l00029"></a>00029 <span class="comment">// not apply to the code that you add in this way. To avoid misleading</span> <a name="l00030"></a>00030 <span class="comment">// anyone as to the status of such modified files, you must delete</span> <a name="l00031"></a>00031 <span class="comment">// this exception notice from them.</span> <a name="l00032"></a>00032 <span class="comment">//</span> <a name="l00033"></a>00033 <span class="comment">// If you write modifications of your own for GNU ccRTP, it is your choice</span> <a name="l00034"></a>00034 <span class="comment">// whether to permit this exception to apply to your modifications.</span> <a name="l00035"></a>00035 <span class="comment">// If you do not wish that, delete this exception notice.</span> <a name="l00036"></a>00036 <span class="comment">//</span> <a name="l00037"></a>00037 <a name="l00044"></a>00044 <span class="preprocessor">#ifndef CCXX_RTP_IOQUEUE_H_</span> <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define CCXX_RTP_IOQUEUE_H_</span> <a name="l00046"></a>00046 <span class="preprocessor"></span> <a name="l00047"></a>00047 <span class="preprocessor">#include <<a class="code" href="iqueue_8h.html">ccrtp/iqueue.h</a>></span> <a name="l00048"></a>00048 <span class="preprocessor">#include <<a class="code" href="oqueue_8h.html">ccrtp/oqueue.h</a>></span> <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="keyword">namespace </span>ost { <a name="l00052"></a>00052 <span class="preprocessor">#endif</span> <a name="l00053"></a>00053 <span class="preprocessor"></span> <a name="l00077"></a><a class="code" href="class_r_t_p_data_queue.html">00077</a> <span class="keyword">class </span>__EXPORT RTPDataQueue : <a name="l00078"></a>00078 <span class="keyword">public</span> <a class="code" href="class_incoming_data_queue.html">IncomingDataQueue</a>, <a name="l00079"></a>00079 <span class="keyword">public</span> <a class="code" href="class_outgoing_data_queue.html">OutgoingDataQueue</a> <a name="l00080"></a>00080 { <a name="l00081"></a>00081 <span class="keyword">public</span>: <a name="l00101"></a><a class="code" href="class_r_t_p_data_queue.html#w2">00101</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { <a name="l00102"></a>00102 tosBestEffort, <a name="l00103"></a><a class="code" href="class_r_t_p_data_queue.html#w2w1">00103</a> tosEnhanced <a name="l00104"></a>00104 } Tos; <a name="l00105"></a>00105 <a name="l00118"></a>00118 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00119"></a><a class="code" href="class_r_t_p_data_queue.html#a0">00119</a> setTypeOfService(<a class="code" href="class_r_t_p_data_queue.html#w2">Tos</a> tos) <a name="l00120"></a>00120 { typeOfService = tos; } <a name="l00121"></a>00121 <a name="l00126"></a><a class="code" href="class_r_t_p_data_queue.html#a1">00126</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> enableStack() <a name="l00127"></a>00127 { dataServiceActive = <span class="keyword">true</span>; } <a name="l00128"></a>00128 <a name="l00134"></a>00134 <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a name="l00135"></a><a class="code" href="class_r_t_p_data_queue.html#a2">00135</a> isActive()<span class="keyword"> const</span> <a name="l00136"></a>00136 <span class="keyword"> </span>{ <span class="keywordflow">return</span> dataServiceActive; } <a name="l00137"></a>00137 <a name="l00197"></a>00197 uint32 <a name="l00198"></a>00198 getCurrentTimestamp() <span class="keyword">const</span>; <a name="l00199"></a>00199 <a name="l00207"></a>00207 <span class="keywordtype">void</span> <a name="l00208"></a><a class="code" href="class_r_t_p_data_queue.html#a4">00208</a> setSessionBandwidth(uint32 bw) <a name="l00209"></a>00209 { sessionBw = bw; } <a name="l00210"></a>00210 <a name="l00211"></a>00211 uint32 <a name="l00212"></a><a class="code" href="class_r_t_p_data_queue.html#a5">00212</a> getDefaultSessionBandwidth()<span class="keyword"> const</span> <a name="l00213"></a>00213 <span class="keyword"> </span>{ <span class="keywordflow">return</span> defaultSessionBw; } <a name="l00214"></a>00214 <a name="l00215"></a>00215 uint32 <a name="l00216"></a><a class="code" href="class_r_t_p_data_queue.html#a6">00216</a> getSessionBandwidth()<span class="keyword"> const</span> <a name="l00217"></a>00217 <span class="keyword"> </span>{ <span class="keywordflow">return</span> sessionBw; } <a name="l00218"></a>00218 <a name="l00222"></a>00222 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00223"></a><a class="code" href="class_r_t_p_data_queue.html#a7">00223</a> setTimeclock() <a name="l00224"></a>00224 { timeclock.setTimer(); } <a name="l00225"></a>00225 <a name="l00231"></a>00231 <span class="keyword">inline</span> timeout_t <a name="l00232"></a><a class="code" href="class_r_t_p_data_queue.html#a8">00232</a> getTimeclock()<span class="keyword"> const</span> <a name="l00233"></a>00233 <span class="keyword"> </span>{ <span class="keywordflow">return</span> timeclock.getElapsed(); } <a name="l00234"></a>00234 <a name="l00235"></a>00235 <span class="keyword">protected</span>: <a name="l00236"></a>00236 <a name="l00244"></a>00244 RTPDataQueue(uint32 size = defaultMembersHashSize); <a name="l00245"></a>00245 <a name="l00261"></a>00261 RTPDataQueue(uint32* ssrc, uint32 size = defaultMembersHashSize); <a name="l00262"></a>00262 <a name="l00267"></a>00267 <span class="keyword">inline</span> <span class="keyword">virtual</span> <a name="l00268"></a><a class="code" href="class_r_t_p_data_queue.html#b2">00268</a> ~RTPDataQueue() <a name="l00269"></a>00269 { endQueue(); } <a name="l00270"></a>00270 <a name="l00274"></a>00274 <span class="keyword">inline</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00275"></a><a class="code" href="class_r_t_p_data_queue.html#b3">00275</a> timerTick() <a name="l00276"></a>00276 { <span class="keywordflow">return</span>; } <a name="l00277"></a>00277 <a name="l00278"></a><a class="code" href="class_r_t_p_data_queue.html#b4">00278</a> <span class="keywordtype">void</span> renewLocalSSRC() <a name="l00279"></a>00279 {<a class="code" href="class_incoming_data_queue.html#b5">IncomingDataQueue::renewLocalSSRC</a>();}; <a name="l00280"></a>00280 <a name="l00281"></a>00281 <span class="keyword">private</span>: <a name="l00282"></a>00282 RTPDataQueue(<span class="keyword">const</span> RTPDataQueue &o); <a name="l00283"></a>00283 <a name="l00284"></a>00284 RTPDataQueue& <a name="l00285"></a>00285 operator=(<span class="keyword">const</span> RTPDataQueue &o); <a name="l00286"></a>00286 <a name="l00292"></a>00292 <span class="keywordtype">void</span> <a name="l00293"></a>00293 initQueue(); <a name="l00294"></a>00294 <a name="l00298"></a>00298 <span class="keywordtype">void</span> <a name="l00299"></a>00299 endQueue(); <a name="l00300"></a>00300 <a name="l00308"></a>00308 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a name="l00309"></a>00309 isPendingData(<a class="code" href="base_8h.html#a2">microtimeout_t</a> timeout) = 0; <a name="l00310"></a>00310 <a name="l00311"></a>00311 <span class="comment">// true if connection "active"</span> <a name="l00312"></a>00312 <span class="keyword">volatile</span> <span class="keywordtype">bool</span> dataServiceActive; <a name="l00313"></a>00313 Tos typeOfService; <a name="l00314"></a>00314 TimerPort timeclock; <a name="l00315"></a>00315 <span class="comment">/* RTP session bandwidth control */</span> <a name="l00316"></a>00316 <span class="keyword">static</span> <span class="keyword">const</span> uint32 defaultSessionBw; <a name="l00317"></a>00317 uint32 sessionBw; <a name="l00318"></a>00318 <a name="l00319"></a>00319 <a name="l00320"></a>00320 }; <a name="l00321"></a>00321 <span class="comment">// ioqueue</span> <a name="l00323"></a>00323 <a name="l00324"></a>00324 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00325"></a>00325 <span class="preprocessor"></span>} <a name="l00326"></a>00326 <span class="preprocessor">#endif</span> <a name="l00327"></a>00327 <span class="preprocessor"></span> <a name="l00328"></a>00328 <span class="preprocessor">#endif //CCXX_RTP_IOQUEUE_H_</span> <a name="l00329"></a>00329 <span class="preprocessor"></span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Dec 9 22:32:03 2005 for ccRTP by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> </html>