public class OperationSetBasicTelephonyGibberishImpl extends AbstractOperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl> implements CallChangeListener
HANGUP_REASON_BUSY_HERE, HANGUP_REASON_ENCRYPTION_REQUIRED, HANGUP_REASON_NORMAL_CLEARING, HANGUP_REASON_TIMEOUT, MAX_AUDIO_PORT_NUMBER_PROPERTY_NAME, MAX_DATA_CHANNEL_PORT_NUMBER_PROPERTY_NAME, MAX_MEDIA_PORT_NUMBER_PROPERTY_NAME, MAX_VIDEO_PORT_NUMBER_PROPERTY_NAME, MIN_AUDIO_PORT_NUMBER_PROPERTY_NAME, MIN_DATA_CHANNEL_PORT_NUMBER_PROPERTY_NAME, MIN_MEDIA_PORT_NUMBER_PROPERTY_NAME, MIN_VIDEO_PORT_NUMBER_PROPERTY_NAME
Constructor and Description |
---|
OperationSetBasicTelephonyGibberishImpl(ProtocolProviderServiceGibberishImpl protocolProvider)
Creates an instance of OperationSetBasicTelephonyGibberishImpl
by specifying the corresponding protocolProvider
|
Modifier and Type | Method and Description |
---|---|
void |
answerCallPeer(CallPeer peer)
Indicates a user request to answer an incoming call from the specified
CallPeer.
|
void |
callPeerAdded(CallPeerEvent evt)
Indicates that a new call peer has joined the source call.
|
void |
callPeerRemoved(CallPeerEvent evt)
Indicates that a call peer has left the source call.
|
void |
callStateChanged(CallChangeEvent evt)
Indicates that a change has occurred in the state of the source call.
|
Call |
createCall(java.lang.String callee,
CallConference conference)
Creates a new Call and invites a specific CallPeer to
it given by her String URI.
|
java.util.Iterator<Call> |
getActiveCalls()
Returns an iterator over all currently active calls.
|
ProtocolProviderServiceGibberishImpl |
getProtocolProvider()
Returns the protocol provider that this operation set belongs to.
|
void |
hangupCallPeer(CallPeer peer)
Indicates a user request to end a call with the specified call
particiapnt.
|
void |
hangupCallPeer(CallPeer peer,
int reasonCode,
java.lang.String reason)
Ends the call with the specified peer.
|
void |
putOffHold(CallPeer peer)
Resumes communication with a call peer previously put on hold.
|
void |
putOnHold(CallPeer peer)
Puts the specified CallPeer "on hold".
|
void |
setMute(CallPeer peer,
boolean mute)
Sets the mute state of the audio stream being sent to a specific
CallPeer.
|
addCallListener, createCall, createCall, createCall, createCall, createRecorder, fireCallEvent, fireCallEvent, fireCallEvent, removeCallListener, setMute
public OperationSetBasicTelephonyGibberishImpl(ProtocolProviderServiceGibberishImpl protocolProvider)
protocolProvider
- the protocol provider, where this operation set
is registeredpublic void answerCallPeer(CallPeer peer) throws OperationFailedException
answerCallPeer
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
peer
- the call peer that we'd like to answer.OperationFailedException
- with the corresponding code if we
encounter an error while performing this operation.public Call createCall(java.lang.String callee, CallConference conference) throws OperationFailedException
createCall
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
callee
- the address of the callee who we should invite to a new
Callconference
- the CallConference in which the newly-created
Call is to participateOperationFailedException
- with the corresponding code if we fail
to create the callpublic java.util.Iterator<Call> getActiveCalls()
getActiveCalls
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
public void hangupCallPeer(CallPeer peer) throws OperationFailedException
hangupCallPeer
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
peer
- the peer that we'd like to hang up on.OperationFailedException
- with the corresponding code if we
encounter an error while performing this operation.public void hangupCallPeer(CallPeer peer, int reasonCode, java.lang.String reason) throws OperationFailedException
hangupCallPeer
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
peer
- the peer that we'd like to hang up on.reasonCode
- indicates if the hangup is following to a call failure or
simply a disconnect indicate by the reason.reason
- the reason of the hangup. If the hangup is due to a call
failure, then this string could indicate the reason of the failureOperationFailedException
- if we fail to terminate the call.public void putOffHold(CallPeer peer) throws OperationFailedException
putOffHold
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
peer
- the call peer to put on hold.OperationFailedException
- if we encounter an error while
performing this operationpublic void putOnHold(CallPeer peer) throws OperationFailedException
putOnHold
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
peer
- the peer that we'd like to put on hold.OperationFailedException
- with the corresponding code if we
encounter an error while performing this operation.public void callPeerAdded(CallPeerEvent evt)
CallChangeListener
callPeerAdded
in interface CallChangeListener
evt
- the CallPeerEvent containing the source call
and call peer.public void callPeerRemoved(CallPeerEvent evt)
CallChangeListener
callPeerRemoved
in interface CallChangeListener
evt
- the CallPeerEvent containing the source call
and call peer.public void callStateChanged(CallChangeEvent evt)
CallChangeListener
callStateChanged
in interface CallChangeListener
evt
- the CallChangeEvent instance containing the source
calls and its old and new state.public void setMute(CallPeer peer, boolean mute)
The implementation sends silence through the audio stream.
peer
- the CallPeer who receives the audio
stream to have its mute state setmute
- true to mute the audio stream being sent to
peer; otherwise, falsepublic ProtocolProviderServiceGibberishImpl getProtocolProvider()
getProtocolProvider
in interface OperationSetBasicTelephony<ProtocolProviderServiceGibberishImpl>
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.