# OpalMSRPManager Class Reference

`#include <msrp.h>`

Collaboration diagram for OpalMSRPManager:

[legend]

## Public Types

typedef PNotifierTemplate< IncomingMSRP & > | CallBack
| DefaultPort = 2855
enum | { DefaultPort = 2855 }

## Public Member Functions

| OpalMSRPManager (OpalManager &opal, WORD port=DefaultPort)
| ~OpalMSRPManager ()
bool | GetLocalPort (WORD &port)
PSafePtr< Connection > | OpenConnection (const PURL &localURL, const PURL &remoteURL)
bool | CloseConnection (PSafePtr< OpalMSRPManager::Connection > &connection)
std::string | CreateSessionID ()
PURL | SessionIDToURL (const OpalTransportAddress &addr, const std::string &id)
void | ListenerThread ()
void | DispatchMessage (IncomingMSRP &incomingMsg)
void | SetNotifier (const PURL &localUrl, const PURL &remoteURL, const CallBack &notifier)
void | RemoveNotifier (const PURL &localUrl, const PURL &remoteURL)
OpalManager & | GetOpalManager ()

## Protected Types

typedef std::map< PString, PSafePtr< Connection > > | ConnectionInfoMapType
typedef std::map< PString, CallBack > | CallBackMap

## Protected Attributes

OpalManager & | opalManager
WORD | m_listenerPort
PMutex | mutex
PAtomicInteger | lastID
PTCPSocket | m_listenerSocket
PThread * | m_listenerThread
PMutex | m_connectionInfoMapAddMutex
ConnectionInfoMapType | m_connectionInfoMap
CallBackMap | m_callBacks
PMutex | m_callBacksMutex

## Data Structures

class | Connection
struct | IncomingMSRP

## Member Typedef Documentation

typedef PNotifierTemplate<IncomingMSRP &> OpalMSRPManager::CallBack

typedef std::map<PString, CallBack> OpalMSRPManager::CallBackMap `[protected]`

typedef std::map<PString, PSafePtr<Connection> > OpalMSRPManager::ConnectionInfoMapType `[protected]`

## Member Enumeration Documentation

anonymous enum

Enumerator:

  DefaultPort |

## Constructor & Destructor Documentation

OpalMSRPManager::OpalMSRPManager | ( | OpalManager & | opal,
|  | WORD | port = `DefaultPort` |
| ) |  |  |

OpalMSRPManager::~OpalMSRPManager | ( |  | ) |

## Member Function Documentation

bool OpalMSRPManager::CloseConnection | ( | PSafePtr< OpalMSRPManager::Connection > & | connection | ) |

std::string OpalMSRPManager::CreateSessionID | ( |  | ) |

void OpalMSRPManager::DispatchMessage | ( | IncomingMSRP & | incomingMsg | ) |

bool OpalMSRPManager::GetLocalPort | ( | WORD & | port | ) |

OpalManager& OpalMSRPManager::GetOpalManager | ( |  | ) | `[inline]`

void OpalMSRPManager::ListenerThread | ( |  | ) |

PSafePtr<Connection> OpalMSRPManager::OpenConnection | ( | const PURL & | localURL,
|  | const PURL & | remoteURL |
| ) |  |  |

void OpalMSRPManager::RemoveNotifier | ( | const PURL & | localUrl,
|  | const PURL & | remoteURL |
| ) |  |  |

PURL OpalMSRPManager::SessionIDToURL | ( | const OpalTransportAddress & | addr,
|  | const std::string & | id |
| ) |  |  |

void OpalMSRPManager::SetNotifier | ( | const PURL & | localUrl,
|  | const PURL & | remoteURL,
|  | const CallBack & | notifier |
| ) |  |  |

## Field Documentation

PAtomicInteger OpalMSRPManager::lastID `[protected]`

CallBackMap OpalMSRPManager::m_callBacks `[protected]`

PMutex OpalMSRPManager::m_callBacksMutex `[protected]`

ConnectionInfoMapType OpalMSRPManager::m_connectionInfoMap `[protected]`

PMutex OpalMSRPManager::m_connectionInfoMapAddMutex `[protected]`

WORD OpalMSRPManager::m_listenerPort `[protected]`

PTCPSocket OpalMSRPManager::m_listenerSocket `[protected]`

PThread* OpalMSRPManager::m_listenerThread `[protected]`

PMutex OpalMSRPManager::mutex `[protected]`

OpalManager& OpalMSRPManager::opalManager `[protected]`

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

- msrp.h