Yate
SIPSequence Class Reference

SIP CSeq generator. More...

#include <yatesip.h>

Inheritance diagram for SIPSequence:
RefObject Mutex GenObject Lockable

Public Member Functions

 SIPSequence (int32_t cseq=-1)
 
int32_t getLastCSeq () const
 
int32_t getNextCSeq ()
 
void setCSeq (int32_t cseq)
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 

Additional Inherited Members

- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 
- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
virtual void destroyed ()
 

Detailed Description

SIP CSeq generator.

Command Sequence Number generator

Constructor & Destructor Documentation

◆ SIPSequence()

SIPSequence ( int32_t cseq = -1)
inline

Constructor

Parameters
cseqSequence number to start

References Mutex::Mutex().

Member Function Documentation

◆ getLastCSeq()

int32_t getLastCSeq ( ) const
inline

Get the last number generated by this sequence

Returns
Last generated CSeq value between 0 and 2^31-1, negative if not initialized

◆ getNextCSeq()

int32_t getNextCSeq ( )
inline

Create a CSeq value suitable for use in a new request

Returns
New CSeq value between 1 and 2^31-1

◆ setCSeq()

void setCSeq ( int32_t cseq)
inline

Set the Command Sequence number

Parameters
cseqNew sequence number to start from

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