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

#include <TurnMsgLib.h>

Inheritance diagram for turn::StunAttrChannelNumber:
turn::StunAttr

List of all members.

Public Member Functions

 StunAttrChannelNumber ()
 StunAttrChannelNumber (const StunAttrIterator &iter) throw (WrongStunAttrFormatException, EndOfStunMsgException)
virtual ~StunAttrChannelNumber ()
u16bits getChannelNumber () const
void setChannelNumber (u16bits cn)

Protected Member Functions

virtual int addToBuffer (u08bits *buffer, size_t &sz) throw (WrongStunAttrFormatException, WrongStunBufferFormatException)

Detailed Description

Channel number attribute class

Definition at line 311 of file TurnMsgLib.h.


Constructor & Destructor Documentation

Definition at line 313 of file TurnMsgLib.h.

                                : _cn(0) {
                setType(STUN_ATTRIBUTE_CHANNEL_NUMBER);
        }

Definition at line 316 of file TurnMsgLib.h.

                                                                           :
                StunAttr(iter) {

                if(iter.eof())
                        throw EndOfStunMsgException();
                _cn = stun_attr_get_channel_number(getSar(iter));
                if(!_cn)
                        throw WrongStunAttrFormatException();
        }

Definition at line 326 of file TurnMsgLib.h.

{}

Member Function Documentation

virtual int turn::StunAttrChannelNumber::addToBuffer ( u08bits *  buffer,
size_t &  sz 
) throw (WrongStunAttrFormatException, WrongStunBufferFormatException) [inline, protected, virtual]

Virtual function member to add attribute to a raw buffer

Reimplemented from turn::StunAttr.

Definition at line 334 of file TurnMsgLib.h.

                                                                                                                                 {
                return stun_attr_add_channel_number_str(buffer,&sz,_cn);
        }

Definition at line 327 of file TurnMsgLib.h.

                                         {
                return _cn;
        }
void turn::StunAttrChannelNumber::setChannelNumber ( u16bits  cn) [inline]

Definition at line 330 of file TurnMsgLib.h.

                                          {
                _cn = cn;
        }

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