TURN Server  1.5
 All Classes Files Functions Variables Typedefs Friends Defines
Public Member Functions | Protected Member Functions
StunMsgIndication Class Reference

#include <TurnMsgLib.h>

Inheritance diagram for StunMsgIndication:
StunMsg

List of all members.

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 ()

Detailed Description

Definition at line 724 of file TurnMsgLib.h.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

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.

u16bits StunMsgIndication::getMethod ( ) const [inline]

Definition at line 740 of file TurnMsgLib.h.

                                  {
                return _method;
        }

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;
        }

The documentation for this class was generated from the following file: