Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 598246a3099b0106d22dd5249478d3b7 > files > 259

ccrtp-devel-1.7.1-2.fc12.i686.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>ccRTP: sources.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="modules.html"><span>Modules</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>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>sources.h</h1><a href="sources_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,2003,2004 Federico Montesino Pouzols &lt;fedemp@altern.org&gt;.</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_SOURCES_H_</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define CCXX_RTP_SOURCES_H_</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;<a class="code" href="rtcppkt_8h.html" title="RTCP packets handling.">ccrtp/rtcppkt.h</a>&gt;</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="l00067"></a><a class="code" href="class_s_d_e_s_items_holder.html">00067</a> <span class="keyword">class </span>__EXPORT <a class="code" href="class_s_d_e_s_items_holder.html" title="Holds the SDES items and related information from a participant in an RTP application...">SDESItemsHolder</a>
<a name="l00068"></a>00068 {
<a name="l00069"></a>00069 <span class="keyword">public</span>:
<a name="l00070"></a>00070         <span class="keyword">const</span> std::string&amp;
<a name="l00071"></a>00071         getItem(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> type) <span class="keyword">const</span>;
<a name="l00072"></a>00072 
<a name="l00073"></a>00073         <span class="keyword">inline</span> <span class="keyword">const</span> std::string&amp; 
<a name="l00074"></a><a class="code" href="class_s_d_e_s_items_holder.html#75c4089724bf170b962417818ee025b2">00074</a>         getPRIVPrefix()<span class="keyword"> const</span>
<a name="l00075"></a>00075 <span class="keyword">        </span>{ <span class="keywordflow">return</span> sdesItems[<a class="code" href="group__rtcppacket.html#ggf6d38e5ccbbcdf2a24ebbd4fc5b4eeac2ab157e2799e810547d13a26088c9e01" title="END of SDES item list.">SDESItemTypeEND</a>]; }
<a name="l00076"></a>00076 
<a name="l00077"></a>00077         <span class="keywordtype">void</span>
<a name="l00078"></a>00078         setItem(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> item, <span class="keyword">const</span> std::string&amp; val);
<a name="l00079"></a>00079         
<a name="l00080"></a>00080         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00081"></a><a class="code" href="class_s_d_e_s_items_holder.html#8c1fe0c3f96576d3ac7f419c20806e71">00081</a>         setPRIVPrefix(<span class="keyword">const</span> std::string&amp; val)
<a name="l00082"></a>00082         { sdesItems[<a class="code" href="group__rtcppacket.html#ggf6d38e5ccbbcdf2a24ebbd4fc5b4eeac2ab157e2799e810547d13a26088c9e01" title="END of SDES item list.">SDESItemTypeEND</a>] = val; }
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="keyword">protected</span>:
<a name="l00085"></a><a class="code" href="class_s_d_e_s_items_holder.html#e42e198f89cf203f859576533fc0be47">00085</a>         <a class="code" href="class_s_d_e_s_items_holder.html" title="Holds the SDES items and related information from a participant in an RTP application...">SDESItemsHolder</a>()
<a name="l00086"></a>00086         { }
<a name="l00087"></a>00087         
<a name="l00088"></a><a class="code" href="class_s_d_e_s_items_holder.html#23221862a9e9aa2fd0a37994bc94d4df">00088</a>         <span class="keyword">inline</span> <span class="keyword">virtual</span> ~<a class="code" href="class_s_d_e_s_items_holder.html" title="Holds the SDES items and related information from a participant in an RTP application...">SDESItemsHolder</a>()
<a name="l00089"></a>00089         { }
<a name="l00090"></a>00090         
<a name="l00091"></a>00091 <span class="keyword">private</span>:
<a name="l00092"></a>00092         <span class="comment">// SDES items for a participant.</span>
<a name="l00093"></a>00093         <span class="comment">// sdesItems[0] (== sdesItems[SDESItemTypeEND]) holds the prefix</span>
<a name="l00094"></a>00094         <span class="comment">// value for the PRIV item. The rest of entries hold the</span>
<a name="l00095"></a>00095         <span class="comment">// correponding SDES item value.</span>
<a name="l00096"></a>00096         std::string sdesItems[<a class="code" href="group__rtcppacket.html#ggf6d38e5ccbbcdf2a24ebbd4fc5b4eeace3244c9d0a70415a4c0270893d628a3f" title="Last defined code.">SDESItemTypeLast</a> + 1];
<a name="l00097"></a>00097 };
<a name="l00098"></a>00098 
<a name="l00127"></a><a class="code" href="class_participant.html">00127</a> <span class="keyword">class </span>__EXPORT <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a> : <span class="keyword">private</span> <a class="code" href="class_s_d_e_s_items_holder.html" title="Holds the SDES items and related information from a participant in an RTP application...">SDESItemsHolder</a>
<a name="l00128"></a>00128 {
<a name="l00129"></a>00129 <span class="keyword">public</span>:
<a name="l00142"></a>00142         <span class="keyword">const</span> std::string&amp;
<a name="l00143"></a><a class="code" href="class_participant.html#09080be78b19740b978800a1ec51bc3e">00143</a>         getSDESItem(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> type)<span class="keyword"> const</span>
<a name="l00144"></a>00144 <span class="keyword">        </span>{ <span class="keywordflow">return</span> <a class="code" href="class_s_d_e_s_items_holder.html#4440cb142892dc911c6c35a8b16d1ee6">SDESItemsHolder::getItem</a>(type); }
<a name="l00145"></a>00145 
<a name="l00153"></a>00153         <span class="keyword">inline</span> <span class="keyword">const</span> std::string&amp; 
<a name="l00154"></a><a class="code" href="class_participant.html#5e0f43f97faa6466378859b0ea6cd256">00154</a>         getPRIVPrefix()<span class="keyword"> const</span>
<a name="l00155"></a>00155 <span class="keyword">        </span>{ <span class="keywordflow">return</span> <a class="code" href="class_s_d_e_s_items_holder.html#75c4089724bf170b962417818ee025b2">SDESItemsHolder::getPRIVPrefix</a>(); }
<a name="l00156"></a>00156 
<a name="l00162"></a>00162         <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>(<span class="keyword">const</span> std::string&amp; cname);
<a name="l00163"></a>00163 
<a name="l00164"></a>00164         ~<a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>();
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="keyword">private</span>:
<a name="l00167"></a><a class="code" href="class_participant.html#c5f576c6041abd2767b03df2263aa432">00167</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_participant_handler.html" title="Participant objects modification methods.">ParticipantHandler</a>;
<a name="l00168"></a>00168 
<a name="l00172"></a>00172         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00173"></a>00173         <a class="code" href="class_participant_handler.html#0d8b6d3877d6643eda12bb2018f6e0b7">setSDESItem</a>(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> item, <span class="keyword">const</span> std::string&amp; val)
<a name="l00174"></a>00174         { <a class="code" href="class_s_d_e_s_items_holder.html#82dfc1ebf79f9a677ee943e6664a67cb">SDESItemsHolder::setItem</a>(item,val); }
<a name="l00175"></a>00175 
<a name="l00179"></a>00179         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00180"></a>00180         <a class="code" href="class_participant_handler.html#b905220f12970024aac76e02f0d20d66">setPRIVPrefix</a>(<span class="keyword">const</span> std::string val)
<a name="l00181"></a>00181         { <a class="code" href="class_participant_handler.html#b905220f12970024aac76e02f0d20d66">SDESItemsHolder::setPRIVPrefix</a>(val); }
<a name="l00182"></a>00182 };
<a name="l00183"></a>00183 
<a name="l00195"></a><a class="code" href="class_sync_source.html">00195</a> <span class="keyword">class </span>__EXPORT <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>
<a name="l00196"></a>00196 {
<a name="l00197"></a>00197 <span class="keyword">public</span>:
<a name="l00228"></a><a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc">00228</a>         <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00229"></a><a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc9da650c2b6f936142c9cb8327074ca0c">00229</a>                 stateUnknown,     
<a name="l00230"></a><a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc02d96a9f7e46e64298ac7b6174f31e89">00230</a>                 statePrevalid,    
<a name="l00231"></a>00231 
<a name="l00232"></a>00232 
<a name="l00233"></a><a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc5be3203fa0ead7600c5eae6599139876">00233</a>                 stateActive,      
<a name="l00234"></a>00234 
<a name="l00235"></a><a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc59ef5b5115a418a31877ec7a17a266d3">00235</a>                 stateInactive,    
<a name="l00236"></a>00236 
<a name="l00237"></a>00237 
<a name="l00238"></a><a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dcb50b90a686532c1acea01fab12c4574b">00238</a>                 stateLeaving      
<a name="l00239"></a>00239 
<a name="l00240"></a>00240         }       State;
<a name="l00241"></a>00241 
<a name="l00246"></a>00246         <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>(uint32 ssrc); 
<a name="l00247"></a>00247 
<a name="l00248"></a>00248         ~<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>();
<a name="l00249"></a>00249 
<a name="l00250"></a>00250         State
<a name="l00251"></a><a class="code" href="class_sync_source.html#9ddc2116e7f91c80079882d4a33e647d">00251</a>         getState()<span class="keyword"> const</span>
<a name="l00252"></a>00252 <span class="keyword">        </span>{ <span class="keywordflow">return</span> state; }
<a name="l00253"></a>00253 
<a name="l00257"></a><a class="code" href="class_sync_source.html#4611a2bc6c86e27d79945ad26a1e8e31">00257</a>         <span class="keywordtype">bool</span> isSender()<span class="keyword"> const</span>
<a name="l00258"></a>00258 <span class="keyword">        </span>{ <span class="keywordflow">return</span> activeSender; }
<a name="l00259"></a>00259 
<a name="l00260"></a><a class="code" href="class_sync_source.html#67da73d6d3aedc50fc4493857871143b">00260</a>         uint32 getID()<span class="keyword"> const</span>
<a name="l00261"></a>00261 <span class="keyword">        </span>{ <span class="keywordflow">return</span> SSRC; }
<a name="l00262"></a>00262 
<a name="l00270"></a>00270         <span class="keyword">inline</span> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>*
<a name="l00271"></a><a class="code" href="class_sync_source.html#2be8658512af88c5a25f2786d7024d37">00271</a>         getParticipant()<span class="keyword"> const</span>
<a name="l00272"></a>00272 <span class="keyword">        </span>{ <span class="keywordflow">return</span> participant; }
<a name="l00273"></a>00273 
<a name="l00274"></a><a class="code" href="class_sync_source.html#d8646f90825758d06c9f63a13be9b58c">00274</a>         tpport_t getDataTransportPort()<span class="keyword"> const</span>
<a name="l00275"></a>00275 <span class="keyword">        </span>{ <span class="keywordflow">return</span> dataTransportPort; }
<a name="l00276"></a>00276 
<a name="l00277"></a><a class="code" href="class_sync_source.html#56536e209e445a4f130e3e42a41bd027">00277</a>         tpport_t getControlTransportPort()<span class="keyword"> const</span>
<a name="l00278"></a>00278 <span class="keyword">        </span>{ <span class="keywordflow">return</span> controlTransportPort; }
<a name="l00279"></a>00279         
<a name="l00280"></a><a class="code" href="class_sync_source.html#9f92cbd6190fecc9bba3a54217b0d00a">00280</a>         <span class="keyword">const</span> InetAddress&amp; getNetworkAddress()<span class="keyword"> const</span>
<a name="l00281"></a>00281 <span class="keyword">        </span>{ <span class="keywordflow">return</span> networkAddress; }
<a name="l00282"></a>00282 
<a name="l00283"></a>00283 <span class="keyword">protected</span>:
<a name="l00287"></a>00287         <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>(<span class="keyword">const</span> <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>&amp; source);
<a name="l00288"></a>00288 
<a name="l00289"></a>00289         <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>&amp;
<a name="l00290"></a>00290         operator=(<span class="keyword">const</span> <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>&amp; source);
<a name="l00291"></a>00291 
<a name="l00292"></a>00292 <span class="keyword">private</span>:
<a name="l00293"></a><a class="code" href="class_sync_source.html#fc35a856c46a7c673c38317bc872a2ae">00293</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_sync_source_handler.html" title="SyncSource objects modification methods.">SyncSourceHandler</a>;
<a name="l00294"></a>00294 
<a name="l00295"></a>00295         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00296"></a>00296         <a class="code" href="class_sync_source_handler.html#b25f7c1d845ea466cf955b4b6be45165">setState</a>(<a class="code" href="class_sync_source.html#e1ed2a19bbfd03de69fbdfc044f2c5dc" title="Synchronization source states during an RTP session.">State</a> st)
<a name="l00297"></a>00297         { state = st; }
<a name="l00298"></a>00298 
<a name="l00302"></a>00302         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00303"></a>00303         <a class="code" href="class_sync_source_handler.html#aafbdeb950f765f8f121eaf6688c7367">setSender</a>(<span class="keywordtype">bool</span> active)
<a name="l00304"></a>00304         { activeSender = active; }
<a name="l00305"></a>00305 
<a name="l00306"></a>00306         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00307"></a>00307         <a class="code" href="class_sync_source_handler.html#380179ca7c9641eafa1c8d3c223de2db">setParticipant</a>(<a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>&amp; p)
<a name="l00308"></a>00308         { participant = &amp;p; }
<a name="l00309"></a>00309         
<a name="l00310"></a>00310         <span class="keywordtype">void</span> <a class="code" href="class_sync_source_handler.html#47f7b8cf542dc9487062de7474304928">setDataTransportPort</a>(tpport_t p)
<a name="l00311"></a>00311         { dataTransportPort = p; }
<a name="l00312"></a>00312 
<a name="l00313"></a>00313         <span class="keywordtype">void</span> <a class="code" href="class_sync_source_handler.html#cd5da6c8029f6a3395b86488dd78e274">setControlTransportPort</a>(tpport_t p)
<a name="l00314"></a>00314         { controlTransportPort = p; }
<a name="l00315"></a>00315 
<a name="l00316"></a>00316         <span class="keywordtype">void</span> <a class="code" href="class_sync_source_handler.html#a71d11242bd0acd3c7cb36065d4311dd">setNetworkAddress</a>(InetAddress addr)
<a name="l00317"></a>00317         { networkAddress = addr; }
<a name="l00318"></a>00318 
<a name="l00319"></a>00319         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00320"></a>00320         <a class="code" href="class_sync_source_handler.html#b81fe348ff9772693fc27ae4751d24b4">setLink</a>(<span class="keywordtype">void</span> *l)
<a name="l00321"></a>00321         { link = l; }
<a name="l00322"></a>00322 
<a name="l00323"></a>00323         <span class="keywordtype">void</span> *<a class="code" href="class_sync_source_handler.html#1f835cb89ba9c5102e948a8c0e0102b2" title="This requires SyncSource - SyncSourceHandler friendship.">getLink</a>()<span class="keyword"> const</span>
<a name="l00324"></a>00324 <span class="keyword">        </span>{ <span class="keywordflow">return</span> link; }
<a name="l00325"></a>00325 
<a name="l00326"></a>00326         <span class="comment">// validity state of this source</span>
<a name="l00327"></a>00327         State state;
<a name="l00328"></a>00328         <span class="comment">// 32-bit SSRC identifier.</span>
<a name="l00329"></a>00329         uint32 SSRC;
<a name="l00330"></a>00330         <span class="comment">// A valid source not always is active</span>
<a name="l00331"></a>00331         <span class="keywordtype">bool</span> activeSender;
<a name="l00332"></a>00332         <span class="comment">// The corresponding participant.</span>
<a name="l00333"></a>00333         <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>* participant;
<a name="l00334"></a>00334 
<a name="l00335"></a>00335         <span class="comment">// Network protocol address for data and control connection</span>
<a name="l00336"></a>00336         <span class="comment">// (both are assumed to be the same).</span>
<a name="l00337"></a>00337         InetAddress networkAddress;
<a name="l00338"></a>00338         tpport_t dataTransportPort;
<a name="l00339"></a>00339         tpport_t controlTransportPort;
<a name="l00340"></a>00340 
<a name="l00341"></a>00341         <span class="comment">// Pointer to the SyncSourceLink or similar object in the</span>
<a name="l00342"></a>00342         <span class="comment">// service queue. Saves a lot of searches in the membership</span>
<a name="l00343"></a>00343         <span class="comment">// table.</span>
<a name="l00344"></a>00344         <span class="keywordtype">void</span>* link;
<a name="l00345"></a>00345 };
<a name="l00346"></a>00346 
<a name="l00367"></a><a class="code" href="class_r_t_p_application.html">00367</a> <span class="keyword">class </span>__EXPORT <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a> : <span class="keyword">private</span> <a class="code" href="class_s_d_e_s_items_holder.html" title="Holds the SDES items and related information from a participant in an RTP application...">SDESItemsHolder</a>
<a name="l00368"></a>00368 {
<a name="l00369"></a>00369 <span class="keyword">private</span>:
<a name="l00370"></a>00370         <span class="keyword">struct </span>ParticipantLink;
<a name="l00371"></a>00371 
<a name="l00372"></a>00372 <span class="keyword">public</span>:
<a name="l00380"></a>00380         <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>(<span class="keyword">const</span> std::string&amp; cname);
<a name="l00381"></a>00381 
<a name="l00382"></a>00382         ~<a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>();
<a name="l00383"></a>00383 
<a name="l00384"></a>00384         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00385"></a><a class="code" href="class_r_t_p_application.html#8f508dc361e2127b6ce494af67ca41c6">00385</a>         setSDESItem(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> item, <span class="keyword">const</span> std::string&amp; val)
<a name="l00386"></a>00386         { <a class="code" href="class_s_d_e_s_items_holder.html#82dfc1ebf79f9a677ee943e6664a67cb">SDESItemsHolder::setItem</a>(item,val); }
<a name="l00387"></a>00387 
<a name="l00388"></a>00388         <span class="keyword">inline</span> <span class="keywordtype">void</span>
<a name="l00389"></a><a class="code" href="class_r_t_p_application.html#14ab3a89494164c1127bbdc0253acb54">00389</a>         setPRIVPrefix(<span class="keyword">const</span> std::string&amp; val)
<a name="l00390"></a>00390         { <a class="code" href="class_s_d_e_s_items_holder.html#8c1fe0c3f96576d3ac7f419c20806e71">SDESItemsHolder::setPRIVPrefix</a>(val); }
<a name="l00391"></a>00391 
<a name="l00392"></a>00392         <span class="keyword">const</span> std::string&amp;
<a name="l00393"></a><a class="code" href="class_r_t_p_application.html#decf13b59affe92deb0471dd06ffb38f">00393</a>         getSDESItem(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> item)<span class="keyword"> const</span>
<a name="l00394"></a>00394 <span class="keyword">        </span>{ <span class="keywordflow">return</span> <a class="code" href="class_s_d_e_s_items_holder.html#4440cb142892dc911c6c35a8b16d1ee6">SDESItemsHolder::getItem</a>(item); }
<a name="l00395"></a>00395 
<a name="l00396"></a>00396         <span class="keyword">inline</span> <span class="keyword">const</span> std::string&amp;
<a name="l00397"></a><a class="code" href="class_r_t_p_application.html#5e195a1b1634df9d6e49e298926a95f2">00397</a>         getPRIVPrefix()<span class="keyword"> const</span>
<a name="l00398"></a>00398 <span class="keyword">        </span>{ <span class="keywordflow">return</span> <a class="code" href="class_s_d_e_s_items_holder.html#75c4089724bf170b962417818ee025b2">SDESItemsHolder::getPRIVPrefix</a>(); }
<a name="l00399"></a>00399 
<a name="l00404"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html">00404</a>         <span class="keyword">class </span><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>
<a name="l00405"></a>00405         {
<a name="l00406"></a>00406         <span class="keyword">public</span>:
<a name="l00407"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#d3de078dc4b7b69ead3db9a364e933fb">00407</a>                 <span class="keyword">typedef</span> std::forward_iterator_tag iterator_category;
<a name="l00408"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#8fc309467c04ae0bc6a9369d94306ea3">00408</a>                 <span class="keyword">typedef</span> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">value_type</a>;
<a name="l00409"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#ae7828a2e9a3b42ea8ff281217c9fb53">00409</a>                 <span class="keyword">typedef</span> ptrdiff_t difference_type;
<a name="l00410"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#8c76ad0d2ecc3353ecfde267d9aa19ed">00410</a>                 <span class="keyword">typedef</span> <span class="keyword">const</span> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>* <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">pointer</a>;
<a name="l00411"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#5bea519d1c32adf0d850e68f5e6789bf">00411</a>                 <span class="keyword">typedef</span> <span class="keyword">const</span> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>&amp; <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">reference</a>;
<a name="l00412"></a>00412 
<a name="l00413"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#58a1eeb2a24a8b03ac8630a19eec828a">00413</a>                 <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>(ParticipantLink* p = NULL) : 
<a name="l00414"></a>00414                         link(p) 
<a name="l00415"></a>00415                 { }
<a name="l00416"></a>00416 
<a name="l00417"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#1b44a8dc146004740a8fe271be2f4120">00417</a>                 <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>(<span class="keyword">const</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>&amp; pi) : 
<a name="l00418"></a>00418                         link(pi.link)
<a name="l00419"></a>00419                 { }
<a name="l00420"></a>00420 
<a name="l00421"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#c90b280d72d0f2eeaad862dbe0a495cb">00421</a>                 <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">reference</a> operator*()<span class="keyword"> const</span>
<a name="l00422"></a>00422 <span class="keyword">                </span>{ <span class="keywordflow">return</span> *(link-&gt;getParticipant()); }
<a name="l00423"></a>00423 
<a name="l00424"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#5bd4d39492d800d2dd54a2e253beed12">00424</a>                 <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">pointer</a> operator-&gt;()<span class="keyword"> const</span>
<a name="l00425"></a>00425 <span class="keyword">                </span>{ <span class="keywordflow">return</span> link-&gt;getParticipant(); }
<a name="l00426"></a>00426 
<a name="l00427"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#fdd553d0d3e526b44eb7a04bac1702ae">00427</a>                 <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>&amp; <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#fdd553d0d3e526b44eb7a04bac1702ae">operator++</a>() {
<a name="l00428"></a>00428                         link = link-&gt;getNext();
<a name="l00429"></a>00429                         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00430"></a>00430                 }
<a name="l00431"></a>00431 
<a name="l00432"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#300d8f671b67fda70308600a913a467c">00432</a>                 <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#300d8f671b67fda70308600a913a467c">operator++</a>(<span class="keywordtype">int</span>) {
<a name="l00433"></a>00433                         <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a> result(*<span class="keyword">this</span>);
<a name="l00434"></a>00434                         ++(*this);
<a name="l00435"></a>00435                         <span class="keywordflow">return</span> result;
<a name="l00436"></a>00436                 }
<a name="l00437"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#c29401087121e44b670e87d664fa5795">00437</a>                 <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>&amp; l,
<a name="l00438"></a>00438                                        <span class="keyword">const</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>&amp; r)
<a name="l00439"></a>00439                 { <span class="keywordflow">return</span> l.link == r.link; }
<a name="l00440"></a>00440 
<a name="l00441"></a><a class="code" href="class_r_t_p_application_1_1_participants_iterator.html#97cc1799f9ff8c7ad5d65ddfb4e38617">00441</a>                 <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>&amp; l,
<a name="l00442"></a>00442                                        <span class="keyword">const</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>&amp; r)
<a name="l00443"></a>00443                 { <span class="keywordflow">return</span> l.link != r.link; }
<a name="l00444"></a>00444         <span class="keyword">private</span>:
<a name="l00445"></a>00445                 ParticipantLink *link;
<a name="l00446"></a>00446         };
<a name="l00447"></a>00447 
<a name="l00448"></a><a class="code" href="class_r_t_p_application.html#8b50b594ea5e44690c95fde779b0a698">00448</a>         <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a> begin()
<a name="l00449"></a>00449         { <span class="keywordflow">return</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>(firstPart); }
<a name="l00450"></a>00450         
<a name="l00451"></a><a class="code" href="class_r_t_p_application.html#6d08c520e5dd2409206f196f6d5ca2a1">00451</a>         <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a> end()
<a name="l00452"></a>00452         { <span class="keywordflow">return</span> <a class="code" href="class_r_t_p_application_1_1_participants_iterator.html" title="Iterator through the list of participants in this session.">ParticipantsIterator</a>(NULL); }
<a name="l00453"></a>00453 
<a name="l00454"></a>00454         <span class="keyword">const</span> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>*
<a name="l00455"></a>00455         getParticipant(<span class="keyword">const</span> std::string&amp; cname) <span class="keyword">const</span>;
<a name="l00456"></a>00456         
<a name="l00457"></a>00457 <span class="keyword">private</span>:
<a name="l00458"></a><a class="code" href="class_r_t_p_application.html#7401d03ad7238950fb4e46a9e77fef43">00458</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_application_handler.html" title="Application objects modification methods.">ApplicationHandler</a>;
<a name="l00459"></a>00459 
<a name="l00460"></a>00460         <span class="keyword">struct </span>ParticipantLink {
<a name="l00461"></a>00461                 ParticipantLink(<a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>&amp; p, 
<a name="l00462"></a>00462                                 ParticipantLink* l) :
<a name="l00463"></a>00463                         participant(&amp;p), next(l) 
<a name="l00464"></a>00464                 { }
<a name="l00465"></a>00465                 <span class="keyword">inline</span> ~ParticipantLink() { <span class="keyword">delete</span> participant; }
<a name="l00466"></a>00466                 <span class="keyword">inline</span> <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>* getParticipant() { <span class="keywordflow">return</span> participant; }
<a name="l00467"></a>00467                 <span class="keyword">inline</span> ParticipantLink* getPrev() { <span class="keywordflow">return</span> prev; }
<a name="l00468"></a>00468                 <span class="keyword">inline</span> ParticipantLink* getNext() { <span class="keywordflow">return</span> next; }
<a name="l00469"></a>00469                 <span class="keyword">inline</span> <span class="keywordtype">void</span> setPrev(ParticipantLink* l) { prev = l; }
<a name="l00470"></a>00470                 <span class="keyword">inline</span> <span class="keywordtype">void</span> setNext(ParticipantLink* l) { next = l; }
<a name="l00471"></a>00471                 <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>* participant;
<a name="l00472"></a>00472                 ParticipantLink* next, *prev;
<a name="l00473"></a>00473         };
<a name="l00474"></a>00474 
<a name="l00475"></a>00475         <span class="keywordtype">void</span>
<a name="l00476"></a>00476         addParticipant(<a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>&amp; part);
<a name="l00477"></a>00477 
<a name="l00478"></a>00478         <span class="keywordtype">void</span>
<a name="l00479"></a>00479         removeParticipant(ParticipantLink* part);
<a name="l00480"></a>00480 
<a name="l00485"></a>00485         <span class="keywordtype">void</span>
<a name="l00486"></a>00486         findCNAME();
<a name="l00487"></a>00487 
<a name="l00489"></a>00489         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> defaultParticipantsNum;
<a name="l00490"></a>00490         <a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>** participants;
<a name="l00492"></a>00492         ParticipantLink* firstPart, * lastPart;
<a name="l00493"></a>00493 };
<a name="l00494"></a>00494 
<a name="l00504"></a>00504 __EXPORT <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>&amp; <a class="code" href="group__sources.html#g206420a8423d0c261e9bfc5a388a9534" title="Get the RTPApplication object for the &amp;quot;default&amp;quot; application (the only one...">defaultApplication</a>();
<a name="l00505"></a>00505  <span class="comment">// sources</span>
<a name="l00507"></a>00507 
<a name="l00508"></a>00508 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span>
<a name="l00509"></a>00509 <span class="preprocessor"></span>}
<a name="l00510"></a>00510 <span class="preprocessor">#endif</span>
<a name="l00511"></a>00511 <span class="preprocessor"></span>
<a name="l00512"></a>00512 <span class="preprocessor">#endif //CCXX_RTP_SOURCES_H_</span>
<a name="l00513"></a>00513 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jul 24 21:42:25 2009 for ccRTP by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>