#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 345 of file TurnMsgLib.h.
StunAttrChangeRequest::StunAttrChangeRequest | ( | ) | [inline] |
Definition at line 347 of file TurnMsgLib.h.
: _changeIp(0), _changePort(0) {}
StunAttrChangeRequest::StunAttrChangeRequest | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 348 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 StunAttrChangeRequest::~StunAttrChangeRequest | ( | ) | [inline, virtual] |
Definition at line 359 of file TurnMsgLib.h.
{}
virtual int StunAttrChangeRequest::addToBuffer | ( | u08bits * | buffer, |
size_t & | sz | ||
) | throw (WrongStunAttrFormatException, WrongStunBufferFormatException) [inline, protected, virtual] |
Reimplemented from StunAttr.
Definition at line 379 of file TurnMsgLib.h.
{ return stun_attr_add_change_request_str(buffer, &sz, _changeIp, _changePort); }
bool StunAttrChangeRequest::getChangeIp | ( | ) | const [inline] |
Definition at line 360 of file TurnMsgLib.h.
{
return _changeIp;
}
bool StunAttrChangeRequest::getChangePort | ( | ) | const [inline] |
Definition at line 369 of file TurnMsgLib.h.
{
return _changePort;
}
void StunAttrChangeRequest::setChangeIp | ( | bool | ci | ) | [inline] |
Definition at line 363 of file TurnMsgLib.h.
{ if(ci) _changeIp = 1; else _changeIp = 0; }
void StunAttrChangeRequest::setChangePort | ( | bool | cp | ) | [inline] |
Definition at line 372 of file TurnMsgLib.h.
{ if(cp) _changePort = 1; else _changePort = 0; }