Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 7c0c66d6521a2c8efa0ef6bf03291d7f > files > 467

jrtplib-devel-3.7.1-7.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>jrtplib: src/rtcpsdesinfo.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="jrtplib.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="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</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>
  <div class="navpath"><a class="el" href="dir_e5298977290e638844c8018a73ab0caf.html">src</a>
  </div>
</div>
<div class="contents">
<h1>rtcpsdesinfo.h</h1><a href="rtcpsdesinfo_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  This file is a part of JRTPLIB</span>
<a name="l00004"></a>00004 <span class="comment">  Copyright (c) 1999-2007 Jori Liesenborgs</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Contact: jori.liesenborgs@gmail.com</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">  This library was developed at the "Expertisecentrum Digitale Media"</span>
<a name="l00009"></a>00009 <span class="comment">  (http://www.edm.uhasselt.be), a research center of the Hasselt University</span>
<a name="l00010"></a>00010 <span class="comment">  (http://www.uhasselt.be). The library is based upon work done for </span>
<a name="l00011"></a>00011 <span class="comment">  my thesis at the School for Knowledge Technology (Belgium/The Netherlands).</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">  Permission is hereby granted, free of charge, to any person obtaining a</span>
<a name="l00014"></a>00014 <span class="comment">  copy of this software and associated documentation files (the "Software"),</span>
<a name="l00015"></a>00015 <span class="comment">  to deal in the Software without restriction, including without limitation</span>
<a name="l00016"></a>00016 <span class="comment">  the rights to use, copy, modify, merge, publish, distribute, sublicense,</span>
<a name="l00017"></a>00017 <span class="comment">  and/or sell copies of the Software, and to permit persons to whom the</span>
<a name="l00018"></a>00018 <span class="comment">  Software is furnished to do so, subject to the following conditions:</span>
<a name="l00019"></a>00019 <span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">  The above copyright notice and this permission notice shall be included</span>
<a name="l00021"></a>00021 <span class="comment">  in all copies or substantial portions of the Software.</span>
<a name="l00022"></a>00022 <span class="comment"></span>
<a name="l00023"></a>00023 <span class="comment">  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</span>
<a name="l00024"></a>00024 <span class="comment">  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a name="l00025"></a>00025 <span class="comment">  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span>
<a name="l00026"></a>00026 <span class="comment">  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a name="l00027"></a>00027 <span class="comment">  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span>
<a name="l00028"></a>00028 <span class="comment">  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS</span>
<a name="l00029"></a>00029 <span class="comment">  IN THE SOFTWARE.</span>
<a name="l00030"></a>00030 <span class="comment"></span>
<a name="l00031"></a>00031 <span class="comment">*/</span>
<a name="l00032"></a>00032 
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef RTCPSDESINFO_H</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#define RTCPSDESINFO_H</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="preprocessor">#include "rtpconfig.h"</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="rtperrors_8h.html">rtperrors.h</a>"</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include "rtpdefines.h"</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include "rtptypes.h"</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="rtpmemoryobject_8h.html">rtpmemoryobject.h</a>"</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00048"></a>00048 
<a name="l00050"></a><a class="code" href="classRTCPSDESInfo.html">00050</a> <span class="keyword">class </span><a class="code" href="classRTCPSDESInfo.html" title="The class RTCPSDESInfo is a container for RTCP SDES information.">RTCPSDESInfo</a> : <span class="keyword">public</span> RTPMemoryObject
<a name="l00051"></a>00051 {
<a name="l00052"></a>00052 <span class="keyword">public</span>:
<a name="l00054"></a><a class="code" href="classRTCPSDESInfo.html#1842e7c5d9e34c5c30140460b52e3bd7">00054</a>         <a class="code" href="classRTCPSDESInfo.html#1842e7c5d9e34c5c30140460b52e3bd7" title="Constructs an instance, optionally installing a memory manager.">RTCPSDESInfo</a>(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr = 0) : RTPMemoryObject(mgr)          { <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0 ; i &lt; RTCP_SDES_NUMITEMS_NONPRIVATE ; i++) nonprivateitems[i].SetMemoryManager(mgr); }
<a name="l00055"></a>00055         <span class="keyword">virtual</span> ~<a class="code" href="classRTCPSDESInfo.html" title="The class RTCPSDESInfo is a container for RTCP SDES information.">RTCPSDESInfo</a>()                                                 { <a class="code" href="classRTCPSDESInfo.html#b48439ca171a83bde19dae4834a4c488" title="Clears all SDES information.">Clear</a>(); }
<a name="l00056"></a>00056 
<a name="l00058"></a>00058         <span class="keywordtype">void</span> <a class="code" href="classRTCPSDESInfo.html#b48439ca171a83bde19dae4834a4c488" title="Clears all SDES information.">Clear</a>();
<a name="l00059"></a>00059 
<a name="l00061"></a><a class="code" href="classRTCPSDESInfo.html#d8e3bb3d915cfc9556424ff7ec929f45">00061</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#d8e3bb3d915cfc9556424ff7ec929f45" title="Sets the SDES CNAME item to s with length l.">SetCNAME</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                                 { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_CNAME-1,s,l); }
<a name="l00062"></a>00062 
<a name="l00064"></a><a class="code" href="classRTCPSDESInfo.html#08761b888e54fe9e07580cbed7eff1ba">00064</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#08761b888e54fe9e07580cbed7eff1ba" title="Sets the SDES name item to s with length l.">SetName</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                                  { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_NAME-1,s,l); }
<a name="l00065"></a>00065 
<a name="l00067"></a><a class="code" href="classRTCPSDESInfo.html#d767676f1c5e45076462123c79e4c3ac">00067</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#d767676f1c5e45076462123c79e4c3ac" title="Sets the SDES e-mail item to s with length l.">SetEMail</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                                 { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,s,l); }
<a name="l00068"></a>00068 
<a name="l00070"></a><a class="code" href="classRTCPSDESInfo.html#365fe49a31fdd6e9335067c2b14d9150">00070</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#365fe49a31fdd6e9335067c2b14d9150" title="Sets the SDES phone item to s with length l.">SetPhone</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                                 { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_PHONE-1,s,l); }
<a name="l00071"></a>00071 
<a name="l00073"></a><a class="code" href="classRTCPSDESInfo.html#ca4746bc5a0940522d6c3730f8b4c467">00073</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#ca4746bc5a0940522d6c3730f8b4c467" title="Sets the SDES location item to s with length l.">SetLocation</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                              { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,s,l); }
<a name="l00074"></a>00074 
<a name="l00076"></a><a class="code" href="classRTCPSDESInfo.html#847e2d3b0a1a05338c3ed282408459d6">00076</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#847e2d3b0a1a05338c3ed282408459d6" title="Sets the SDES tool item to s with length l.">SetTool</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                                  { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_TOOL-1,s,l); }
<a name="l00077"></a>00077 
<a name="l00079"></a><a class="code" href="classRTCPSDESInfo.html#1a7d10dab2dc9194c792ea28d24260a8">00079</a>         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#1a7d10dab2dc9194c792ea28d24260a8" title="Sets the SDES note item to s with length l.">SetNote</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)                                  { <span class="keywordflow">return</span> SetNonPrivateItem(RTCP_SDES_ID_NOTE-1,s,l); }
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 <span class="preprocessor">#ifdef RTP_SUPPORT_SDESPRIV</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span>
<a name="l00086"></a>00086         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#f3dba1e41afc7818de8b46d15aec8374" title="Sets the entry for the prefix string specified by prefix with length prefixlen to...">SetPrivateValue</a>(<span class="keyword">const</span> uint8_t *prefix,<span class="keywordtype">size_t</span> prefixlen,<span class="keyword">const</span> uint8_t *value,<span class="keywordtype">size_t</span> valuelen);
<a name="l00087"></a>00087 
<a name="l00089"></a>00089         <span class="keywordtype">int</span> <a class="code" href="classRTCPSDESInfo.html#1dfeebe6d42a417317e3c32645f07048" title="Deletes the entry for the prefix specified by s with length len.">DeletePrivatePrefix</a>(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> len);
<a name="l00090"></a>00090 <span class="preprocessor">#endif // RTP_SUPPORT_SDESPRIV</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span>        
<a name="l00093"></a><a class="code" href="classRTCPSDESInfo.html#400d613dfb7da9537aa93add228eb8e7">00093</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#400d613dfb7da9537aa93add228eb8e7" title="Returns the SDES CNAME item and stores its length in len.">GetCNAME</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                    </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_CNAME-1,len); }
<a name="l00094"></a>00094 
<a name="l00096"></a><a class="code" href="classRTCPSDESInfo.html#d54c5b92d6d289cff35788dde8863647">00096</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#d54c5b92d6d289cff35788dde8863647" title="Returns the SDES name item and stores its length in len.">GetName</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                             </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_NAME-1,len); }
<a name="l00097"></a>00097 
<a name="l00099"></a><a class="code" href="classRTCPSDESInfo.html#001ea540dc3b29235655f204abd165f8">00099</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#001ea540dc3b29235655f204abd165f8" title="Returns the SDES e-mail item and stores its length in len.">GetEMail</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                    </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_EMAIL-1,len); }
<a name="l00100"></a>00100 
<a name="l00102"></a><a class="code" href="classRTCPSDESInfo.html#adaea9599df715fc09cc26d9f841d4d7">00102</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#adaea9599df715fc09cc26d9f841d4d7" title="Returns the SDES phone item and stores its length in len.">GetPhone</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                    </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_PHONE-1,len); }
<a name="l00103"></a>00103 
<a name="l00105"></a><a class="code" href="classRTCPSDESInfo.html#da8db2c0c4dca11547958835a3b4c4fb">00105</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#da8db2c0c4dca11547958835a3b4c4fb" title="Returns the SDES location item and stores its length in len.">GetLocation</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                 </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_LOCATION-1,len); }
<a name="l00106"></a>00106 
<a name="l00108"></a><a class="code" href="classRTCPSDESInfo.html#5d8c6556c611bc3c11f86ab9527aea94">00108</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#5d8c6556c611bc3c11f86ab9527aea94" title="Returns the SDES tool item and stores its length in len.">GetTool</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                             </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_TOOL-1,len); }
<a name="l00109"></a>00109 
<a name="l00111"></a><a class="code" href="classRTCPSDESInfo.html#f3aac80f99bb1efae469b57f0bebc117">00111</a>         uint8_t *<a class="code" href="classRTCPSDESInfo.html#f3aac80f99bb1efae469b57f0bebc117" title="Returns the SDES note item and stores its length in len.">GetNote</a>(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                                     </span>{ <span class="keywordflow">return</span> GetNonPrivateItem(RTCP_SDES_ID_NOTE-1,len); }
<a name="l00112"></a>00112 <span class="preprocessor">#ifdef RTP_SUPPORT_SDESPRIV</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span>
<a name="l00114"></a>00114         <span class="keywordtype">void</span> <a class="code" href="classRTCPSDESInfo.html#ed5849ecdcca405043da1d4a79a2b860" title="Starts the iteration over the stored SDES private item prefixes and their associated...">GotoFirstPrivateValue</a>();
<a name="l00115"></a>00115 
<a name="l00123"></a>00123         <span class="keywordtype">bool</span> <a class="code" href="classRTCPSDESInfo.html#9ea816849121fd8a8a2771bec564f6d3" title="Returns SDES priv item information.">GetNextPrivateValue</a>(uint8_t **prefix,<span class="keywordtype">size_t</span> *prefixlen,uint8_t **value,<span class="keywordtype">size_t</span> *valuelen);
<a name="l00124"></a>00124 
<a name="l00132"></a>00132         <span class="keywordtype">bool</span> <a class="code" href="classRTCPSDESInfo.html#7c99aa3a593d533972f278b7dbeca30f" title="Returns SDES priv item information.">GetPrivateValue</a>(<span class="keyword">const</span> uint8_t *prefix,<span class="keywordtype">size_t</span> prefixlen,uint8_t **value,<span class="keywordtype">size_t</span> *valuelen) <span class="keyword">const</span>;
<a name="l00133"></a>00133 <span class="preprocessor">#endif // RTP_SUPPORT_SDESPRIV</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="keyword">private</span>:
<a name="l00135"></a>00135         <span class="keywordtype">int</span> SetNonPrivateItem(<span class="keywordtype">int</span> itemno,<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> l)             { <span class="keywordflow">if</span> (l &gt; RTCP_SDES_MAXITEMLENGTH) <span class="keywordflow">return</span> ERR_RTP_SDES_LENGTHTOOBIG; <span class="keywordflow">return</span> nonprivateitems[itemno].SetInfo(s,l); }
<a name="l00136"></a>00136         uint8_t *GetNonPrivateItem(<span class="keywordtype">int</span> itemno,<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                </span>{ <span class="keywordflow">return</span> nonprivateitems[itemno].GetInfo(len); }
<a name="l00137"></a>00137 
<a name="l00138"></a>00138         <span class="keyword">class </span>SDESItem : <span class="keyword">public</span> RTPMemoryObject
<a name="l00139"></a>00139         {
<a name="l00140"></a>00140         <span class="keyword">public</span>:
<a name="l00141"></a>00141                 SDESItem(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr = 0) : RTPMemoryObject(mgr)
<a name="l00142"></a>00142                 {  
<a name="l00143"></a>00143                         str = 0; 
<a name="l00144"></a>00144                         length = 0; 
<a name="l00145"></a>00145                 }
<a name="l00146"></a>00146                 <span class="keywordtype">void</span> SetMemoryManager(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr)
<a name="l00147"></a>00147                 {
<a name="l00148"></a>00148                         RTPMemoryObject::SetMemoryManager(mgr);
<a name="l00149"></a>00149                 }
<a name="l00150"></a>00150                 ~SDESItem()                                                     
<a name="l00151"></a>00151                 { 
<a name="l00152"></a>00152                         <span class="keywordflow">if</span> (str) 
<a name="l00153"></a>00153                                 RTPDeleteByteArray(str,GetMemoryManager());
<a name="l00154"></a>00154                 }
<a name="l00155"></a>00155                 uint8_t *GetInfo(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                             </span>{ *len = length; <span class="keywordflow">return</span> str; }
<a name="l00156"></a>00156                 <span class="keywordtype">int</span> SetInfo(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> len)                        { <span class="keywordflow">return</span> SetString(&amp;str,&amp;length,s,len); }
<a name="l00157"></a>00157         <span class="keyword">protected</span>:
<a name="l00158"></a>00158                 <span class="keywordtype">int</span> SetString(uint8_t **dest,<span class="keywordtype">size_t</span> *destlen,<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> len)
<a name="l00159"></a>00159                 {
<a name="l00160"></a>00160                         <span class="keywordflow">if</span> (len &lt;= 0)
<a name="l00161"></a>00161                         {
<a name="l00162"></a>00162                                 <span class="keywordflow">if</span> (*dest)
<a name="l00163"></a>00163                                         RTPDeleteByteArray((*dest),GetMemoryManager());
<a name="l00164"></a>00164                                 *dest = 0;
<a name="l00165"></a>00165                                 *destlen = 0;
<a name="l00166"></a>00166                         }
<a name="l00167"></a>00167                         <span class="keywordflow">else</span>
<a name="l00168"></a>00168                         {
<a name="l00169"></a>00169                                 len = (len&gt;RTCP_SDES_MAXITEMLENGTH)?RTCP_SDES_MAXITEMLENGTH:len;
<a name="l00170"></a>00170                                 uint8_t *str2 = RTPNew(GetMemoryManager(),<a class="code" href="rtpmemorymanager_8h.html#81f12aff43ad6e0d14ddf1a708d75282" title="Buffer to store an SDES item.">RTPMEM_TYPE_BUFFER_SDESITEM</a>) uint8_t[len];
<a name="l00171"></a>00171                                 if (str2 == 0)
<a name="l00172"></a>00172                                         return ERR_RTP_OUTOFMEM;
<a name="l00173"></a>00173                                 memcpy(str2,s,len);
<a name="l00174"></a>00174                                 *destlen = len;
<a name="l00175"></a>00175                                 if (*dest)
<a name="l00176"></a>00176                                         RTPDeleteByteArray((*dest),GetMemoryManager());
<a name="l00177"></a>00177                                 *dest = str2;
<a name="l00178"></a>00178                         }
<a name="l00179"></a>00179                         return 0;
<a name="l00180"></a>00180                 }
<a name="l00181"></a>00181         private:
<a name="l00182"></a>00182                 uint8_t *str;
<a name="l00183"></a>00183                 <span class="keywordtype">size_t</span> length;
<a name="l00184"></a>00184         };
<a name="l00185"></a>00185 
<a name="l00186"></a>00186         SDESItem nonprivateitems[RTCP_SDES_NUMITEMS_NONPRIVATE];
<a name="l00187"></a>00187 
<a name="l00188"></a>00188 <span class="preprocessor">#ifdef RTP_SUPPORT_SDESPRIV</span>
<a name="l00189"></a>00189 <span class="preprocessor"></span>        <span class="keyword">class </span>SDESPrivateItem : <span class="keyword">public</span> SDESItem
<a name="l00190"></a>00190         {
<a name="l00191"></a>00191         <span class="keyword">public</span>:
<a name="l00192"></a>00192                 SDESPrivateItem(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr) : SDESItem(mgr)
<a name="l00193"></a>00193                 { 
<a name="l00194"></a>00194                         prefixlen = 0; 
<a name="l00195"></a>00195                         prefix = 0; 
<a name="l00196"></a>00196                 }
<a name="l00197"></a>00197                 ~SDESPrivateItem()                                              
<a name="l00198"></a>00198                 { 
<a name="l00199"></a>00199                         <span class="keywordflow">if</span> (prefix) 
<a name="l00200"></a>00200                                 RTPDeleteByteArray(prefix,GetMemoryManager());
<a name="l00201"></a>00201                 }
<a name="l00202"></a>00202                 uint8_t *GetPrefix(<span class="keywordtype">size_t</span> *len)<span class="keyword"> const                           </span>{ *len = prefixlen; <span class="keywordflow">return</span> prefix; }
<a name="l00203"></a>00203                 <span class="keywordtype">int</span> SetPrefix(<span class="keyword">const</span> uint8_t *s,<span class="keywordtype">size_t</span> len)                      { <span class="keywordflow">return</span> SetString(&amp;prefix,&amp;prefixlen,s,len); }
<a name="l00204"></a>00204         <span class="keyword">private</span>:
<a name="l00205"></a>00205                 uint8_t *prefix;
<a name="l00206"></a>00206                 <span class="keywordtype">size_t</span> prefixlen;
<a name="l00207"></a>00207         };
<a name="l00208"></a>00208 
<a name="l00209"></a>00209         std::list&lt;SDESPrivateItem *&gt; privitems;
<a name="l00210"></a>00210         std::list&lt;SDESPrivateItem *&gt;::const_iterator curitem;
<a name="l00211"></a>00211 <span class="preprocessor">#endif // RTP_SUPPORT_SDESPRIV</span>
<a name="l00212"></a>00212 <span class="preprocessor"></span>};
<a name="l00213"></a>00213 
<a name="l00214"></a>00214 <span class="preprocessor">#endif // RTCPSDESINFO_H</span>
<a name="l00215"></a>00215 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 09:42:07 2009 for jrtplib 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>