#include <MediaRelay.h>

Applicatiosn needing to use the services of the Symmitron need to isntantiate and initialize() a MediaRelay object which will take care of all the communication with the Symmitron. The API it exposes lets the application perform all the necessary operations to utilize the services of the Symmitron.
Public Member Functions | |
| MediaRelay () | |
| ~MediaRelay () | |
| void | notifySymmitronResetDetected (const UtlString &newSymmitronInstanceHandle) |
| Method used to notify the MediaRelay class that a Symmitron reset was detected. | |
| void | notifyBridgeStatistics (const UtlString &bridgeId, intptr_t numberOfPacketsProcessed, void *opaqueData) |
| Method used to notify the MediaRelay class that the bridge stats it has queried have been received. | |
| bool | initialize (const UtlString &publicAddress, const UtlString &nativeAddress, bool bXmlRpcSecured, bool isPartOfsipXLocalPrivateNetwork, int xmlRpcPort, size_t maxMediaRelaySessions) |
| Method to call to initialize the MediaRelay object. | |
| bool | isPartOfsipXLocalPrivateNetwork (void) const |
| Getter for isPartOfsipXLocalPrivateNetwork setting passed to initialize() method. | |
| const UtlString & | getPublicAddress (void) const |
| Getter for publicAddress setting passed to initialize() method. | |
| const UtlString & | getNativeAddress (void) const |
| Getter for nativeAddress setting passed to initialize() method. | |
| bool | allocateSession (tMediaRelayHandle &relayHandle, int &enpoint1RelayRtpPort, int &enpoint2RelayRtpPort) |
| Method used to obtain a media relay session capable of relaying RTP and RTCP streams. | |
| tMediaRelayHandle | cloneSession (const tMediaRelayHandle &relayHandleToClone, bool doSwapCallerAndCallee) |
| bool | deallocateSession (const tMediaRelayHandle &relayHandle) |
| bool | setDirectionMode (const tMediaRelayHandle &relayHandle, MediaDirectionality mediaRelayDirectionMode) |
| bool | linkSymToEndpoint (const tMediaRelayHandle &relayHandle, const UtlString &endpointIpAddress, int endpointRtpPort, int endpointRtcpPort, EndpointRole ownerOfSymToLink) |
| ssize_t | incrementLinkCountOfMediaRelaySession (const tMediaRelayHandle &handle) |
| int | getRtpRelayPortForMediaRelaySession (const tMediaRelayHandle &handle, EndpointRole endpointRole) |
| void | deallocateAllSymmitronResourcesAndSignOut (void) |
| const Url & | getXmlRpcServerUrl (void) const |
| bool | getPacketProcessingStatsForMediaRelaySession (const tMediaRelayHandle &handle, PacketProcessingStatistics &stats) |
| virtual OsStatus | signal (intptr_t eventData) |
Static Public Member Functions | |
| static UtlHashMap * | executeAndValudateSymmitronRequest (XmlRpcRequest &requestToSend, UtlString &symmitronInstanceHandle, int &errorCode, UtlString &errorDescription, XmlRpcResponse &xmlRpcResponse, bool bRetryFailedConnection=true) |
Private Member Functions | |
| MediaRelaySession * | getSessionByHandle (const tMediaRelayHandle &handle) |
| bool | preAllocateSymmitronResources (void) |
| UtlHashMap * | getAndValidateStandardMap (XmlRpcResponse &responseToValidate, UtlString &symmitronInstanceHandle, int &errorCode, UtlString &errorDescription) |
| bool | createPausedBridgeOnSymmitron (Sym *pEndpoint1Sym, Sym *pEndpoint2Sym, UtlString &returnedBridgeId, UtlString &symmitronInstanceHandle, int &errorCode, UtlString &errorDescription) |
| bool | addSymToBridge (UtlString &symId, UtlString &bridgeId, UtlString &symmitronInstanceHandle, int &errorCode, UtlString &errorDescription) |
| void | cleanUpEverything (void) |
Private Attributes | |
| UtlString | mPublicAddress |
| UtlString | mNativeAddress |
| bool | mbIsPartOfsipXLocalPrivateNetwork |
| int | mXmlRpcPort |
| size_t | mMaxMediaRelaySessions |
| UtlHashMap | mActiveMediaRelaySessions |
| int | mRelaySessionHandle |
| Url | mSymmitronUrl |
| UtlString | mOurInstanceHandle |
| UtlString | mSymmitronInstanceHandle |
| bool | mbSignedInWithSymmitron |
| UtlSortedList | mSymList |
| std::vector< MediaBridgePair * > | mAvailableMediaBridgePairsList |
| std::vector< MediaBridgePair * > | mBusyMediaBridgePairsList |
| AsynchMediaRelayRequestSender | mAsynchMediaRelayRequestSender |
| OsMutex | mMutex |
| OsTimer | mGenericTimer |
| ssize_t | mGenericTimerTickCounter |
| bool | mbPollForSymmitronRecovery |
| MediaRelay | ( | ) |
| ~MediaRelay | ( | ) |
| void notifySymmitronResetDetected | ( | const UtlString & | newSymmitronInstanceHandle | ) |
Method used to notify the MediaRelay class that a Symmitron reset was detected.
| void notifyBridgeStatistics | ( | const UtlString & | bridgeId, | |
| intptr_t | numberOfPacketsProcessed, | |||
| void * | opaqueData | |||
| ) |
Method used to notify the MediaRelay class that the bridge stats it has queried have been received.
| bool initialize | ( | const UtlString & | publicAddress, | |
| const UtlString & | nativeAddress, | |||
| bool | bXmlRpcSecured, | |||
| bool | isPartOfsipXLocalPrivateNetwork, | |||
| int | xmlRpcPort, | |||
| size_t | maxMediaRelaySessions | |||
| ) |
Method to call to initialize the MediaRelay object.
Returns: true for success and false for failure.
| bool isPartOfsipXLocalPrivateNetwork | ( | void | ) | const [inline] |
Getter for isPartOfsipXLocalPrivateNetwork setting passed to initialize() method.
| const UtlString& getPublicAddress | ( | void | ) | const [inline] |
Getter for publicAddress setting passed to initialize() method.
| const UtlString& getNativeAddress | ( | void | ) | const [inline] |
Getter for nativeAddress setting passed to initialize() method.
| bool allocateSession | ( | tMediaRelayHandle & | relayHandle, | |
| int & | enpoint1RelayRtpPort, | |||
| int & | enpoint2RelayRtpPort | |||
| ) |
Method used to obtain a media relay session capable of relaying RTP and RTCP streams.
| tMediaRelayHandle cloneSession | ( | const tMediaRelayHandle & | relayHandleToClone, | |
| bool | doSwapCallerAndCallee | |||
| ) |
| bool deallocateSession | ( | const tMediaRelayHandle & | relayHandle | ) |
| bool setDirectionMode | ( | const tMediaRelayHandle & | relayHandle, | |
| MediaDirectionality | mediaRelayDirectionMode | |||
| ) |
| bool linkSymToEndpoint | ( | const tMediaRelayHandle & | relayHandle, | |
| const UtlString & | endpointIpAddress, | |||
| int | endpointRtpPort, | |||
| int | endpointRtcpPort, | |||
| EndpointRole | ownerOfSymToLink | |||
| ) |
| ssize_t incrementLinkCountOfMediaRelaySession | ( | const tMediaRelayHandle & | handle | ) |
| int getRtpRelayPortForMediaRelaySession | ( | const tMediaRelayHandle & | handle, | |
| EndpointRole | endpointRole | |||
| ) |
| void deallocateAllSymmitronResourcesAndSignOut | ( | void | ) |
| const Url & getXmlRpcServerUrl | ( | void | ) | const |
| UtlHashMap * executeAndValudateSymmitronRequest | ( | XmlRpcRequest & | requestToSend, | |
| UtlString & | symmitronInstanceHandle, | |||
| int & | errorCode, | |||
| UtlString & | errorDescription, | |||
| XmlRpcResponse & | xmlRpcResponse, | |||
| bool | bRetryFailedConnection = true | |||
| ) | [static] |
| bool getPacketProcessingStatsForMediaRelaySession | ( | const tMediaRelayHandle & | handle, | |
| PacketProcessingStatistics & | stats | |||
| ) |
| OsStatus signal | ( | intptr_t | eventData | ) | [virtual] |
Implements OsNotification.
| MediaRelaySession * getSessionByHandle | ( | const tMediaRelayHandle & | handle | ) | [private] |
| bool preAllocateSymmitronResources | ( | void | ) | [private] |
| UtlHashMap* getAndValidateStandardMap | ( | XmlRpcResponse & | responseToValidate, | |
| UtlString & | symmitronInstanceHandle, | |||
| int & | errorCode, | |||
| UtlString & | errorDescription | |||
| ) | [private] |
| bool createPausedBridgeOnSymmitron | ( | Sym * | pEndpoint1Sym, | |
| Sym * | pEndpoint2Sym, | |||
| UtlString & | returnedBridgeId, | |||
| UtlString & | symmitronInstanceHandle, | |||
| int & | errorCode, | |||
| UtlString & | errorDescription | |||
| ) | [private] |
| bool addSymToBridge | ( | UtlString & | symId, | |
| UtlString & | bridgeId, | |||
| UtlString & | symmitronInstanceHandle, | |||
| int & | errorCode, | |||
| UtlString & | errorDescription | |||
| ) | [private] |
| void cleanUpEverything | ( | void | ) | [private] |
UtlString mPublicAddress [private] |
UtlString mNativeAddress [private] |
bool mbIsPartOfsipXLocalPrivateNetwork [private] |
int mXmlRpcPort [private] |
size_t mMaxMediaRelaySessions [private] |
UtlHashMap mActiveMediaRelaySessions [private] |
int mRelaySessionHandle [private] |
Url mSymmitronUrl [private] |
UtlString mOurInstanceHandle [private] |
UtlString mSymmitronInstanceHandle [private] |
bool mbSignedInWithSymmitron [private] |
UtlSortedList mSymList [private] |
std::vector<MediaBridgePair*> mAvailableMediaBridgePairsList [private] |
std::vector<MediaBridgePair*> mBusyMediaBridgePairsList [private] |
OsMutex mMutex [private] |
OsTimer mGenericTimer [private] |
ssize_t mGenericTimerTickCounter [private] |
bool mbPollForSymmitronRecovery [private] |