CSeqManager manages the CSeq number space for a dialog. More...
#include <CSeqManager.h>
Public Member Functions | |
CSeqManager () | |
Default constructor. More... | |
virtual | ~CSeqManager () |
Destructor. More... | |
bool | startTransaction (const char *szIdentifier, int &iCSeq) |
startTransaction notes that a transaction has been started and will return FALSE if any other transaction was already started. More... | |
bool | endTransaction (const char *szIdentifier) |
endTransaction marks the end of a transaction. More... | |
void | dumpState (UtlString &state) |
Dump state into specified string. More... | |
int | getCSeqNumber (const char *szIdentifier) |
Get the current csequence number. More... | |
bool | isInTransaction (const char *szIdentifier) |
Is the specified identifer in a transaction already? More... | |
Protected Member Functions | |
CSEQ_CONTEXT * | getContext (const char *szIdentifier) |
Gets the context for the specified identifier. More... | |
Protected Attributes | |
UtlHashMap | mHashMap |
UtlRandom | mRandomGenerator |
OsMutex | mGuard |
int | miCSeq |
Private Member Functions | |
CSeqManager (const CSeqManager &rCSeqManager) | |
Disabled copy constructor. More... | |
CSeqManager & | operator= (const CSeqManager &rhs) |
Disabled assignment operator. More... | |
CSeqManager manages the CSeq number space for a dialog.
It keeps track of multiple identifiers to handle overlapping transactions (e.g. send a NOTIFY while an INFO transaction is still outstanding).
CSeqManager | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
private |
Disabled copy constructor.
void dumpState | ( | UtlString & | state | ) |
Dump state into specified string.
bool endTransaction | ( | const char * | szIdentifier | ) |
endTransaction marks the end of a transaction.
|
protected |
Gets the context for the specified identifier.
If no context is available, one is created.
int getCSeqNumber | ( | const char * | szIdentifier | ) |
Get the current csequence number.
bool isInTransaction | ( | const char * | szIdentifier | ) |
Is the specified identifer in a transaction already?
|
private |
Disabled assignment operator.
bool startTransaction | ( | const char * | szIdentifier, |
int & | iCSeq | ||
) |
startTransaction notes that a transaction has been started and will return FALSE if any other transaction was already started.
It is assumed that if startTransaction fails (returns false), the developer will try to start the transaction again later. This method will increase the CSeq number regardless of success.
|
protected |
|
protected |
|
protected |
|
protected |