# OpalRTPSessionManager Class Reference

`#include <rtpconn.h>`

List of all members.

## Public Member Functions

void | CopyFromMaster (const OpalRTPSessionManager &sm)
void | CopyToMaster (OpalRTPSessionManager &sm)
void | Initialise (OpalRTPConnection &conn, OpalConnection::StringOptions *stringOptions)
unsigned | AutoStartSession (unsigned sessionID, const OpalMediaType &mediaType, bool autoStartReceive, bool autoStartTransmit)
PMutex & | GetMutex ()
Operations
void | AddSession (RTP_Session *session, const OpalMediaType &mediaType)
void | ReleaseSession (unsigned sessionID, PBoolean clearAll=PFalse)
RTP_Session * | GetSession (unsigned sessionID) const
void | SetCleanup (bool v)

## Protected Member Functions

void | SetOldOptions (unsigned channelId, const OpalMediaType &mediaType, bool rx, bool tx)
| PDICTIONARY (SessionDict, POrdinalKey, OpalMediaSession)

## Protected Attributes

PMutex | m_mutex
bool | m_initialised
bool | m_cleanupOnDelete
SessionDict | sessions

## Detailed Description

This class manages the RTP sessions for an OpalRTPConnection

## Constructor & Destructor Documentation

OpalRTPSessionManager::OpalRTPSessionManager | ( |  | ) |

Construct new session manager database.

OpalRTPSessionManager::~OpalRTPSessionManager | ( |  | ) |

OpalRTPSessionManager::OpalRTPSessionManager | ( |  | ) |

Construct new session manager database.

OpalRTPSessionManager::~OpalRTPSessionManager | ( |  | ) |

## Member Function Documentation

void OpalRTPSessionManager::CopyFromMaster | ( | const OpalRTPSessionManager & | sm | ) |

void OpalRTPSessionManager::CopyToMaster | ( | OpalRTPSessionManager & | sm | ) |

void OpalRTPSessionManager::Initialise | ( | OpalRTPConnection & | conn,
|  | OpalConnection::StringOptions * | stringOptions |
| ) |  |  |

Initialise the autostart options within the session

unsigned OpalRTPSessionManager::AutoStartSession | ( | unsigned | sessionID,
|  | const OpalMediaType & | mediaType,
|  | bool | autoStartReceive,
|  | bool | autoStartTransmit |
| ) |  |  |

Initialise the autostart options for a session

Parameters:

  sessionID | Session ID to use.

void OpalRTPSessionManager::AddSession | ( | RTP_Session * | session,
|  | const OpalMediaType & | mediaType |
| ) |  |  |

Add an RTP session for the specified ID.

This function MUST be called only after the UseSession() function has returned NULL. The mutex flag is left locked in that case. This function expects the mutex to be locked and unlocks it automatically.

Parameters:

  session | Session to add.
  mediaType | initial media type for this session

void OpalRTPSessionManager::ReleaseSession | ( | unsigned | sessionID,
|  | PBoolean | clearAll = `PFalse` |
| ) |  |  |

Release the session.

Parameters:

  sessionID | Session ID to release.
  clearAll | Clear all sessions with that ID

RTP_Session* OpalRTPSessionManager::GetSession | ( | unsigned | sessionID | ) | const

Get a session for the specified ID.

Parameters:

  sessionID | Session ID to get.

void OpalRTPSessionManager::SetCleanup | ( | bool | v | ) | `[inline]`

PMutex& OpalRTPSessionManager::GetMutex | ( |  | ) | `[inline]`

void OpalRTPSessionManager::SetOldOptions | ( | unsigned | channelId,
|  | const OpalMediaType & | mediaType,
|  | bool | rx,
|  | bool | tx |
| ) |  |  | `[protected]`

OpalRTPSessionManager::PDICTIONARY | ( | SessionDict | ,
|  | POrdinalKey | ,
|  | OpalMediaSession |  |
| ) |  |  | `[protected]`

## Member Data Documentation

PMutex OpalRTPSessionManager::m_mutex `[protected]`

bool OpalRTPSessionManager::m_initialised `[protected]`

bool OpalRTPSessionManager::m_cleanupOnDelete `[protected]`

SessionDict OpalRTPSessionManager::sessions `[protected]`

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

- rtpconn.h