|
OPAL
Version 3.10.10
|
#include <pcss.h>
Public Member Functions | |
Construction | |
| OpalPCSSEndPoint (OpalManager &manager, const char *prefix="pc") | |
| ~OpalPCSSEndPoint () | |
Overrides from OpalEndPoint | |
| virtual PSafePtr< OpalConnection > | MakeConnection (OpalCall &call, const PString &party, void *userData=NULL, unsigned 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 OpalPCSSConnection * | CreateConnection (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< OpalPCSSConnection > | GetPCSSConnectionWithLock (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, const OpalConnection::CallEndReason &reason=OpalConnection::EndedByAnswerDenied) |
| 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) |
Public Member Functions inherited from OpalLocalEndPoint | |
| OpalLocalEndPoint (OpalManager &manager, const char *prefix="local") | |
| ~OpalLocalEndPoint () | |
| virtual OpalMediaFormatList | GetMediaFormats () const |
| virtual PSafePtr< OpalConnection > | MakeConnection (OpalCall &call, const PString &party, void *userData=NULL, unsigned int options=0, OpalConnection::StringOptions *stringOptions=NULL) |
| PSafePtr< OpalLocalConnection > | GetLocalConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite) |
| virtual OpalLocalConnection * | CreateConnection (OpalCall &call, void *userData, unsigned options, OpalConnection::StringOptions *stringOptions) |
| virtual bool | OnOutgoingSetUp (const OpalLocalConnection &connection) |
| virtual bool | AlertingIncomingCall (const PString &token, OpalConnection::StringOptions *options=NULL) |
| virtual bool | AcceptIncomingCall (const PString &token, OpalConnection::StringOptions *options=NULL) |
| virtual bool | RejectIncomingCall (const PString &token, const OpalConnection::CallEndReason &reason=OpalConnection::EndedByAnswerDenied) |
| virtual bool | OnReadMediaFrame (const OpalLocalConnection &connection, const OpalMediaStream &mediaStream, RTP_DataFrame &frame) |
| virtual bool | OnWriteMediaFrame (const OpalLocalConnection &connection, const OpalMediaStream &mediaStream, RTP_DataFrame &frame) |
| virtual bool | OnReadMediaData (const OpalLocalConnection &connection, const OpalMediaStream &mediaStream, void *data, PINDEX size, PINDEX &length) |
| virtual bool | OnWriteMediaData (const OpalLocalConnection &connection, const OpalMediaStream &mediaStream, const void *data, PINDEX length, PINDEX &written) |
| virtual Synchronicity | GetSynchronicity (const OpalMediaFormat &mediaFormat, bool isSource) const |
| Synchronicity | GetDefaultAudioSynchronicity () const |
| void | SetDefaultAudioSynchronicity (Synchronicity sync) |
| Synchronicity | GetDefaultVideoSourceSynchronicity () const |
| void | SetDefaultVideoSourceSynchronicity (Synchronicity sync) |
| bool | IsDeferredAlerting () const |
| void | SetDeferredAlerting (bool defer) |
| bool | IsDeferredAnswer () const |
| void | SetDeferredAnswer (bool defer) |
Public Member Functions inherited from OpalEndPoint | |
| OpalEndPoint (OpalManager &manager, const PCaselessString &prefix, unsigned attributes) | |
| ~OpalEndPoint () | |
| virtual void | ShutDown () |
| void | PrintOn (ostream &strm) const |
| PBoolean | StartListeners (const PStringArray &interfaces) |
| PBoolean | StartListener (const OpalTransportAddress &iface) |
| PBoolean | StartListener (OpalListener *listener) |
| virtual PStringArray | GetDefaultListeners () const |
| virtual PString | GetDefaultTransport () const |
| OpalListener * | FindListener (const OpalTransportAddress &iface) |
| bool | FindListenerForProtocol (const char *proto, OpalTransportAddress &addr) |
| PBoolean | StopListener (const OpalTransportAddress &iface) |
| PBoolean | RemoveListener (OpalListener *listener) |
| OpalTransportAddressArray | GetInterfaceAddresses (PBoolean excludeLocalHost=true, const OpalTransport *associatedTransport=NULL) |
| PDECLARE_NOTIFIER (PThread, OpalEndPoint, ListenerCallback) | |
| virtual PBoolean | NewIncomingConnection (OpalTransport *transport) |
| virtual void | OnNewConnection (OpalCall &call, OpalConnection &connection) |
| virtual PBoolean | OnSetUpConnection (OpalConnection &connection) |
| virtual PBoolean | OnIncomingConnection (OpalConnection &connection, unsigned options, OpalConnection::StringOptions *stringOptions) |
| virtual void | OnProceeding (OpalConnection &connection) |
| virtual void | OnAlerting (OpalConnection &connection) |
| virtual OpalConnection::AnswerCallResponse | OnAnswerCall (OpalConnection &connection, const PString &caller) |
| virtual void | OnConnected (OpalConnection &connection) |
| virtual void | OnEstablished (OpalConnection &connection) |
| virtual void | OnReleased (OpalConnection &connection) |
| virtual void | OnHold (OpalConnection &connection, bool fromRemote, bool onHold) |
| virtual void | OnHold (OpalConnection &connection) |
| virtual PBoolean | OnForwarded (OpalConnection &connection, const PString &remoteParty) |
| virtual bool | OnTransferNotify (OpalConnection &connection, const PStringToString &info) |
| virtual PBoolean | ClearCall (const PString &token, OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PSyncPoint *sync=NULL) |
| virtual PBoolean | ClearCallSynchronous (const PString &token, OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PSyncPoint *sync=NULL) |
| virtual void | ClearAllCalls (OpalConnection::CallEndReason reason=OpalConnection::EndedByLocalUser, PBoolean wait=true) |
| PSafePtr< OpalConnection > | GetConnectionWithLock (const PString &token, PSafetyMode mode=PSafeReadWrite) |
| template<class ConnClass > | |
| PSafePtr< ConnClass > | GetConnectionWithLockAs (const PString &token, PSafetyMode mode=PSafeReadWrite) |
| PStringList | GetAllConnections () |
| PINDEX | GetConnectionCount () const |
| virtual PBoolean | HasConnection (const PString &token) |
| virtual void | DestroyConnection (OpalConnection *connection) |
| virtual void | AdjustMediaFormats (bool local, const OpalConnection &connection, OpalMediaFormatList &mediaFormats) const |
| virtual PBoolean | OnOpenMediaStream (OpalConnection &connection, OpalMediaStream &stream) |
| virtual void | OnClosedMediaStream (const OpalMediaStream &stream) |
| virtual PBoolean | CreateVideoInputDevice (const OpalConnection &connection, const OpalMediaFormat &mediaFormat, PVideoInputDevice *&device, PBoolean &autoDelete) |
| virtual PBoolean | CreateVideoOutputDevice (const OpalConnection &connection, const OpalMediaFormat &mediaFormat, PBoolean preview, PVideoOutputDevice *&device, PBoolean &autoDelete) |
| virtual void | OnUserInputString (OpalConnection &connection, const PString &value) |
| virtual void | OnUserInputTone (OpalConnection &connection, char tone, int duration) |
| virtual PString | ReadUserInput (OpalConnection &connection, const char *terminators="#\", unsigned lastDigitTimeout=4, unsigned firstDigitTimeout=30) |
| virtual PBoolean | Message (const PString &to, const PString &body) |
| virtual PBoolean | Message (const PURL &to, const PString &type, const PString &body, PURL &from, PString &conversationId) |
| virtual PBoolean | Message (OpalIM &Message) |
| virtual void | OnMessageReceived (const OpalIM &message) |
| virtual void | OnMWIReceived (const PString &party, OpalManager::MessageWaitingType type, const PString &extraInfo) |
| virtual PBoolean | GarbageCollection () |
| OpalManager & | GetManager () const |
| const PString & | GetPrefixName () const |
| PBoolean | HasAttribute (Attributes opt) const |
| WORD | GetDefaultSignalPort () const |
| const OpalProductInfo & | GetProductInfo () const |
| void | SetProductInfo (const OpalProductInfo &info) |
| const PString & | GetDefaultLocalPartyName () const |
| virtual void | SetDefaultLocalPartyName (const PString &name) |
| const PString & | GetDefaultDisplayName () const |
| void | SetDefaultDisplayName (const PString &name) |
| unsigned | GetInitialBandwidth () const |
| void | SetInitialBandwidth (unsigned bandwidth) |
| const OpalListenerList & | GetListeners () const |
| const OpalConnection::StringOptions & | GetDefaultStringOptions () const |
| void | SetDefaultStringOptions (const OpalConnection::StringOptions &opts) |
| void | SetDefaultStringOption (const PCaselessString &key, const PString &data) |
| OpalConnection::SendUserInputModes | GetSendUserInputMode () const |
| void | SetSendUserInputMode (OpalConnection::SendUserInputModes mode) |
Protected Attributes | |
| PString | soundChannelPlayDevice |
| PString | soundChannelRecordDevice |
| unsigned | soundChannelBuffers |
| unsigned | m_soundChannelBufferTime |
Protected Attributes inherited from OpalLocalEndPoint | |
| bool | m_deferredAlerting |
| bool | m_deferredAnswer |
| Synchronicity | m_defaultAudioSynchronicity |
| Synchronicity | m_defaultVideoSourceSynchronicity |
Protected Attributes inherited from OpalEndPoint | |
| OpalManager & | manager |
| PCaselessString | prefixName |
| unsigned | attributeBits |
| WORD | defaultSignalPort |
| PINDEX | m_maxSizeUDP |
| OpalProductInfo | productInfo |
| PString | defaultLocalPartyName |
| PString | defaultDisplayName |
| unsigned | initialBandwidth |
| OpalConnection::StringOptions | m_defaultStringOptions |
| OpalConnection::SendUserInputModes | defaultSendUserInputMode |
| OpalListenerList | listeners |
| OpalEndPoint::ConnectionDict | connectionsActive |
| PMutex | inUseFlag |
Additional Inherited Members | |
Public Types inherited from OpalLocalEndPoint | |
| enum | Synchronicity { e_Synchronous, e_Asynchronous, e_SimulateSyncronous } |
Public Types inherited from OpalEndPoint | |
| enum | Attributes { CanTerminateCall = 1, SupportsE164 = 2 } |
Protected Member Functions inherited from OpalEndPoint | |
| OpalConnection * | AddConnection (OpalConnection *connection) |
PC Sound System endpoint.
| 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 |
Accept the incoming connection. Returns false if the connection token does not correspond to a valid connection.
| connectionToken | Token of connection to accept call |
Referenced by GetPCSSConnectionWithLock().
|
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 |
| options | Option bit map to be passed to connection |
| stringOptions | Options to be passed to connection |
|
virtual |
Create an PSoundChannel based media stream.
| connection | Connection needing created sound channel |
| mediaFormat | Media format for the connection |
| isSource | Direction for channel |
|
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.
| token | Token to identify connection |
| mode | Lock mode |
References AcceptIncomingConnection(), OpalConnection::EndedByAnswerDenied, OnShowIncoming(), OnShowOutgoing(), OnShowUserInput(), RejectIncomingConnection(), and SetSoundChannelPlayDevice().
|
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 SetSoundChannelBufferDepth(), and soundChannelBuffers.
|
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, and SetSoundChannelBufferTime().
|
inline |
Get the name for the sound channel to be used for output. This defaults to the value of the PSoundChannel::GetDefaultDevice() function.
References SetSoundChannelRecordDevice(), and soundChannelPlayDevice.
|
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 |
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 |
| options | Option bit map to be passed to connection |
| stringOptions | Options to be passed to connection |
|
virtual |
Call back to indicate that there is an incoming call. Note this function should not block or it will impede the operation of the stack.
The default implementation returns true;
| connection | Connection having event |
Reimplemented from OpalLocalEndPoint.
|
virtual |
Call back to indicate that remote is ringing. If false is returned the call is aborted.
The default implementation does nothing.
| connection | Connection having event |
Reimplemented from OpalLocalEndPoint.
|
pure virtual |
Call back to indicate that there is an incoming call. Note this function should not block or it will impede the operation of the stack.
The default implementation is pure.
| connection | Connection having event |
Referenced by GetPCSSConnectionWithLock().
|
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 |
Referenced by GetPCSSConnectionWithLock().
|
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 |
| indication | Received user input indications |
Referenced by GetPCSSConnectionWithLock().
|
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 |
| indication | Received user input indications |
Reimplemented from OpalLocalEndPoint.
|
virtual |
Reject the incoming connection. Returns false if the connection token does not correspond to a valid connection.
| connectionToken | Token of connection to accept call |
| reason | Reason for rejecting the call |
Referenced by GetPCSSConnectionWithLock().
| 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.
| depth | New depth |
Referenced by GetSoundChannelBufferDepth().
| 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.
| depth | New depth in milliseconds |
Referenced by GetSoundChannelBufferTime().
|
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.
Referenced by GetPCSSConnectionWithLock().
|
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.
Referenced by GetSoundChannelPlayDevice().
|
protected |
Referenced by GetSoundChannelBufferTime(), and OpalPCSSConnection::GetSoundChannelBufferTime().
|
protected |
Referenced by GetSoundChannelBufferDepth(), and OpalPCSSConnection::GetSoundChannelBufferDepth().
|
protected |
Referenced by GetSoundChannelPlayDevice(), and OpalPCSSConnection::GetSoundChannelPlayDevice().
|
protected |
Referenced by GetSoundChannelRecordDevice(), and OpalPCSSConnection::GetSoundChannelRecordDevice().