#include <TurnMsgLib.h>
Public Member Functions | |
StunAttrChangeRequest () | |
StunAttrChangeRequest (const StunAttrIterator &iter) throw (WrongStunAttrFormatException, EndOfStunMsgException) | |
virtual | ~StunAttrChangeRequest () |
bool | getChangeIp () const |
void | setChangeIp (bool ci) |
bool | getChangePort () const |
void | setChangePort (bool cp) |
Protected Member Functions | |
virtual int | addToBuffer (u08bits *buffer, size_t &sz) throw (WrongStunAttrFormatException, WrongStunBufferFormatException) |
Change Request attribute class
Definition at line 443 of file TurnMsgLib.h.
turn::StunAttrChangeRequest::StunAttrChangeRequest | ( | ) | [inline] |
Definition at line 445 of file TurnMsgLib.h.
: _changeIp(0), _changePort(0) { setType(STUN_ATTRIBUTE_CHANGE_REQUEST); }
turn::StunAttrChangeRequest::StunAttrChangeRequest | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 448 of file TurnMsgLib.h.
: StunAttr(iter) { if(iter.eof()) throw EndOfStunMsgException(); if(stun_attr_get_change_request_str(getSar(iter), &_changeIp, &_changePort)<0) { throw WrongStunAttrFormatException(); } }
virtual turn::StunAttrChangeRequest::~StunAttrChangeRequest | ( | ) | [inline, virtual] |
Definition at line 459 of file TurnMsgLib.h.
{}
virtual int turn::StunAttrChangeRequest::addToBuffer | ( | u08bits * | buffer, |
size_t & | sz | ||
) | throw (WrongStunAttrFormatException, WrongStunBufferFormatException) [inline, protected, virtual] |
Virtual function member to add attribute to a raw buffer
Reimplemented from turn::StunAttr.
Definition at line 479 of file TurnMsgLib.h.
{ return stun_attr_add_change_request_str(buffer, &sz, _changeIp, _changePort); }
bool turn::StunAttrChangeRequest::getChangeIp | ( | ) | const [inline] |
Definition at line 460 of file TurnMsgLib.h.
{
return _changeIp;
}
bool turn::StunAttrChangeRequest::getChangePort | ( | ) | const [inline] |
Definition at line 469 of file TurnMsgLib.h.
{
return _changePort;
}
void turn::StunAttrChangeRequest::setChangeIp | ( | bool | ci | ) | [inline] |
Definition at line 463 of file TurnMsgLib.h.
{ if(ci) _changeIp = 1; else _changeIp = 0; }
void turn::StunAttrChangeRequest::setChangePort | ( | bool | cp | ) | [inline] |
Definition at line 472 of file TurnMsgLib.h.
{ if(cp) _changePort = 1; else _changePort = 0; }