#include <TurnMsgLib.h>
Public Member Functions | |
StunMsgIndication (u16bits method) | |
StunMsgIndication (u08bits *buffer, size_t total_sz, size_t sz, bool constructed) throw (WrongStunBufferFormatException) | |
virtual | ~StunMsgIndication () |
u16bits | getMethod () const |
void | setMethod (u16bits method) |
Protected Member Functions | |
virtual void | constructBuffer () |
virtual bool | check () |
Class for STUN/TURN indications
Definition at line 1038 of file TurnMsgLib.h.
turn::StunMsgIndication::StunMsgIndication | ( | u16bits | method | ) | [inline] |
Definition at line 1040 of file TurnMsgLib.h.
: _method(method) {};
turn::StunMsgIndication::StunMsgIndication | ( | u08bits * | buffer, |
size_t | total_sz, | ||
size_t | sz, | ||
bool | constructed | ||
) | throw (WrongStunBufferFormatException) [inline] |
Definition at line 1041 of file TurnMsgLib.h.
: StunMsg(buffer,total_sz,sz,constructed),_method(0) { if(constructed) { if(!stun_is_indication_str(buffer,sz)) { throw WrongStunBufferFormatException(); } _method = stun_get_method_str(buffer,sz); } }
virtual turn::StunMsgIndication::~StunMsgIndication | ( | ) | [inline, virtual] |
Definition at line 1052 of file TurnMsgLib.h.
{}
virtual bool turn::StunMsgIndication::check | ( | ) | [inline, protected, virtual] |
Implements turn::StunMsg.
Definition at line 1068 of file TurnMsgLib.h.
{ if(!_constructed) return false; if(!stun_is_indication_str(_buffer,_sz)) { return false; } if(_method != stun_get_method_str(_buffer,_sz)) { return false; } return true; }
virtual void turn::StunMsgIndication::constructBuffer | ( | ) | [inline, protected, virtual] |
Implements turn::StunMsg.
Definition at line 1063 of file TurnMsgLib.h.
{ stun_init_indication_str(_method,_buffer,&_sz); _constructed = true; }
u16bits turn::StunMsgIndication::getMethod | ( | ) | const [inline] |
Definition at line 1054 of file TurnMsgLib.h.
{
return _method;
}
void turn::StunMsgIndication::setMethod | ( | u16bits | method | ) | [inline] |
Definition at line 1058 of file TurnMsgLib.h.
{ _method = method; }