Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::rtcp::ByeTraverser::Iterator Class Reference

Packet iterator. More...

#include <bye_traverser.h>

Public Types

enum  State { BEGIN , SSRC , REASON , END }
 Iterator state. More...
 

Public Member Functions

State next ()
 Advance iterator. More...
 
bool error () const
 Check if there were any parsing errors. More...
 
packet::stream_source_t get_ssrc () const
 Get SSRC element. More...
 
const char * get_reason () const
 Get REASON element. Zero-terminated UTF-8 string. Pointer is valid only until next() call. More...
 

Friends

class ByeTraverser
 

Detailed Description

Packet iterator.

Definition at line 28 of file bye_traverser.h.

Member Enumeration Documentation

◆ State

Iterator state.

Enumerator
BEGIN 

Iterator created.

SSRC 

SSRC element.

REASON 

REASON element.

END 

Parsed whole packet.

Definition at line 31 of file bye_traverser.h.

Member Function Documentation

◆ error()

bool roc::rtcp::ByeTraverser::Iterator::error ( ) const

Check if there were any parsing errors.

◆ get_reason()

const char* roc::rtcp::ByeTraverser::Iterator::get_reason ( ) const

Get REASON element. Zero-terminated UTF-8 string. Pointer is valid only until next() call.

Precondition
Can be used if next() returned REASON.

◆ get_ssrc()

packet::stream_source_t roc::rtcp::ByeTraverser::Iterator::get_ssrc ( ) const

Get SSRC element.

Precondition
Can be used if next() returned SSRC.

◆ next()

State roc::rtcp::ByeTraverser::Iterator::next ( )

Advance iterator.


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