INET Framework for OMNeT++/OMNEST
|
#include <sdes.h>
Public Types | |
enum | SDES_ITEM_TYPE { SDES_UNDEF = 0, SDES_CNAME = 1, SDES_NAME = 2, SDES_EMAIL = 3, SDES_PHONE = 4, SDES_LOC = 5, SDES_TOOL = 6, SDES_NOTE = 7, SDES_PRIV = 8 } |
Public Member Functions | |
SDESItem () | |
SDESItem (SDES_ITEM_TYPE type, const char *content) | |
SDESItem (const SDESItem &sdesItem) | |
virtual | ~SDESItem () |
SDESItem & | operator= (const SDESItem &sdesItem) |
virtual SDESItem * | dup () const |
virtual std::string | info () |
virtual void | dump (std::ostream &os) |
virtual SDES_ITEM_TYPE | getType () |
virtual const char * | getContent () |
virtual int | getLength () |
Protected Attributes | |
SDES_ITEM_TYPE | _type |
int | _length |
const char * | _content |
The class SDESItem is used for storing a source description item (type of description, description string) for an rtp end system.
This enumeration holds the types of source description items as defined in the rfc. In this implementation only SDES_UNDEF and SDES_CNAME are usable.
SDES_UNDEF | |
SDES_CNAME | |
SDES_NAME | |
SDES_EMAIL | |
SDES_PHONE | |
SDES_LOC | |
SDES_TOOL | |
SDES_NOTE | |
SDES_PRIV |
{ SDES_UNDEF = 0, SDES_CNAME = 1, SDES_NAME = 2, SDES_EMAIL = 3, SDES_PHONE = 4, SDES_LOC = 5, SDES_TOOL = 6, SDES_NOTE = 7, SDES_PRIV = 8 };
SDESItem::SDESItem | ( | ) |
Default constructor.
Referenced by dup().
: cObject() { _type = SDES_UNDEF; _length = 2; _content = ""; };
SDESItem::SDESItem | ( | SDES_ITEM_TYPE | type, |
const char * | content | ||
) |
SDESItem::SDESItem | ( | const SDESItem & | sdesItem | ) |
Copy constructor.
: cObject() { operator=(sdesItem); };
SDESItem::~SDESItem | ( | ) | [virtual] |
Destructor.
{ };
void SDESItem::dump | ( | std::ostream & | os | ) | [virtual] |
SDESItem * SDESItem::dup | ( | ) | const [virtual] |
const char * SDESItem::getContent | ( | ) | [virtual] |
Returns the stored sdes string.
{ return opp_strdup(_content); };
int SDESItem::getLength | ( | ) | [virtual] |
This method returns the size of this SDESItem in bytes as it would be in the real world.
Referenced by SDESChunk::addSDESItem().
{ // bytes needed for this sdes item are // one byte for type, one for length // and the string return _length + 2; };
SDESItem::SDES_ITEM_TYPE SDESItem::getType | ( | ) | [virtual] |
std::string SDESItem::info | ( | ) | [virtual] |
Assignment operator.
Referenced by SDESItem().
const char* SDESItem::_content [protected] |
The sdes string.
Referenced by dump(), getContent(), info(), operator=(), and SDESItem().
int SDESItem::_length [protected] |
The length of this SDESItem.
Referenced by getLength(), operator=(), and SDESItem().
SDES_ITEM_TYPE SDESItem::_type [protected] |
The type of this SDESItem.
Referenced by dump(), getType(), operator=(), and SDESItem().