OpalPCSSConnection Class Reference

#include <pcss.h>

Inheritance diagram for OpalPCSSConnection:
OpalConnection

List of all members.

Public Member Functions

Construction

 OpalPCSSConnection (OpalCall &call, OpalPCSSEndPoint &endpoint, const PString &playDevice, const PString &recordDevice, unsigned options=0, OpalConnection::StringOptions *stringOptions=NULL)
 ~OpalPCSSConnection ()
Overrides from OpalConnection

virtual bool IsNetworkConnection () const
virtual PBoolean SetUpConnection ()
virtual PBoolean SetAlerting (const PString &calleeName, PBoolean withMedia)
virtual bool TransferConnection (const PString &remoteParty)
virtual OpalMediaStreamCreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource)
virtual void OnPatchMediaStream (PBoolean isSource, OpalMediaPatch &patch)
virtual OpalMediaStreamPtr OpenMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
virtual PBoolean SetAudioVolume (PBoolean source, unsigned percentage)
virtual unsigned GetAudioSignalLevel (PBoolean source)
virtual PBoolean SendUserInputString (const PString &value)
New operations

virtual void AcceptIncoming ()
virtual PSoundChannel * CreateSoundChannel (const OpalMediaFormat &mediaFormat, PBoolean isSource)
Member variable access

const PString & GetSoundChannelPlayDevice () const
const PString & GetSoundChannelRecordDevice () const
unsigned GetSoundChannelBufferDepth () const

Protected Attributes

OpalPCSSEndPointendpoint
PString soundChannelPlayDevice
PString soundChannelRecordDevice
unsigned soundChannelBuffers

Detailed Description

PC Sound System connection.


Constructor & Destructor Documentation

OpalPCSSConnection::OpalPCSSConnection ( OpalCall call,
OpalPCSSEndPoint endpoint,
const PString &  playDevice,
const PString &  recordDevice,
unsigned  options = 0,
OpalConnection::StringOptions stringOptions = NULL 
)

Create a new endpoint.

Parameters:
call Owner calll for connection
endpoint Owner endpoint for connection
playDevice Sound channel play device
recordDevice Sound channel record device
OpalPCSSConnection::~OpalPCSSConnection (  ) 

Destroy endpoint.


Member Function Documentation

virtual void OpalPCSSConnection::AcceptIncoming (  )  [virtual]

Accept the incoming connection.

virtual OpalMediaStream* OpalPCSSConnection::CreateMediaStream ( const OpalMediaFormat mediaFormat,
unsigned  sessionID,
PBoolean  isSource 
) [virtual]

Open a new media stream. This will create a media stream of an appropriate subclass as required by the underlying connection protocol. For instance H.323 would create an OpalRTPStream.

The sessionID parameter may not be needed by a particular media stream and may be ignored. In the case of an OpalRTPStream it us used.

Note that media streams may be created internally to the underlying protocol. This function is not the only way a stream can come into existance.

The default behaviour is pure.

Parameters:
mediaFormat Media format for stream
sessionID Session number for stream
isSource Is a source stream

Reimplemented from OpalConnection.

virtual PSoundChannel* OpalPCSSConnection::CreateSoundChannel ( const OpalMediaFormat mediaFormat,
PBoolean  isSource 
) [virtual]

Create an PSoundChannel based media stream.

Parameters:
mediaFormat Media format for the connection
isSource Direction for channel
virtual unsigned OpalPCSSConnection::GetAudioSignalLevel ( PBoolean  source  )  [virtual]

Get the average signal level (0..32767) for the audio media channel. A return value of UINT_MAX indicates no valid signal, eg no audio channel opened.

Parameters:
source true for source (microphone), false for sink (speaker)

Reimplemented from OpalConnection.

unsigned OpalPCSSConnection::GetSoundChannelBufferDepth (  )  const [inline]

Get default the sound channel buffer depth.

References soundChannelBuffers.

const PString& OpalPCSSConnection::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& OpalPCSSConnection::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 bool OpalPCSSConnection::IsNetworkConnection (  )  const [inline, virtual]

Get indication of connection being to a "network". This indicates the if the connection may be regarded as a "network" connection. The distinction is about if there is a concept of a "remote" party being connected to and is best described by example: sip, h323, iax and pstn are all "network" connections as they connect to something "remote". While pc, pots and ivr are not as the entity being connected to is intrinsically local.

Implements OpalConnection.

virtual void OpalPCSSConnection::OnPatchMediaStream ( PBoolean  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. Add the echo canceler patch and call the endpoint function of the same name. Add a PCM silence detector filter.

Parameters:
patch New patch

Reimplemented from OpalConnection.

virtual OpalMediaStreamPtr OpalPCSSConnection::OpenMediaStream ( const OpalMediaFormat mediaFormat,
unsigned  sessionID,
bool  isSource 
) [virtual]

Open source or sink media stream for session.

Parameters:
mediaFormat Media format to open
sessionID Session to start stream on
isSource Stream is a source/sink

Reimplemented from OpalConnection.

virtual PBoolean OpalPCSSConnection::SendUserInputString ( const PString &  value  )  [virtual]

Send a user input indication to the remote endpoint. This sends an arbitrary string as a user indication. If DTMF tones in particular are required to be sent then the SendIndicationTone() function should be used.

The default behaviour plays the DTMF tones on the line.

Parameters:
value String value of indication

Reimplemented from OpalConnection.

virtual PBoolean OpalPCSSConnection::SetAlerting ( const PString &  calleeName,
PBoolean  withMedia 
) [virtual]

Indicate to remote endpoint an alert is in progress. If this is an incoming connection and the AnswerCallResponse is in a AnswerCallDeferred or AnswerCallPending state, then this function is used to indicate to that endpoint that an alert is in progress. This is usually due to another connection which is in the call (the B party) has received an OnAlerting() indicating that its remote endpoint is "ringing".

The default behaviour does nothing.

Parameters:
calleeName Name of endpoint being alerted.
withMedia Open media with alerting

Implements OpalConnection.

virtual PBoolean OpalPCSSConnection::SetAudioVolume ( PBoolean  source,
unsigned  percentage 
) [virtual]

Set the volume (gain) for the audio media channel to the specified percentage.

Parameters:
source true for source (microphone), false for sink (speaker)
percentage Gain, 0=silent, 100=maximun

Reimplemented from OpalConnection.

virtual PBoolean OpalPCSSConnection::SetUpConnection (  )  [virtual]

Start an outgoing connection. This function will initiate the connection to the remote entity, for example in H.323 it sends a SETUP, in SIP it sends an INVITE etc.

The default behaviour does.

Implements OpalConnection.

virtual bool OpalPCSSConnection::TransferConnection ( const PString &  remoteParty  )  [virtual]

Initiate the transfer of an existing call (connection) to a new remote party.

If remoteParty is a valid call token, then the remote party is transferred to that party (consultation transfer) and both calls are cleared.

Parameters:
remoteParty Remote party to transfer the existing call to

Reimplemented from OpalConnection.


Member Data Documentation

Reimplemented from OpalConnection.


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 10:24:47 2010 for OPAL by  doxygen 1.6.3