SessionMgmt Class Reference

This class is used for management of currently active streaming sessions. More...

#include <SessionMgmt.hpp>

Inheritance diagram for SessionMgmt:

VThread List of all members.

Public Member Functions

 SessionMgmt (int port)
 default constructor
 ~SessionMgmt ()
 default destructor
void run ()
 start this thread
void addSession (SSession *sess)
 add a streaming session to the list
void removeSession (SSession *sess)
 remove a streaming session from the list
SSessiongetSession (uint RtspSessionId)
void listSessions ()
 print the content of the session-list to standard-out
int getListSize ()
vector< SSession * > * getVector ()

Detailed Description

This class is used for management of currently active streaming sessions.

Furthermore it listens for incoming connections (from semiserver) and replies the list of active streaming-sessions (throuhg ServerCommunication.cpp).

Author:
Klaus Schoeffmann

Definition at line 78 of file SessionMgmt.hpp.


Member Function Documentation

int SessionMgmt::getListSize  ) 
 

Returns:
number of entries in session-list.
Definition at line 210 of file SessionMgmt.cpp.
00211 { 00212 return list.size(); 00213 }

SSession * SessionMgmt::getSession uint  RtspSessionId  ) 
 

Returns:
a reference to the session object, which has the Rtsp-SessionId specified by
Parameters:
RtspSessionId 
Definition at line 104 of file SessionMgmt.cpp.

References SSession::getRtspSessionId().

Referenced by SemiProxy::getSession().

00105 { 00106 00107 vector<SSession*>::const_iterator iter = list.begin(); 00108 while (iter != list.end()) 00109 { 00110 SSession *sess = *iter; 00111 if (sess->getRtspSessionId() == RtspSessionId) 00112 { 00113 return sess; 00114 } 00115 iter++; 00116 } 00117 00118 //not found 00119 return NULL; 00120 00121 }

vector< SSession * > * SessionMgmt::getVector  ) 
 

Returns:
a reference to the begin of the session-list.
Definition at line 216 of file SessionMgmt.cpp.

Referenced by ServerCommunication::sendSessionsToServer().

00217 { 00218 return &list; 00219 }


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