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

#include <TurnMsgLib.h>

Inheritance diagram for turn::StunMsgIndication:
turn::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)

Protected Member Functions

virtual void constructBuffer ()
virtual bool check ()

Detailed Description

Class for STUN/TURN indications

Definition at line 1038 of file TurnMsgLib.h.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

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.

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

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