#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) |
| stun_tid | getStunTid () |
Protected Member Functions | |
| virtual void | constructBuffer () |
| virtual bool | check () |
Definition at line 724 of file TurnMsgLib.h.
| StunMsgIndication::StunMsgIndication | ( | u16bits | method | ) | [inline] |
Definition at line 726 of file TurnMsgLib.h.
: _method(method) {};
| StunMsgIndication::StunMsgIndication | ( | u08bits * | buffer, |
| size_t | total_sz, | ||
| size_t | sz, | ||
| bool | constructed | ||
| ) | throw (WrongStunBufferFormatException) [inline] |
Definition at line 727 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 StunMsgIndication::~StunMsgIndication | ( | ) | [inline, virtual] |
Definition at line 738 of file TurnMsgLib.h.
{}
| virtual bool StunMsgIndication::check | ( | ) | [inline, protected, virtual] |
Implements StunMsg.
Definition at line 765 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 StunMsgIndication::constructBuffer | ( | ) | [inline, protected, virtual] |
Implements StunMsg.
Definition at line 760 of file TurnMsgLib.h.
{
stun_init_indication_str(_method,_buffer,&_sz);
_constructed = true;
}
| u16bits StunMsgIndication::getMethod | ( | ) | const [inline] |
Definition at line 740 of file TurnMsgLib.h.
{
return _method;
}
| stun_tid StunMsgIndication::getStunTid | ( | ) | [inline] |
Get transaction ID
Definition at line 751 of file TurnMsgLib.h.
{
stun_tid tid;
if(_constructed) {
stun_tid_from_message_str(_buffer,_sz,&tid);
}
return tid;
}
| void StunMsgIndication::setMethod | ( | u16bits | method | ) | [inline] |
Definition at line 744 of file TurnMsgLib.h.
{
_method = method;
}
1.8.0