OpalPCSSEndPoint Class Reference

#include <pcss.h>

Inheritance diagram for OpalPCSSEndPoint:
OpalLocalEndPoint OpalEndPoint

Public Member Functions

Construction



 OpalPCSSEndPoint (OpalManager &manager, const char *prefix="pc")
 ~OpalPCSSEndPoint ()
Overrides from OpalEndPoint



virtual PSafePtr< OpalConnectionMakeConnection (OpalCall &call, const PString &party, void *userData=NULL, unsigned int options=0, OpalConnection::StringOptions *stringOptions=NULL)
Overrides from OpalLocalEndPoint



virtual bool OnOutgoingCall (const OpalLocalConnection &connection)
virtual bool OnIncomingCall (OpalLocalConnection &connection)
virtual bool OnUserInput (const OpalLocalConnection &connection, const PString &indication)
Customisation call backs



virtual OpalPCSSConnectionCreateConnection (OpalCall &call, const PString &playDevice, const PString &recordDevice, void *userData, unsigned options, OpalConnection::StringOptions *stringOptions)
virtual PSoundChannel * CreateSoundChannel (const OpalPCSSConnection &connection, const OpalMediaFormat &mediaFormat, PBoolean isSource)
User Interface operations



PSafePtr< OpalPCSSConnectionGetPCSSConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite)
virtual PBoolean OnShowIncoming (const OpalPCSSConnection &connection)=0
virtual PBoolean AcceptIncomingConnection (const PString &connectionToken)
virtual PBoolean RejectIncomingConnection (const PString &connectionToken)
virtual PBoolean OnShowOutgoing (const OpalPCSSConnection &connection)=0
virtual PBoolean OnShowUserInput (const OpalPCSSConnection &connection, const PString &indication)
Member variable access



virtual PBoolean SetSoundChannelPlayDevice (const PString &name)
const PString & GetSoundChannelPlayDevice () const
virtual PBoolean SetSoundChannelRecordDevice (const PString &name)
const PString & GetSoundChannelRecordDevice () const
unsigned GetSoundChannelBufferDepth () const
void SetSoundChannelBufferDepth (unsigned depth)
unsigned GetSoundChannelBufferTime () const
void SetSoundChannelBufferTime (unsigned depth)

Protected Attributes

PString soundChannelPlayDevice
PString soundChannelRecordDevice
unsigned soundChannelBuffers
unsigned m_soundChannelBufferTime

Detailed Description

PC Sound System endpoint.


Constructor & Destructor Documentation

OpalPCSSEndPoint::OpalPCSSEndPoint ( OpalManager manager,
const char *  prefix = "pc" 
)

Create a new endpoint.

Parameters:
manager Manager of all endpoints.
prefix Prefix for URL style address strings
OpalPCSSEndPoint::~OpalPCSSEndPoint (  ) 

Destroy endpoint.


Member Function Documentation

virtual PBoolean OpalPCSSEndPoint::AcceptIncomingConnection ( const PString &  connectionToken  )  [virtual]

Accept the incoming connection. Returns PFalse if the connection token does not correspond to a valid connection.

Parameters:
connectionToken Token of connection to accept call
virtual OpalPCSSConnection* OpalPCSSEndPoint::CreateConnection ( OpalCall call,
const PString &  playDevice,
const PString &  recordDevice,
void *  userData,
unsigned  options,
OpalConnection::StringOptions stringOptions 
) [virtual]

Create a connection for the PCSS endpoint. The default implementation is to create a OpalPCSSConnection.

Parameters:
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,
PBoolean  isSource 
) [virtual]

Create an PSoundChannel based media stream.

Parameters:
connection Connection needing created sound channel
mediaFormat Media format for the connection
isSource Direction for channel
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(). If not then it attempts to use the token as a OpalCall token and find a connection of the same class.

Parameters:
token Token to identify connection
unsigned OpalPCSSEndPoint::GetSoundChannelBufferDepth (  )  const [inline]

