OpalLocalConnection Class Reference

#include <localep.h>

Inheritance diagram for OpalLocalConnection:

OpalConnection OpalIVRConnection OpalMixerConnection

Public Member Functions

Construction
 OpalLocalConnection (OpalCall &call, OpalLocalEndPoint &endpoint, void *userData, unsigned options, OpalConnection::StringOptions *stringOptions, char tokenPrefix= 'L')
 ~OpalLocalConnection ()
Overrides from OpalConnection
virtual PBoolean IsNetworkConnection () const
virtual PBoolean SetUpConnection ()
virtual PBoolean SetAlerting (const PString &calleeName, PBoolean withMedia)
virtual PBoolean SetConnected ()
virtual OpalMediaStreamCreateMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, PBoolean isSource)
virtual OpalMediaStreamPtr OpenMediaStream (const OpalMediaFormat &mediaFormat, unsigned sessionID, bool isSource)
virtual PBoolean SendUserInputString (const PString &value)
New operations
virtual void AlertingIncoming ()
virtual void AcceptIncoming ()
Member variable access
void * GetUserData () const
 Get user data pointer.
void SetUserData (void *v)
 Set user data pointer.

Protected Attributes

OpalLocalEndPointendpoint
void * userData

Detailed Description

Local connection. This class represents a connection on the local machine that can receive media via virtual functions.


Constructor & Destructor Documentation

OpalLocalConnection::OpalLocalConnection ( OpalCall call,
OpalLocalEndPoint endpoint,
void *  userData,
unsigned  options,
OpalConnection::StringOptions stringOptions,
char  tokenPrefix = 'L' 
)

Create a new connection.

Parameters:
call  Owner call for connection
endpoint  Owner endpoint for connection
userData  Arbitrary data to pass to connection

OpalLocalConnection::~OpalLocalConnection (  ) 

Destroy connection.


Member Function Documentation

virtual void OpalLocalConnection::AcceptIncoming (  )  [virtual]

Accept the incoming connection.

virtual void OpalLocalConnection::AlertingIncoming (  )  [virtual]

Indicate alerting for the incoming connection.

virtual OpalMediaStream* OpalLocalConnection::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.

Reimplemented in OpalIVRConnection, and OpalMixerConnection.

void* OpalLocalConnection::GetUserData (  )  const [inline]

Get user data pointer.

virtual PBoolean OpalLocalConnection::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.

Reimplemented in OpalIVRConnection.

virtual OpalMediaStreamPtr OpalLocalConnection::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 OpalLocalConnection::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.

Reimplemented in OpalIVRConnection.

virtual PBoolean OpalLocalConnection::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 OpalLocalConnection::SetConnected (  )  [virtual]

Indicate to remote endpoint we are connected.

The default behaviour sets the phase to ConnectedPhase, sets the connection start time and then checks if there is any media channels opened and if so, moves on to the established phase, calling OnEstablished().

In other words, this method is used to handle incoming calls, and is an indication that we have accepted the incoming call.

Reimplemented from OpalConnection.

virtual PBoolean OpalLocalConnection::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.

void OpalLocalConnection::SetUserData ( void *  v  )  [inline]

Set user data pointer.


Field Documentation

OpalLocalEndPoint& OpalLocalConnection::endpoint [protected]

Reimplemented from OpalConnection.

Reimplemented in OpalIVRConnection.

void* OpalLocalConnection::userData [protected]


The documentation for this class was generated from the following file:
Generated on Mon Feb 21 20:19:23 2011 for OPAL by  doxygen 1.4.7