rtspserver
Class RtspSessionManager


class RtspSessionManager

Mananges all the rtsp sessions for rtsp server.


Destructor Summary
~RtspSessionManager()
          destructor

Method Summary
 DataaddRtspSession(Sptr session)
          adds a new session into rtsp session map
 booldelRtspSession(const Data & sessionId)
          delete an existing session from rtsp session map
 static voiddestroy()
          frees the memory associated with singelton instance
 SptrgetRtspSession()
          return first session from rtsp session map
 SptrgetRtspSession(const Data & sessionId)
          finds an existing session from rtsp session map
 const intgetSessions()
          returns the number of current sessions
 static RtspSessionManager &instance()
          create a singelton object
 boolmaxSessions(const int max)
          sets the max number of sessions

Method Detail

~RtspSessionManager

public ~RtspSessionManager()
destructor
Method Detail

addRtspSession

public Data addRtspSession(Sptr session)
adds a new session into rtsp session map
Returns: "" if failed to add session (ie server overloaded), else return its new sessionID

delRtspSession

public bool delRtspSession(const Data & sessionId)
delete an existing session from rtsp session map
Returns: false if session not found

destroy

public static void destroy()
frees the memory associated with singelton instance

getRtspSession

public Sptr getRtspSession()
return first session from rtsp session map
Returns: 0 if none remaining

getRtspSession

public Sptr getRtspSession(const Data & sessionId)
finds an existing session from rtsp session map
Returns: 0 if not found

getSessions

public const int getSessions()
returns the number of current sessions

instance

public static RtspSessionManager & instance()
create a singelton object

maxSessions

public bool maxSessions(const int max)
sets the max number of sessions

Association Links

to Class RtspSessionManager

singelton object