Get default the sound channel buffer depth. Note the largest of the depth in frames and the depth in milliseconds as returned by GetSoundBufferTime() is used.

References soundChannelBuffers.

unsigned OpalPCSSEndPoint::GetSoundChannelBufferTime (  )  const [inline]

Get default the sound channel buffer time in milliseconds. Note the largest of the depth in frames and the depth in milliseconds as returned by GetSoundBufferTime() is used.

References m_soundChannelBufferTime.

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.

References soundChannelPlayDevice.

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.

References soundChannelRecordDevice.

virtual PSafePtr<OpalConnection> OpalPCSSEndPoint::MakeConnection ( OpalCall call,
const PString &  party,
void *  userData = NULL,
unsigned int  options = 0,
OpalConnection::StringOptions stringOptions = 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 PFalse is returned.

This function usually returns almost immediately with the connection continuing to occur in a new background thread.

If PFalse 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.

Parameters:
call Owner of connection
party Remote party to call
userData Arbitrary data to pass to connection
options options to pass to conneciton

Reimplemented from OpalLocalEndPoint.

virtual bool OpalPCSSEndPoint::OnIncomingCall ( OpalLocalConnection connection  )  [virtual]

Call back to indicate that remote is ringing. If false is returned the call is aborted.

The default implementation answers the call immediately.

Parameters:
connection Connection having event

Reimplemented from OpalLocalEndPoint.

virtual bool OpalPCSSEndPoint::OnOutgoingCall ( const OpalLocalConnection connection  )  [virtual]

Call back to indicate that remote is ringing. If false is returned the call is aborted.

The default implementation does nothing.

Parameters:
connection Connection having event

Reimplemented from OpalLocalEndPoint.

virtual PBoolean OpalPCSSEndPoint::OnShowIncoming ( const OpalPCSSConnection connection  )  [pure virtual]

Call back to indicate that remote is ringing. If PFalse is returned the call is aborted.

The default implementation is pure.

Parameters:
connection Connection having event
virtual PBoolean OpalPCSSEndPoint::OnShowOutgoing ( const OpalPCSSConnection connection  )  [pure virtual]

Call back to indicate that remote is ringing. If PFalse is returned the call is aborted.

The default implementation is pure.

Parameters:
connection Connection having event
virtual PBoolean OpalPCSSEndPoint::OnShowUserInput ( const OpalPCSSConnection connection,
const PString &  indication 
) [virtual]

Call back to indicate that the remote user has indicated something. If PFalse is returned the call is aborted.

The default implementation does nothing.

Parameters:
connection Connection having event
virtual bool OpalPCSSEndPoint::OnUserInput ( const OpalLocalConnection 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.

Parameters:
connection Connection having event

Reimplemented from OpalLocalEndPoint.

virtual PBoolean OpalPCSSEndPoint::RejectIncomingConnection ( const PString &  connectionToken  )  [virtual]

Reject the incoming connection. Returns PFalse if the connection token does not correspond to a valid connection.

Parameters:
connectionToken Token of connection to accept call
void OpalPCSSEndPoint::SetSoundChannelBufferDepth ( unsigned  depth  ) 

Set the default sound channel buffer depth. Note the largest of the depth in frames and the depth in milliseconds as returned by GetSoundBufferTime() is used.

Parameters:
depth New depth
void OpalPCSSEndPoint::SetSoundChannelBufferTime ( unsigned  depth  ) 

Set the default sound channel buffer time in milliseconds. Note the largest of the depth in frames and the depth in milliseconds as returned by GetSoundBufferTime() is used.

Parameters:
depth New depth in milliseconds
virtual PBoolean 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 PFalse and not change the device.

This defaults to the value of the PSoundChannel::GetDefaultDevice() function.

virtual PBoolean 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 PFalse and not change the device.

This defaults to the value of the PSoundChannel::GetDefaultDevice() function.


Field Documentation


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

Generated on 14 Jul 2011 for OPAL by  doxygen 1.6.1