#include <pcss.h>
Inheritance diagram for OpalPCSSEndPoint:
Public Member Functions | |
Construction | |
OpalPCSSEndPoint (OpalManager &manager, const char *prefix="pc") | |
~OpalPCSSEndPoint () | |
Overrides from OpalEndPoint | |
virtual BOOL | MakeConnection (OpalCall &call, const PString &party, void *userData=NULL) |
virtual OpalMediaFormatList | GetMediaFormats () const |
Customisation call backs | |
virtual OpalPCSSConnection * | CreateConnection (OpalCall &call, const PString &playDevice, const PString &recordDevice, void *userData) |
virtual PSoundChannel * | CreateSoundChannel (const OpalPCSSConnection &connection, const OpalMediaFormat &mediaFormat, BOOL isSource) |
User Interface operations | |
PSafePtr< OpalPCSSConnection > | GetPCSSConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite) |
virtual PString | OnGetDestination (const OpalPCSSConnection &connection)=0 |
virtual void | OnShowIncoming (const OpalPCSSConnection &connection)=0 |
virtual void | AcceptIncomingConnection (const PString &connectionToken) |
virtual BOOL | OnShowOutgoing (const OpalPCSSConnection &connection)=0 |
virtual BOOL | OnShowUserInput (const OpalPCSSConnection &connection, const PString &indication) |
virtual void | OnPatchMediaStream (const OpalPCSSConnection &connection, BOOL isSource, OpalMediaPatch &patch) |
Member variable access | |
virtual BOOL | SetSoundChannelPlayDevice (const PString &name) |
const PString & | GetSoundChannelPlayDevice () const |
virtual BOOL | SetSoundChannelRecordDevice (const PString &name) |
const PString & | GetSoundChannelRecordDevice () const |
unsigned | GetSoundChannelBufferDepth () const |
void | SetSoundChannelBufferDepth (unsigned depth) |
Protected Attributes | |
PString | soundChannelPlayDevice |
PString | soundChannelRecordDevice |
unsigned | soundChannelBuffers |
OpalPCSSEndPoint::OpalPCSSEndPoint | ( | OpalManager & | manager, | |
const char * | prefix = "pc" | |||
) |
Create a new endpoint.
manager | Manager of all endpoints. |
prefix | Prefix for URL style address strings |
OpalPCSSEndPoint::~OpalPCSSEndPoint | ( | ) |
Destroy endpoint.
virtual void OpalPCSSEndPoint::AcceptIncomingConnection | ( | const PString & | connectionToken | ) | [virtual] |
Accept the incoming connection.
connectionToken | Token of connection to accept call |
virtual OpalPCSSConnection* OpalPCSSEndPoint::CreateConnection | ( | OpalCall & | call, | |
const PString & | playDevice, | |||
const PString & | recordDevice, | |||
void * | userData | |||
) | [virtual] |
Create a connection for the PCSS endpoint. The default implementation is to create a OpalPCSSConnection.
call | Owner of connection |
playDevice | Sound channel play device |
recordDevice | Sound channel record device |
userData | Arbitrary data to pass to connection |
virtual PSoundChannel* OpalPCSSEndPoint::CreateSoundChannel | ( | const OpalPCSSConnection & | connection, | |
const OpalMediaFormat & | mediaFormat, | |||
BOOL | isSource | |||
) | [virtual] |
Create an PSoundChannel based media stream.
connection | Connection needing created sound channel |
mediaFormat | Media format for the connection |
isSource | Direction for channel |
virtual OpalMediaFormatList OpalPCSSEndPoint::GetMediaFormats | ( | ) | const [virtual] |
Get the data formats this endpoint is capable of operating. This provides a list of media data format names that may be used by an OpalMediaStream may be created by a connection from this endpoint.
Note that a specific connection may not actually support all of the media formats returned here, but should return no more.
The default behaviour is pure.
Implements OpalEndPoint.
PSafePtr<OpalPCSSConnection> OpalPCSSEndPoint::GetPCSSConnectionWithLock | ( | const PString & | token, | |
PSafetyMode | mode = PSafeReadWrite | |||
) | [inline] |
Find a connection that uses the specified token. This searches the endpoint for the connection that contains the token as provided by functions such as MakeConnection().
token | Token to identify connection |
unsigned OpalPCSSEndPoint::GetSoundChannelBufferDepth | ( | ) | const [inline] |
Get default the sound channel buffer depth.
const PString& OpalPCSSEndPoint::GetSoundChannelPlayDevice | ( | ) | const [inline] |
Get the name for the sound channel to be used for output. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
const PString& OpalPCSSEndPoint::GetSoundChannelRecordDevice | ( | ) | const [inline] |
Get the name for the sound channel to be used for input. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
virtual BOOL OpalPCSSEndPoint::MakeConnection | ( | OpalCall & | call, | |
const PString & | party, | |||
void * | userData = NULL | |||
) | [virtual] |
Set up a connection to a remote party. This is called from the OpalManager::MakeConnection() function once it has determined that this is the endpoint for the protocol.
The general form for this party parameter is:
[proto:][alias@][transport$]address[:port]
where the various fields will have meanings specific to the endpoint type. For example, with H.323 it could be "h323:Fred@site.com" which indicates a user Fred at gatekeeper size.com. Whereas for the PSTN endpoint it could be "pstn:5551234" which is to call 5551234 on the first available PSTN line.
The proto field is optional when passed to a specific endpoint. If it is present, however, it must agree with the endpoints protocol name or FALSE is returned.
This function usually returns almost immediately with the connection continuing to occur in a new background thread.
If FALSE is returned then the connection could not be established. For example if a PSTN endpoint is used and the assiciated line is engaged then it may return immediately. Returning a non-NULL value does not mean that the connection will succeed, only that an attempt is being made.
The default behaviour is pure.
call | Owner of connection |
party | Remote party to call |
userData | Arbitrary data to pass to connection |
Implements OpalEndPoint.
virtual PString OpalPCSSEndPoint::OnGetDestination | ( | const OpalPCSSConnection & | connection | ) | [pure virtual] |
Call back to get the destination for outgoing call. If FALSE is returned the call is aborted.
The default implementation is pure.
connection | Connection having event |
virtual void OpalPCSSEndPoint::OnPatchMediaStream | ( | const OpalPCSSConnection & | connection, | |
BOOL | isSource, | |||
OpalMediaPatch & | patch | |||
) | [virtual] |
Call back when patching a media stream. This function is called when a connection has created a new media patch between two streams.
connection | Connection having new patch |
isSource | Source patch |
patch | New patch |
virtual void OpalPCSSEndPoint::OnShowIncoming | ( | const OpalPCSSConnection & | connection | ) | [pure virtual] |
Call back to indicate that remote is ringing. If FALSE is returned the call is aborted.
The default implementation is pure.
connection | Connection having event |
virtual BOOL OpalPCSSEndPoint::OnShowOutgoing | ( | const OpalPCSSConnection & | connection | ) | [pure virtual] |
Call back to indicate that remote is ringing. If FALSE is returned the call is aborted.
The default implementation is pure.
connection | Connection having event |
virtual BOOL OpalPCSSEndPoint::OnShowUserInput | ( | const OpalPCSSConnection & | connection, | |
const PString & | indication | |||
) | [virtual] |
Call back to indicate that the remote user has indicated something. If FALSE is returned the call is aborted.
The default implementation does nothing.
connection | Connection having event |
void OpalPCSSEndPoint::SetSoundChannelBufferDepth | ( | unsigned | depth | ) |
Set the default sound channel buffer depth.
depth | New depth |
virtual BOOL OpalPCSSEndPoint::SetSoundChannelPlayDevice | ( | const PString & | name | ) | [virtual] |
Set the name for the sound channel to be used for output. If the name is not suitable for use with the PSoundChannel class then the function will return FALSE and not change the device.
This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
virtual BOOL OpalPCSSEndPoint::SetSoundChannelRecordDevice | ( | const PString & | name | ) | [virtual] |
Set the name for the sound channel to be used for input. If the name is not suitable for use with the PSoundChannel class then the function will return FALSE and not change the device.
This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
unsigned OpalPCSSEndPoint::soundChannelBuffers [protected] |
PString OpalPCSSEndPoint::soundChannelPlayDevice [protected] |
PString OpalPCSSEndPoint::soundChannelRecordDevice [protected] |