SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
qrtplib::RTCPSDESInfo::SDESItem Class Reference
+ Inheritance diagram for qrtplib::RTCPSDESInfo::SDESItem:

Public Member Functions

 SDESItem ()
 
 ~SDESItem ()
 
uint8_tGetInfo (std::size_t *len) const
 
int SetInfo (const uint8_t *s, std::size_t len)
 

Protected Member Functions

int SetString (uint8_t **dest, std::size_t *destlen, const uint8_t *s, std::size_t len)
 

Private Attributes

uint8_tstr
 
std::size_t length
 

Detailed Description

Definition at line 197 of file rtcpsdesinfo.h.

Constructor & Destructor Documentation

◆ SDESItem()

qrtplib::RTCPSDESInfo::SDESItem::SDESItem ( )
inline

Definition at line 200 of file rtcpsdesinfo.h.

201  {
202  str = 0;
203  length = 0;
204  }

◆ ~SDESItem()

qrtplib::RTCPSDESInfo::SDESItem::~SDESItem ( )
inline

Definition at line 205 of file rtcpsdesinfo.h.

206  {
207  if (str)
208  delete[] str;
209  }

Member Function Documentation

◆ GetInfo()

uint8_t* qrtplib::RTCPSDESInfo::SDESItem::GetInfo ( std::size_t *  len) const
inline

Definition at line 210 of file rtcpsdesinfo.h.

211  {
212  *len = length;
213  return str;
214  }

◆ SetInfo()

int qrtplib::RTCPSDESInfo::SDESItem::SetInfo ( const uint8_t s,
std::size_t  len 
)
inline

Definition at line 215 of file rtcpsdesinfo.h.

Referenced by qrtplib::RTCPSDESInfo::SetPrivateValue().

216  {
217  return SetString(&str, &length, s, len);
218  }
int SetString(uint8_t **dest, std::size_t *destlen, const uint8_t *s, std::size_t len)
Definition: rtcpsdesinfo.h:220
+ Here is the caller graph for this function:

◆ SetString()

int qrtplib::RTCPSDESInfo::SDESItem::SetString ( uint8_t **  dest,
std::size_t *  destlen,
const uint8_t s,
std::size_t  len 
)
inlineprotected

Definition at line 220 of file rtcpsdesinfo.h.

References RTCP_SDES_MAXITEMLENGTH.

221  {
222  if (len <= 0)
223  {
224  if (*dest)
225  delete[] (*dest);
226  *dest = 0;
227  *destlen = 0;
228  }
229  else
230  {
231  len = (len > RTCP_SDES_MAXITEMLENGTH) ? RTCP_SDES_MAXITEMLENGTH : len;
232  uint8_t *str2 = new uint8_t[len];
233  memcpy(str2, s, len);
234  *destlen = len;
235  if (*dest)
236  delete[] (*dest);
237  *dest = str2;
238  }
239  return 0;
240  }
#define RTCP_SDES_MAXITEMLENGTH
Definition: rtpdefines.h:65
unsigned char uint8_t
Definition: rtptypes_win.h:42

Member Data Documentation

◆ length

std::size_t qrtplib::RTCPSDESInfo::SDESItem::length
private

Definition at line 243 of file rtcpsdesinfo.h.

◆ str

uint8_t* qrtplib::RTCPSDESInfo::SDESItem::str
private

Definition at line 242 of file rtcpsdesinfo.h.


The documentation for this class was generated from the following file: