# OpalMediaSession Class Reference

`#include <mediasession.h>`

Inheritance diagram for OpalMediaSession:

[legend]
Collaboration diagram for OpalMediaSession:
[legend]

## Public Types

typedef PList< PChannel > | Transport

## Public Member Functions

virtual const PCaselessString & | GetSessionType () const =0
virtual bool | Open (const PString &localInterface, const OpalTransportAddress &remoteAddress, bool isMediaAddress)
virtual bool | IsOpen () const
virtual bool | Close ()
virtual OpalTransportAddress | GetLocalAddress (bool isMediaAddress=true) const
virtual OpalTransportAddress | GetRemoteAddress (bool isMediaAddress=true) const
virtual bool | SetRemoteAddress (const OpalTransportAddress &remoteAddress, bool isMediaAddress=true)
virtual void | AttachTransport (Transport &transport)
virtual Transport | DetachTransport ()
bool | IsExternalTransport () const
virtual void | SetExternalTransport (const OpalTransportAddressArray &transports)
virtual SDPMediaDescription * | CreateSDPMediaDescription ()
virtual OpalMediaStream * | CreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)=0
virtual void | GetStatistics (OpalMediaStatistics &statistics, bool receiver) const
void | OfferCryptoSuite (const PString &cryptoSuite)
virtual OpalMediaCryptoKeyList & | GetOfferedCryptoKeys ()
virtual bool | ApplyCryptoKey (OpalMediaCryptoKeyList &keys, bool rx)
unsigned | GetSessionID () const
const OpalMediaType & | GetMediaType () const

## Protected Member Functions

| OpalMediaSession (const Init &init)

## Protected Attributes

OpalConnection & | m_connection
unsigned | m_sessionId
OpalMediaType | m_mediaType
bool | m_isExternalTransport
OpalMediaCryptoKeyList | m_offeredCryptokeys

## Data Structures

struct | Init
| Initialisation information for constructing a session. More...

## Detailed Description

Class for carrying media session information

## Member Typedef Documentation

typedef PList<PChannel> OpalMediaSession::Transport

## Constructor & Destructor Documentation

OpalMediaSession::OpalMediaSession | ( | const Init & | init | ) | `[protected]`

## Member Function Documentation

virtual bool OpalMediaSession::ApplyCryptoKey | ( | OpalMediaCryptoKeyList & | keys,
|  | bool | rx |
| ) |  |  | `[virtual]`

virtual void OpalMediaSession::AttachTransport | ( | Transport & | transport | ) | `[virtual]`

virtual bool OpalMediaSession::Close | ( |  | ) | `[virtual]`

Reimplemented in OpalMSRPMediaSession, OpalRTPSession, and OpalFaxSession.

virtual OpalMediaStream* OpalMediaSession::CreateMediaStream | ( | const OpalMediaFormat & | mediaFormat,
|  | unsigned | sessionID,
|  | bool | isSource |
| ) |  |  | `[pure virtual]`

Implemented in OpalRTPSession, SDPDummySession, and OpalFaxSession.

virtual SDPMediaDescription* OpalMediaSession::CreateSDPMediaDescription | ( |  | ) | `[virtual]`

Reimplemented in OpalMSRPMediaSession, and SDPDummySession.

virtual Transport OpalMediaSession::DetachTransport | ( |  | ) | `[virtual]`

Reimplemented in OpalRTPSession, and OpalFaxSession.

virtual OpalTransportAddress OpalMediaSession::GetLocalAddress | ( | bool | isMediaAddress = `true` | ) | const`[virtual]`

Reimplemented in OpalMSRPMediaSession, OpalRTPSession, and OpalFaxSession.

const OpalMediaType& OpalMediaSession::GetMediaType | ( |  | ) | const`[inline]`

virtual OpalMediaCryptoKeyList& OpalMediaSession::GetOfferedCryptoKeys | ( |  | ) | `[virtual]`

virtual OpalTransportAddress OpalMediaSession::GetRemoteAddress | ( | bool | isMediaAddress = `true` | ) | const`[virtual]`

Reimplemented in OpalMSRPMediaSession, OpalRTPSession, and OpalFaxSession.

unsigned OpalMediaSession::GetSessionID | ( |  | ) | const`[inline]`

virtual const PCaselessString& OpalMediaSession::GetSessionType | ( |  | ) | const`[pure virtual]`

Implemented in OpalMSRPMediaSession, OpalRTPSession, SDPDummySession, and OpalFaxSession.

virtual void OpalMediaSession::GetStatistics | ( | OpalMediaStatistics & | statistics,
|  | bool | receiver |
| ) |  |  | const`[virtual]`

Reimplemented in OpalRTPSession.

bool OpalMediaSession::IsExternalTransport | ( |  | ) | const`[inline]`

virtual bool OpalMediaSession::IsOpen | ( |  | ) | const`[virtual]`

Reimplemented in OpalRTPSession, and OpalFaxSession.

void OpalMediaSession::OfferCryptoSuite | ( | const PString & | cryptoSuite | ) |

virtual bool OpalMediaSession::Open | ( | const PString & | localInterface,
|  | const OpalTransportAddress & | remoteAddress,
|  | bool | isMediaAddress |
| ) |  |  | `[virtual]`

Reimplemented in OpalMSRPMediaSession, OpalRTPSession, and OpalFaxSession.

virtual void OpalMediaSession::SetExternalTransport | ( | const OpalTransportAddressArray & | transports | ) | `[virtual]`

Reimplemented in OpalRTPSession.

virtual bool OpalMediaSession::SetRemoteAddress | ( | const OpalTransportAddress & | remoteAddress,
|  | bool | isMediaAddress = `true` |
| ) |  |  | `[virtual]`

Reimplemented in OpalMSRPMediaSession, OpalRTPSession, and OpalFaxSession.

## Field Documentation

OpalConnection& OpalMediaSession::m_connection `[protected]`

bool OpalMediaSession::m_isExternalTransport `[protected]`

OpalMediaType OpalMediaSession::m_mediaType `[protected]`

OpalMediaCryptoKeyList OpalMediaSession::m_offeredCryptokeys `[protected]`

unsigned OpalMediaSession::m_sessionId `[protected]`

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

- mediasession.h