57 #ifndef _RNR_SESSION_H 58 #define _RNR_SESSION_H 64 #include "rnr/rnrconfig.h" 93 Session(
int nSessionId = 0,
const std::string &strSessionName =
"Session") :
95 m_sm(nSessionId, strSessionName)
163 void setError(
int ecode,
const char *sFmt, ...);
172 void setFatal(
int ecode,
const char *sFmt, ...);
217 #endif // _RNR_SESSION_H void setError(int ecode, const char *sFmt,...)
Set session error.
std::string getErrorMsg()
Get the last error message.
int m_nSessionId
session id
int getErrorCode()
Get the last error code.
StateMach & sm()
Session's state machine.
int m_ecode
last error code
Finite State Machine interface.
void setFatal(int ecode, const char *sFmt,...)
Set session fatal error.
std::string m_strSessionName
session name
void * getContext()
Get state relevant context.
bool m_bHasFatal
does [not] have fatal condition
Session(int nSessionId=0, const std::string &strSessionName="Session")
Default initialization contructor.
void * m_pContext
state specific data
char m_bufErrorMsg[256]
error message
void setContext(void *pContext)
Set state relevant context.
std::string getSessionName() const
Get session name.
State base class interface.
Finite State Machine Class.
bool isFatal()
Test if session is in fatal condition.
StateMach m_sm
session state machine
int getSessionId() const
Get session id.