Renames CallParticipant to CallPeer so that it would better reflect our new Call architecture that also includes conferencing and ConferenceMembers

cusax-fix
Emil Ivov 16 years ago
parent 2cd08f0a85
commit 4884f5a92b

@ -846,7 +846,7 @@ public void callEnded(CallEvent event)
* Adding a record for joining participant
* @param callParticipant CallParticipant
*/
private void handleParticipantAdded(CallParticipant callParticipant)
private void handleParticipantAdded(CallPeer callParticipant)
{
CallRecord callRecord = findCallRecord(callParticipant.getCall());
@ -854,9 +854,9 @@ private void handleParticipantAdded(CallParticipant callParticipant)
if(callRecord == null)
return;
callParticipant.addCallParticipantListener(new CallParticipantAdapter()
callParticipant.addCallParticipantListener(new CallPeerAdapter()
{
public void participantStateChanged(CallParticipantChangeEvent evt)
public void participantStateChanged(CallPeerChangeEvent evt)
{
if(evt.getNewValue().equals(CallParticipantState.DISCONNECTED))
return;
@ -899,7 +899,7 @@ public void participantStateChanged(CallParticipantChangeEvent evt)
* @param callParticipant CallParticipant
* @param srcCall Call
*/
private void handleParticipantRemoved(CallParticipant callParticipant,
private void handleParticipantRemoved(CallPeer callParticipant,
Call srcCall)
{
CallRecord callRecord = findCallRecord(srcCall);
@ -947,7 +947,7 @@ private CallRecordImpl findCallRecord(Call call)
* @return CallParticipantRecordImpl the corresponding record
*/
private CallParticipantRecordImpl findParticipantRecord(
CallParticipant callParticipant)
CallPeer callParticipant)
{
CallRecord record = findCallRecord(callParticipant.getCall());
@ -980,7 +980,7 @@ private void handleNewCall(Call sourceCall, String direction)
currentCallRecords.add(newRecord);
// if has already perticipants Dispatch them
Iterator<CallParticipant> iter = sourceCall.getCallParticipants();
Iterator<CallPeer> iter = sourceCall.getCallParticipants();
while (iter.hasNext())
{
handleParticipantAdded(iter.next());

@ -201,8 +201,8 @@ protected void close(boolean isEscaped)
private DialpadDialog getDialpadDialog()
{
Call call = callPanel.getCall();
Iterator<CallParticipant> callParticipants =
(call == null) ? new Vector<CallParticipant>().iterator()
Iterator<CallPeer> callParticipants =
(call == null) ? new Vector<CallPeer>().iterator()
: callPanel.getCall().getCallParticipants();
return new DialpadDialog(callParticipants);

@ -295,11 +295,11 @@ public AnswerCallThread(Call call)
public void run()
{
ProtocolProviderService pps = call.getProtocolProvider();
Iterator<CallParticipant> participants = call.getCallParticipants();
Iterator<CallPeer> participants = call.getCallParticipants();
while (participants.hasNext())
{
CallParticipant participant = participants.next();
CallPeer participant = participants.next();
OperationSetBasicTelephony telephony =
(OperationSetBasicTelephony) pps
.getOperationSet(OperationSetBasicTelephony.class);
@ -333,11 +333,11 @@ public HangupCallThread(Call call)
public void run()
{
ProtocolProviderService pps = call.getProtocolProvider();
Iterator<CallParticipant> participants = call.getCallParticipants();
Iterator<CallPeer> participants = call.getCallParticipants();
while (participants.hasNext())
{
CallParticipant participant = participants.next();
CallPeer participant = participants.next();
OperationSetBasicTelephony telephony =
(OperationSetBasicTelephony) pps
.getOperationSet(OperationSetBasicTelephony.class);

@ -31,15 +31,15 @@
public class CallPanel
extends TransparentPanel
implements CallChangeListener,
CallParticipantListener,
CallPeerListener,
PropertyChangeListener,
CallParticipantSecurityListener
{
private final TransparentPanel mainPanel = new TransparentPanel();
private final Hashtable<CallParticipant, CallParticipantPanel>
private final Hashtable<CallPeer, CallParticipantPanel>
participantsPanels =
new Hashtable<CallParticipant, CallParticipantPanel>();
new Hashtable<CallPeer, CallParticipantPanel>();
private String title;
@ -70,7 +70,7 @@ public CallPanel(CallDialog callDialog, Call call, String callType)
if (contactsCount > 0)
{
CallParticipant participant =
CallPeer participant =
call.getCallParticipants().next();
this.title = participant.getDisplayName();
@ -86,7 +86,7 @@ public CallPanel(CallDialog callDialog, Call call, String callType)
* @param callType the type of call - INCOMING of OUTGOING
*/
private CallParticipantPanel addCallParticipant(
CallParticipant participant, String callType)
CallPeer participant, String callType)
{
CallParticipantPanel participantPanel =
getParticipantPanel(participant);
@ -152,7 +152,7 @@ public void callParticipantRemoved(CallParticipantEvent evt)
{
if (evt.getSourceCall() == call)
{
CallParticipant participant = evt.getSourceCallParticipant();
CallPeer participant = evt.getSourceCallParticipant();
CallParticipantPanel participantPanel =
getParticipantPanel(participant);
@ -189,9 +189,9 @@ public void callStateChanged(CallChangeEvent evt)
* Implements the CallParicipantChangeListener.participantStateChanged
* method.
*/
public void participantStateChanged(CallParticipantChangeEvent evt)
public void participantStateChanged(CallPeerChangeEvent evt)
{
CallParticipant sourceParticipant = evt.getSourceCallParticipant();
CallPeer sourceParticipant = evt.getSourceCallParticipant();
if (sourceParticipant.getCall() != call)
return;
@ -258,22 +258,22 @@ else if (CallParticipantState.isOnHold((CallParticipantState) newState))
participantPanel.setState(newStateString, newStateIcon);
}
public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
public void participantDisplayNameChanged(CallPeerChangeEvent evt)
{
}
public void participantAddressChanged(CallParticipantChangeEvent evt)
public void participantAddressChanged(CallPeerChangeEvent evt)
{
}
public void participantImageChanged(CallParticipantChangeEvent evt)
public void participantImageChanged(CallPeerChangeEvent evt)
{
}
public void securityOn(CallParticipantSecurityOnEvent securityEvent)
{
CallParticipant participant =
(CallParticipant) securityEvent.getSource();
CallPeer participant =
(CallPeer) securityEvent.getSource();
CallParticipantPanel participantPanel =
getParticipantPanel(participant);
@ -298,8 +298,8 @@ public void securityOn(CallParticipantSecurityOnEvent securityEvent)
public void securityOff(CallParticipantSecurityOffEvent securityEvent)
{
CallParticipant participant =
(CallParticipant) securityEvent.getSource();
CallPeer participant =
(CallPeer) securityEvent.getSource();
CallParticipantPanel participantPanel =
getParticipantPanel(participant);
@ -343,11 +343,11 @@ private void setCall(Call call, String callType)
this.mainPanel.removeAll();
this.participantsPanels.clear();
Iterator<CallParticipant> participants = call.getCallParticipants();
Iterator<CallPeer> participants = call.getCallParticipants();
while (participants.hasNext())
{
CallParticipant participant = participants.next();
CallPeer participant = participants.next();
participant.addCallParticipantListener(this);
participant.addCallParticipantSecurityListener(this);
@ -366,7 +366,7 @@ private void setCall(Call call, String callType)
* address.
*/
public void participantTransportAddressChanged(
CallParticipantChangeEvent evt)
CallPeerChangeEvent evt)
{
/** @todo implement participantTransportAddressChanged() */
}
@ -377,9 +377,9 @@ public void participantTransportAddressChanged(
private class RemoveParticipantPanelListener
implements ActionListener
{
private CallParticipant participant;
private CallPeer participant;
public RemoveParticipantPanelListener(CallParticipant participant)
public RemoveParticipantPanelListener(CallPeer participant)
{
this.participant = participant;
}
@ -425,12 +425,12 @@ public int getParticipantCount()
* @return the <tt>CallParticipantPanel</tt>, which correspond to the given
* participant
*/
public CallParticipantPanel getParticipantPanel(CallParticipant participant)
public CallParticipantPanel getParticipantPanel(CallPeer participant)
{
for (Map.Entry<CallParticipant, CallParticipantPanel> participantEntry :
for (Map.Entry<CallPeer, CallParticipantPanel> participantEntry :
participantsPanels.entrySet())
{
CallParticipant entryParticipant = participantEntry.getKey();
CallPeer entryParticipant = participantEntry.getKey();
if ((entryParticipant != null)
&& entryParticipant.equals(participant))
@ -484,12 +484,12 @@ public void propertyChange(PropertyChangeEvent evt)
{
String propertyName = evt.getPropertyName();
if (propertyName.equals(CallParticipant.MUTE_PROPERTY_NAME))
if (propertyName.equals(CallPeer.MUTE_PROPERTY_NAME))
{
boolean isMute = (Boolean) evt.getNewValue();
CallParticipant sourceParticipant
= (CallParticipant) evt.getSource();
CallPeer sourceParticipant
= (CallPeer) evt.getSource();
if (sourceParticipant.getCall() != call)
return;

@ -56,7 +56,7 @@ public class CallParticipantPanel
private final String participantName;
private final CallParticipant callParticipant;
private final CallPeer callParticipant;
private final java.util.List<Container> videoContainers =
new ArrayList<Container>();
@ -89,7 +89,7 @@ public class CallParticipantPanel
* @param callParticipant a call participant
*/
public CallParticipantPanel(CallDialog callDialog,
CallParticipant callParticipant)
CallPeer callParticipant)
{
this.callDialog = callDialog;
this.callParticipant = callParticipant;

@ -49,8 +49,8 @@ public class DialPanel
GuiActivator.getResources()
.getSettingsInt("impl.gui.DIAL_PAD_VERTICAL_GAP")));
private final java.util.List<CallParticipant> callParticipantsList =
new LinkedList<CallParticipant>();
private final java.util.List<CallPeer> callParticipantsList =
new LinkedList<CallPeer>();
private MainCallPanel parentCallPanel;
@ -74,7 +74,7 @@ public DialPanel(MainCallPanel parentCallPanel)
* @param callParticipants the <tt>CallParticipant</tt>s, for which the
* dialpad will be opened.
*/
public DialPanel(Iterator<CallParticipant> callParticipants)
public DialPanel(Iterator<CallPeer> callParticipants)
{
// We need to send DTMF tones to all participants each time the user
// presses a dial button, so we put the iterator into a list.
@ -409,14 +409,14 @@ public void actionPerformed(ActionEvent e)
*/
private void sendDtmfTone(DTMFTone dtmfTone)
{
Iterator<CallParticipant> callParticipants
Iterator<CallPeer> callParticipants
= this.callParticipantsList.iterator();
try
{
while (callParticipants.hasNext())
{
CallParticipant participant
CallPeer participant
= callParticipants.next();
if (participant.getProtocolProvider()

@ -31,7 +31,7 @@ public class DialpadDialog
*
* @param callParticipants The corresponding call participants.
*/
public DialpadDialog(Iterator<CallParticipant> callParticipants)
public DialpadDialog(Iterator<CallPeer> callParticipants)
{
this.setModal(false);

@ -122,12 +122,12 @@ public void actionPerformed(ActionEvent evt)
(OperationSetBasicTelephony) call.getProtocolProvider()
.getOperationSet(OperationSetBasicTelephony.class);
Iterator<CallParticipant> participants
Iterator<CallPeer> participants
= call.getCallParticipants();
while (participants.hasNext())
{
CallParticipant callParticipant = participants.next();
CallPeer callParticipant = participants.next();
try
{

@ -112,12 +112,12 @@ public void actionPerformed(ActionEvent evt)
{
if (call != null)
{
Iterator<CallParticipant> participants
Iterator<CallPeer> participants
= call.getCallParticipants();
while (participants.hasNext())
{
CallParticipant callParticipant = participants.next();
CallPeer callParticipant = participants.next();
OperationSetBasicTelephony telephony
= (OperationSetBasicTelephony) call.getProtocolProvider()

@ -121,7 +121,7 @@ private void initComponents()
*/
private void initCallLabel(JLabel callLabel)
{
Iterator<CallParticipant> participantsIter
Iterator<CallPeer> participantsIter
= incomingCall.getCallParticipants();
boolean hasMoreParticipants = false;
@ -133,7 +133,7 @@ private void initCallLabel(JLabel callLabel)
while (participantsIter.hasNext())
{
CallParticipant participant = participantsIter.next();
CallPeer participant = participantsIter.next();
// More participants.
if (participantsIter.hasNext())
@ -192,7 +192,7 @@ else if (buttonName.equals(HANGUP_BUTTON))
* image.
* @return the participant image.
*/
private ImageIcon getParticipantImage(CallParticipant participant)
private ImageIcon getParticipantImage(CallPeer participant)
{
ImageIcon icon = null;
// We search for a contact corresponding to this call participant and

@ -19,7 +19,7 @@
public class SecurityPanel
extends TransparentPanel
{
private final CallParticipant participant;
private final CallPeer participant;
private final Image iconEncr;
private final Image iconEncrVerified;
@ -30,7 +30,7 @@ public class SecurityPanel
private final JLabel securityStringLabel = new JLabel();
public SecurityPanel(CallParticipant participant)
public SecurityPanel(CallPeer participant)
{
this.participant = participant;

@ -35,7 +35,7 @@ public class TransferCallButton
* The <code>CallParticipant</code> (whose <code>Call</code> is) to be
* transfered.
*/
private final CallParticipant callParticipant;
private final CallPeer callParticipant;
/**
* Initializes a new <code>TransferCallButton</code> instance which is to
@ -45,7 +45,7 @@ public class TransferCallButton
* @param callParticipant the <code>CallParticipant</code> to be associated
* with the new instance and to be transfered
*/
public TransferCallButton(CallParticipant callParticipant)
public TransferCallButton(CallPeer callParticipant)
{
super(ImageLoader.getImage(ImageLoader.TRANSFER_CALL_BUTTON));
@ -137,7 +137,7 @@ public void callStateChanged(CallChangeEvent evt)
{
try
{
CallParticipant targetParticipant =
CallPeer targetParticipant =
findCallParticipant(target);
if (targetParticipant == null)
@ -170,17 +170,17 @@ public void callStateChanged(CallChangeEvent evt)
* @param address the address to locate the associated
* <code>CallParticipant</code> of
*/
private CallParticipant findCallParticipant(
private CallPeer findCallParticipant(
OperationSetBasicTelephony telephony, String address)
{
for (Iterator<Call> callIter = telephony.getActiveCalls(); callIter.hasNext();)
{
Call call = callIter.next();
for (Iterator<CallParticipant> participantIter =
for (Iterator<CallPeer> participantIter =
call.getCallParticipants(); participantIter.hasNext();)
{
CallParticipant participant = participantIter.next();
CallPeer participant = participantIter.next();
if (address.equals(participant.getAddress()))
{
@ -200,7 +200,7 @@ private CallParticipant findCallParticipant(
* @return the first <code>CallParticipant</code> among all existing ones
* who has the specified <code>address</code>
*/
private CallParticipant findCallParticipant(String address)
private CallPeer findCallParticipant(String address)
throws OperationFailedException
{
BundleContext bundleContext = GuiActivator.bundleContext;
@ -221,7 +221,7 @@ private CallParticipant findCallParticipant(String address)
Class<OperationSetBasicTelephony> telephonyClass
= OperationSetBasicTelephony.class;
CallParticipant participant = null;
CallPeer participant = null;
for (ServiceReference serviceReference : serviceReferences)
{

@ -1148,14 +1148,14 @@ private void putOnHold(RTPManager rtpManager, boolean on)
* @throws ParseException if sdpAnswerStr does not contain a valid sdp
* String.
*/
public void processSdpAnswer(CallParticipant responder,
public void processSdpAnswer(CallPeer responder,
String sdpAnswerStr)
throws MediaException, ParseException
{
processSdpStr(responder, sdpAnswerStr, true);
}
private String processSdpStr(CallParticipant participant,
private String processSdpStr(CallPeer participant,
String sdpStr,
boolean answer)
throws MediaException, ParseException
@ -1291,7 +1291,7 @@ private String processSdpStr(CallParticipant participant,
* @throws ParseException if <tt>sdpOfferStr</tt> does not contain a valid
* sdp string.
*/
public String processSdpOffer(CallParticipant offerer, String sdpOfferStr)
public String processSdpOffer(CallPeer offerer, String sdpOfferStr)
throws MediaException, ParseException
{
return processSdpStr(offerer, sdpOfferStr, false);

@ -46,7 +46,7 @@ public class SecurityEventManager extends ZrtpUserCallback
.getResources().getI18NString(
"impl.media.security.WARNING_NO_EXPECTED_RS_MATCH");
private CallParticipant callParticipant;
private CallPeer callParticipant;
private final CallSession callSession;
@ -90,7 +90,7 @@ public SecurityEventManager(CallSession callSession)
// At this moment we're supporting a security call between only two
// participants. In the future the call participant would be passed
// as a parameter to the SecurityEventManager.
Iterator<CallParticipant> callParticipants
Iterator<CallPeer> callParticipants
= callSession.getCall().getCallParticipants();
while (callParticipants.hasNext())

@ -314,10 +314,10 @@ private void putOnHold(Call call)
if (telephony != null)
{
for (Iterator<CallParticipant> participantIter =
for (Iterator<CallPeer> participantIter =
call.getCallParticipants(); participantIter.hasNext();)
{
CallParticipant participant = participantIter.next();
CallPeer participant = participantIter.next();
CallParticipantState participantState = participant.getState();
if (!CallParticipantState.DISCONNECTED.equals(participantState)

@ -24,7 +24,7 @@
*/
public class CallJabberImpl
extends Call
implements CallParticipantListener
implements CallPeerListener
{
/**
* Logger of this class
@ -120,7 +120,7 @@ public int getCallParticipantsCount()
*
* @param evt unused.
*/
public void participantImageChanged(CallParticipantChangeEvent evt)
public void participantImageChanged(CallPeerChangeEvent evt)
{}
/**
@ -129,7 +129,7 @@ public void participantImageChanged(CallParticipantChangeEvent evt)
*
* @param evt unused.
*/
public void participantAddressChanged(CallParticipantChangeEvent evt)
public void participantAddressChanged(CallPeerChangeEvent evt)
{}
/**
@ -139,7 +139,7 @@ public void participantAddressChanged(CallParticipantChangeEvent evt)
* @param evt unused.
*/
public void participantTransportAddressChanged(
CallParticipantChangeEvent evt)
CallPeerChangeEvent evt)
{}
@ -149,7 +149,7 @@ public void participantTransportAddressChanged(
*
* @param evt unused.
*/
public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
public void participantDisplayNameChanged(CallPeerChangeEvent evt)
{}
/**
@ -158,7 +158,7 @@ public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new status.
*/
public void participantStateChanged(CallParticipantChangeEvent evt)
public void participantStateChanged(CallPeerChangeEvent evt)
{
if(((CallParticipantState)evt.getNewValue())
== CallParticipantState.DISCONNECTED

@ -92,7 +92,7 @@ public void setAddress(String address)
this.participantAddress = address;
//Fire the Event
fireCallParticipantChangeEvent(
CallParticipantChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE,
CallPeerChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE,
oldAddress,
address.toString());
}
@ -144,7 +144,7 @@ protected void setImage(byte[] image)
//Fire the Event
fireCallParticipantChangeEvent(
CallParticipantChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE,
CallPeerChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE,
oldImage,
image);
}

@ -288,7 +288,7 @@ public Iterator getActiveCalls()
*
* @param participant the call participant to put on hold.
*/
public void putOffHold(CallParticipant participant)
public void putOffHold(CallPeer participant)
{
/** @todo implement putOffHold() */
((CallParticipantJabberImpl) participant).getJingleSession().
@ -300,7 +300,7 @@ public void putOffHold(CallParticipant participant)
*
* @param participant the participant that we'd like to put on hold.
*/
public void putOnHold(CallParticipant participant)
public void putOnHold(CallPeer participant)
{
/** @todo implement putOnHold() */
((CallParticipantJabberImpl) participant).getJingleSession().
@ -320,7 +320,7 @@ public void putOnHold(CallParticipant participant)
* // TODO: ask for suppression of OperationFailedException from the interface.
* // what happens if hangup fails ? are we forced to continue to talk ? :o)
*/
public void hangupCallParticipant(CallParticipant participant)
public void hangupCallParticipant(CallPeer participant)
throws ClassCastException, OperationFailedException
{
CallParticipantJabberImpl callParticipant
@ -348,7 +348,7 @@ public void hangupCallParticipant(CallParticipant participant)
* @param participant the call participant that we want to answer
* @throws OperationFailedException if we fails to answer
*/
public void answerCallParticipant(CallParticipant participant)
public void answerCallParticipant(CallPeer participant)
throws OperationFailedException
{
CallParticipantJabberImpl callParticipant
@ -387,8 +387,8 @@ public void shutdown()
//go through all call participants and say bye to every one.
while (callParticipants.hasNext())
{
CallParticipant participant
= (CallParticipant) callParticipants.next();
CallPeer participant
= (CallPeer) callParticipants.next();
try
{
this.hangupCallParticipant(participant);

@ -17,7 +17,7 @@
*/
public class MockCall
extends Call
implements CallParticipantListener
implements CallPeerListener
{
private static final Logger logger = Logger.getLogger(MockCall.class);
@ -98,7 +98,7 @@ public void removeCallParticipant(MockCallParticipant callParticipant)
setCallState(CallState.CALL_ENDED);
}
public void participantStateChanged(CallParticipantChangeEvent evt)
public void participantStateChanged(CallPeerChangeEvent evt)
{
if ( ( (CallParticipantState) evt.getNewValue())
== CallParticipantState.DISCONNECTED
@ -116,19 +116,19 @@ && getCallState().equals(CallState.CALL_INITIALIZATION))
}
}
public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
public void participantDisplayNameChanged(CallPeerChangeEvent evt)
{
}
public void participantAddressChanged(CallParticipantChangeEvent evt)
public void participantAddressChanged(CallPeerChangeEvent evt)
{
}
public void participantImageChanged(CallParticipantChangeEvent evt)
public void participantImageChanged(CallPeerChangeEvent evt)
{
}
public void participantTransportAddressChanged(CallParticipantChangeEvent
public void participantTransportAddressChanged(CallPeerChangeEvent
evt)
{
}

@ -44,7 +44,7 @@ public MockOperationSetBasicTelephony(MockProvider protocolProvider)
* @throws OperationFailedException with the corresponding code if we
* encounter an error while performing this operation.
*/
public void answerCallParticipant(CallParticipant participant) throws
public void answerCallParticipant(CallPeer participant) throws
OperationFailedException
{
MockCallParticipant callParticipant
@ -128,7 +128,7 @@ public Iterator getActiveCalls()
* @throws OperationFailedException with the corresponding code if we
* encounter an error while performing this operation.
*/
public void hangupCallParticipant(CallParticipant participant) throws
public void hangupCallParticipant(CallPeer participant) throws
OperationFailedException
{
//do nothing if the call is already ended
@ -154,7 +154,7 @@ public void hangupCallParticipant(CallParticipant participant) throws
* net.java.sip.communicator.service.protocol.OperationSetBasicTelephony
* method
*/
public void putOffHold(CallParticipant participant)
public void putOffHold(CallPeer participant)
{
}
@ -169,7 +169,7 @@ public void putOffHold(CallParticipant participant)
* net.java.sip.communicator.service.protocol.OperationSetBasicTelephony
* method
*/
public void putOnHold(CallParticipant participant) throws
public void putOnHold(CallPeer participant) throws
OperationFailedException
{
}
@ -199,7 +199,7 @@ public Call placeCall(String toAddress)
return newCall;
}
public CallParticipant addNewCallParticipant(Call call, String address)
public CallPeer addNewCallParticipant(Call call, String address)
{
MockCallParticipant callPArt = new MockCallParticipant(address, (MockCall)call);

@ -194,7 +194,7 @@ public List<CallParticipantSipImpl> findCallParticipants(String callID,
if (!callID.equals(call.getCallID()))
continue;
for (Iterator<CallParticipant> callParticipantIter = call.getCallParticipants();
for (Iterator<CallPeer> callParticipantIter = call.getCallParticipants();
callParticipantIter.hasNext();)
{
CallParticipantSipImpl callParticipant =

@ -133,7 +133,7 @@ public void setAddress(Address address)
this.participantAddress = address;
//Fire the Event
fireCallParticipantChangeEvent(
CallParticipantChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE,
CallPeerChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE,
oldAddress,
address.toString());
}
@ -172,7 +172,7 @@ protected void setDisplayName(String displayName)
//Fire the Event
fireCallParticipantChangeEvent(
CallParticipantChangeEvent.CALL_PARTICIPANT_DISPLAY_NAME_CHANGE,
CallPeerChangeEvent.CALL_PARTICIPANT_DISPLAY_NAME_CHANGE,
oldName,
displayName);
}
@ -202,7 +202,7 @@ protected void setImage(byte[] image)
//Fire the Event
fireCallParticipantChangeEvent(
CallParticipantChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE,
CallPeerChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE,
oldImage,
image);
}
@ -361,7 +361,7 @@ public void setTransportAddress(InetSocketAddress transportAddress)
this.transportAddress = transportAddress;
this.fireCallParticipantChangeEvent(
CallParticipantChangeEvent
CallPeerChangeEvent
.CALL_PARTICIPANT_TRANSPORT_ADDRESS_CHANGE,
oldTransportAddress,
transportAddress);

@ -22,7 +22,7 @@
*/
public class CallSipImpl
extends Call
implements CallParticipantListener
implements CallPeerListener
{
private static final Logger logger = Logger.getLogger(CallSipImpl.class);
@ -108,9 +108,9 @@ public void removeCallParticipant(CallParticipantSipImpl callParticipant)
*
* @return an Iterator over all participants currently involved in the call.
*/
public Iterator<CallParticipant> getCallParticipants()
public Iterator<CallPeer> getCallParticipants()
{
return new LinkedList<CallParticipant>(callParticipants).iterator();
return new LinkedList<CallPeer>(callParticipants).iterator();
}
/**
@ -130,7 +130,7 @@ public int getCallParticipantsCount()
*
* @param evt unused.
*/
public void participantImageChanged(CallParticipantChangeEvent evt)
public void participantImageChanged(CallPeerChangeEvent evt)
{
}
@ -140,7 +140,7 @@ public void participantImageChanged(CallParticipantChangeEvent evt)
*
* @param evt unused.
*/
public void participantAddressChanged(CallParticipantChangeEvent evt)
public void participantAddressChanged(CallPeerChangeEvent evt)
{
}
@ -151,7 +151,7 @@ public void participantAddressChanged(CallParticipantChangeEvent evt)
* @param evt unused.
*/
public void participantTransportAddressChanged(
CallParticipantChangeEvent evt)
CallPeerChangeEvent evt)
{
}
@ -161,7 +161,7 @@ public void participantTransportAddressChanged(
*
* @param evt unused.
*/
public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
public void participantDisplayNameChanged(CallPeerChangeEvent evt)
{
}
@ -171,7 +171,7 @@ public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new status.
*/
public void participantStateChanged(CallParticipantChangeEvent evt)
public void participantStateChanged(CallPeerChangeEvent evt)
{
CallParticipantState newState =
(CallParticipantState) evt.getNewValue();
@ -213,7 +213,7 @@ public boolean contains(Dialog dialog)
*/
public CallParticipantSipImpl findCallParticipant(Dialog dialog)
{
Iterator<CallParticipant> callParticipants = this.getCallParticipants();
Iterator<CallPeer> callParticipants = this.getCallParticipants();
if (logger.isTraceEnabled())
{

@ -367,7 +367,7 @@ public Iterator<CallSipImpl> getActiveCalls()
* @param participant the call participant to put on hold.
* @throws OperationFailedException
*/
public synchronized void putOffHold(CallParticipant participant)
public synchronized void putOffHold(CallPeer participant)
throws OperationFailedException
{
putOnHold(participant, false);
@ -379,7 +379,7 @@ public synchronized void putOffHold(CallParticipant participant)
* @param participant the participant that we'd like to put on hold.
* @throws OperationFailedException
*/
public synchronized void putOnHold(CallParticipant participant)
public synchronized void putOnHold(CallPeer participant)
throws OperationFailedException
{
putOnHold(participant, true);
@ -393,7 +393,7 @@ public synchronized void putOnHold(CallParticipant participant)
* put on hold; <tt>false</tt>, otherwise
* @throws OperationFailedException
*/
private void putOnHold(CallParticipant participant, boolean on)
private void putOnHold(CallPeer participant, boolean on)
throws OperationFailedException
{
CallSession callSession =
@ -990,7 +990,7 @@ private void processInviteOK(ClientTransaction clientTransaction,
while (activeCallsIter.hasNext())
{
CallSipImpl activeCall = activeCallsIter.next();
Iterator<CallParticipant> callParticipantsIter =
Iterator<CallPeer> callParticipantsIter =
activeCall.getCallParticipants();
while (callParticipantsIter.hasNext())
{
@ -1783,7 +1783,7 @@ private boolean isInviteProperlyAddressed(Dialog dialog)
* @throws OperationFailedException
* @throws ParseException
*/
private void processInviteSendingResponse(CallParticipant participant,
private void processInviteSendingResponse(CallPeer participant,
Response response) throws OperationFailedException, ParseException
{
/*
@ -1829,7 +1829,7 @@ private void processInviteSendingResponse(CallParticipant participant,
* @throws OperationFailedException
* @throws ParseException
*/
private void processInviteSentResponse(CallParticipant participant,
private void processInviteSentResponse(CallPeer participant,
Response response) throws OperationFailedException
{
/*
@ -2612,7 +2612,7 @@ private Request createRequest(Dialog dialog, String method)
* CallParticipantSipImpl.
* @throws OperationFailedException if we fail to terminate the call.
*/
public synchronized void hangupCallParticipant(CallParticipant participant)
public synchronized void hangupCallParticipant(CallPeer participant)
throws ClassCastException,
OperationFailedException
{
@ -2907,7 +2907,7 @@ private void sayBusyHere(CallParticipantSipImpl callParticipant)
* @throws OperationFailedException if we fail to create or send the
* response.
*/
public synchronized void answerCallParticipant(CallParticipant participant)
public synchronized void answerCallParticipant(CallPeer participant)
throws OperationFailedException
{
CallParticipantSipImpl callParticipant =
@ -3135,13 +3135,13 @@ public synchronized void shutdown()
{
CallSipImpl call = activeCalls.next();
Iterator<CallParticipant> callParticipants
Iterator<CallPeer> callParticipants
= call.getCallParticipants();
// go through all call participants and say bye to every one.
while (callParticipants.hasNext())
{
CallParticipant participant = callParticipants.next();
CallPeer participant = callParticipants.next();
try
{
this.hangupCallParticipant(participant);
@ -3167,7 +3167,7 @@ public synchronized void shutdown()
* @param mute <tt>true</tt> to mute the audio stream being sent to
* <tt>participant</tt>; otherwise, <tt>false</tt>
*/
public void setMute(CallParticipant participant, boolean mute)
public void setMute(CallPeer participant, boolean mute)
{
CallParticipantSipImpl sipParticipant
= (CallParticipantSipImpl) participant;
@ -3185,7 +3185,7 @@ public void setMute(CallParticipant participant, boolean mute)
* @return <code>true</code> to indicate that the call associated with the
* given participant is secured, otherwise returns <code>false</code>.
*/
public boolean isSecure(CallParticipant participant)
public boolean isSecure(CallPeer participant)
{
CallSession cs
= ((CallSipImpl) participant.getCall()).getMediaCallSession();
@ -3200,7 +3200,7 @@ public boolean isSecure(CallParticipant participant)
* @param isVerified indicates whether the SAS string is verified or not
* for the given participant.
*/
public boolean setSasVerified( CallParticipant participant,
public boolean setSasVerified( CallPeer participant,
boolean isVerified)
{
CallSession cs
@ -3220,7 +3220,7 @@ public boolean setSasVerified( CallParticipant participant,
* <code>participant</code> to
* @throws OperationFailedException
*/
private void transfer(CallParticipant participant, Address target)
private void transfer(CallPeer participant, Address target)
throws OperationFailedException
{
CallParticipantSipImpl sipParticipant =
@ -3251,7 +3251,7 @@ private void transfer(CallParticipant participant, Address target)
* #transfer(net.java.sip.communicator.service.protocol.CallParticipant,
* net.java.sip.communicator.service.protocol.CallParticipant)
*/
public void transfer(CallParticipant participant, CallParticipant target)
public void transfer(CallPeer participant, CallPeer target)
throws OperationFailedException
{
Address targetAddress = parseAddressString(target.getAddress());
@ -3303,7 +3303,7 @@ public void transfer(CallParticipant participant, CallParticipant target)
* #transfer(net.java.sip.communicator.service.protocol.CallParticipant,
* String)
*/
public void transfer(CallParticipant participant, String target)
public void transfer(CallPeer participant, String target)
throws OperationFailedException
{
transfer(participant, parseAddressString(target));

@ -274,7 +274,7 @@ public boolean processDialogTerminated(
* @throws IllegalArgumentException in case the call participant does not
* belong to the underlying implementation.
*/
public void sendDTMF(CallParticipant callParticipant, DTMFTone tone)
public void sendDTMF(CallPeer callParticipant, DTMFTone tone)
throws OperationFailedException,
NullPointerException,
IllegalArgumentException

@ -60,7 +60,7 @@ public OperationSetVideoTelephonySipImpl(
* promotes itself as the provider of the video by replacing the CallSession
* in the VideoEvents it fires.
*/
public void addVideoListener(CallParticipant participant,
public void addVideoListener(CallPeer participant,
VideoListener listener)
{
if (listener == null)
@ -77,7 +77,7 @@ public void addVideoListener(CallParticipant participant,
* VideoListener) of the Call of the specified CallParticipant because the
* CallSession manages the visual components which represent local video.
*/
public Component createLocalVisualComponent(CallParticipant participant,
public Component createLocalVisualComponent(CallPeer participant,
VideoListener listener) throws OperationFailedException
{
CallSession callSession =
@ -105,7 +105,7 @@ public Component createLocalVisualComponent(CallParticipant participant,
* Component) of the Call of the specified CallParticipant because the
* CallSession manages the visual components which represent local video.
*/
public void disposeLocalVisualComponent(CallParticipant participant,
public void disposeLocalVisualComponent(CallPeer participant,
Component component)
{
CallSession callSession =
@ -120,7 +120,7 @@ public void disposeLocalVisualComponent(CallParticipant participant,
* because the video is provided by the CallSession in the SIP protocol
* implementation.
*/
public Component[] getVisualComponents(CallParticipant participant)
public Component[] getVisualComponents(CallPeer participant)
{
CallSession callSession =
((CallSipImpl) participant.getCall()).getMediaCallSession();
@ -137,7 +137,7 @@ public Component[] getVisualComponents(CallParticipant participant)
* promotes itself as the provider of the video by replacing the CallSession
* in the VideoEvents it fires.
*/
public void removeVideoListener(CallParticipant participant,
public void removeVideoListener(CallPeer participant,
VideoListener listener)
{
if (listener != null)
@ -180,7 +180,7 @@ public void setLocalVideoAllowed(Call call, boolean allowed)
* Once the local state has been modified, re-invite all
* CallParticipants to re-negotiate the modified media setup.
*/
Iterator<CallParticipant> participants = call.getCallParticipants();
Iterator<CallPeer> participants = call.getCallParticipants();
while (participants.hasNext())
{
CallParticipantSipImpl participant
@ -273,7 +273,7 @@ private static class InternalVideoListener
* The <code>CallParticipant</code> whose videos {@link #delegate} is
* interested in.
*/
private final CallParticipant participant;
private final CallPeer participant;
/**
* The <code>OperationSetVideoTelephony</code> which is to be presented
@ -301,7 +301,7 @@ private static class InternalVideoListener
* <code>telephony</code>
*/
public InternalVideoListener(OperationSetVideoTelephony telephony,
CallParticipant participant, VideoListener delegate)
CallPeer participant, VideoListener delegate)
{
if (participant == null)
throw new NullPointerException("participant");

@ -581,8 +581,8 @@ private void answerCall(Call call)
while(participants.hasNext())
{
CallParticipant participant
= (CallParticipant)participants.next();
CallPeer participant
= (CallPeer)participants.next();
try
{
@ -617,8 +617,8 @@ private void hangupCall(Call call)
while(callParticipants.hasNext())
{
CallParticipant participant
= (CallParticipant)callParticipants.next();
CallPeer participant
= (CallPeer)callParticipants.next();
try
{

@ -183,7 +183,7 @@ public String createSdpDescriptionForHold(String participantSdpDescription,
* @throws ParseException if <tt>sdpOfferStr</tt> does not contain a valid
* sdp string.
*/
public String processSdpOffer(CallParticipant offerer, String sdpOffer)
public String processSdpOffer(CallPeer offerer, String sdpOffer)
throws MediaException, ParseException;
/**
@ -198,7 +198,7 @@ public String processSdpOffer(CallParticipant offerer, String sdpOffer)
* @throws ParseException if <tt>sdpAnswerStr</tt> does not contain a valid
* sdp string.
*/
public void processSdpAnswer(CallParticipant responder, String sdpAnswer)
public void processSdpAnswer(CallPeer responder, String sdpAnswer)
throws MediaException, ParseException;
/**

@ -16,7 +16,7 @@
public class MediaEvent
extends java.util.EventObject
{
CallParticipant callParticipant;
CallPeer callParticipant;
/**
* Remote user involved in the event.

@ -22,7 +22,7 @@
*/
public abstract class AbstractCallParticipant
extends PropertyChangeNotifier
implements CallParticipant
implements CallPeer
{
private static final Logger logger
= Logger.getLogger(AbstractCallParticipant.class);
@ -38,8 +38,8 @@ public abstract class AbstractCallParticipant
/**
* All the CallParticipant listeners registered with this CallParticipant.
*/
protected final List<CallParticipantListener> callParticipantListeners
= new ArrayList<CallParticipantListener>();
protected final List<CallPeerListener> callParticipantListeners
= new ArrayList<CallPeerListener>();
/**
* All the CallParticipantSecurityListener-s registered with this
@ -88,7 +88,7 @@ public abstract class AbstractCallParticipant
* receiving CallParticipantEvents
* @param listener a listener instance to register with this participant.
*/
public void addCallParticipantListener(CallParticipantListener listener)
public void addCallParticipantListener(CallPeerListener listener)
{
if (listener == null)
return;
@ -103,7 +103,7 @@ public void addCallParticipantListener(CallParticipantListener listener)
* Unregisters the specified listener.
* @param listener the listener to unregister.
*/
public void removeCallParticipantListener(CallParticipantListener listener)
public void removeCallParticipantListener(CallPeerListener listener)
{
if (listener == null)
return;
@ -182,38 +182,38 @@ protected void fireCallParticipantChangeEvent(String eventType,
Object newValue,
String reason)
{
CallParticipantChangeEvent evt = new CallParticipantChangeEvent(
CallPeerChangeEvent evt = new CallPeerChangeEvent(
this, eventType, oldValue, newValue, reason);
logger.debug("Dispatching a CallParticipantChangeEvent event to "
+ callParticipantListeners.size()
+" listeners. event is: " + evt.toString());
Iterator<CallParticipantListener> listeners = null;
Iterator<CallPeerListener> listeners = null;
synchronized (callParticipantListeners)
{
listeners = new ArrayList<CallParticipantListener>(
listeners = new ArrayList<CallPeerListener>(
callParticipantListeners).iterator();
}
while (listeners.hasNext())
{
CallParticipantListener listener
= (CallParticipantListener) listeners.next();
CallPeerListener listener
= (CallPeerListener) listeners.next();
if(eventType.equals(CallParticipantChangeEvent
if(eventType.equals(CallPeerChangeEvent
.CALL_PARTICIPANT_ADDRESS_CHANGE))
{
listener.participantAddressChanged(evt);
} else if(eventType.equals(CallParticipantChangeEvent
} else if(eventType.equals(CallPeerChangeEvent
.CALL_PARTICIPANT_DISPLAY_NAME_CHANGE))
{
listener.participantDisplayNameChanged(evt);
} else if(eventType.equals(CallParticipantChangeEvent
} else if(eventType.equals(CallPeerChangeEvent
.CALL_PARTICIPANT_IMAGE_CHANGE))
{
listener.participantImageChanged(evt);
} else if(eventType.equals(CallParticipantChangeEvent
} else if(eventType.equals(CallPeerChangeEvent
.CALL_PARTICIPANT_STATE_CHANGE))
{
listener.participantStateChanged(evt);
@ -401,7 +401,7 @@ public void setState(CallParticipantState newState, String reason)
}
fireCallParticipantChangeEvent(
CallParticipantChangeEvent.CALL_PARTICIPANT_STATE_CHANGE,
CallPeerChangeEvent.CALL_PARTICIPANT_STATE_CHANGE,
oldState,
newState);
}
@ -426,7 +426,7 @@ public void setState(CallParticipantState newState)
* @return the time at which this <code>CallParticipant</code> transitioned
* into a state marking the start of the duration of the
* participation in a <code>Call</code> or
* {@link CallParticipant#CALL_DURATION_START_TIME_UNKNOWN} if such
* {@link CallPeer#CALL_DURATION_START_TIME_UNKNOWN} if such
* a transition has not been performed
*/
public long getCallDurationStartTime()
@ -476,9 +476,9 @@ public void setConferenceFocus(boolean conferenceFocus)
this.conferenceFocus = conferenceFocus;
fireCallParticipantConferenceEvent(
new CallParticipantConferenceEvent(
new CallPeerConferenceEvent(
this,
CallParticipantConferenceEvent.CONFERENCE_FOCUS_CHANGED));
CallPeerConferenceEvent.CONFERENCE_FOCUS_CHANGED));
}
}
@ -540,9 +540,9 @@ public void addConferenceMember(ConferenceMember conferenceMember)
conferenceMembers.add(conferenceMember);
}
fireCallParticipantConferenceEvent(
new CallParticipantConferenceEvent(
new CallPeerConferenceEvent(
this,
CallParticipantConferenceEvent.CONFERENCE_MEMBER_ADDED,
CallPeerConferenceEvent.CONFERENCE_MEMBER_ADDED,
conferenceMember));
}
@ -570,9 +570,9 @@ public void removeConferenceMember(ConferenceMember conferenceMember)
return;
}
fireCallParticipantConferenceEvent(
new CallParticipantConferenceEvent(
new CallPeerConferenceEvent(
this,
CallParticipantConferenceEvent.CONFERENCE_MEMBER_REMOVED,
CallPeerConferenceEvent.CONFERENCE_MEMBER_REMOVED,
conferenceMember));
}
@ -617,7 +617,7 @@ public void removeCallParticipantConferenceListener(
* carrying the event data
*/
protected void fireCallParticipantConferenceEvent(
CallParticipantConferenceEvent conferenceEvent)
CallPeerConferenceEvent conferenceEvent)
{
CallParticipantConferenceListener[] listeners;
@ -635,13 +635,13 @@ protected void fireCallParticipantConferenceEvent(
for (CallParticipantConferenceListener listener : listeners)
switch (eventID)
{
case CallParticipantConferenceEvent.CONFERENCE_FOCUS_CHANGED:
case CallPeerConferenceEvent.CONFERENCE_FOCUS_CHANGED:
listener.conferenceFocusChanged(conferenceEvent);
break;
case CallParticipantConferenceEvent.CONFERENCE_MEMBER_ADDED:
case CallPeerConferenceEvent.CONFERENCE_MEMBER_ADDED:
listener.conferenceMemberAdded(conferenceEvent);
break;
case CallParticipantConferenceEvent.CONFERENCE_MEMBER_REMOVED:
case CallPeerConferenceEvent.CONFERENCE_MEMBER_REMOVED:
listener.conferenceMemberRemoved(conferenceEvent);
break;
}

@ -23,7 +23,7 @@ public class AbstractConferenceMember
* The <code>CallParticipant</code> which is the conference focus of this
* <code>ConferenceMember</code>.
*/
private final CallParticipant conferenceFocusCallParticipant;
private final CallPeer conferenceFocusCallParticipant;
/**
* The user-friendly display name of this <code>ConferenceMember</code> in
@ -38,7 +38,7 @@ public class AbstractConferenceMember
private ConferenceMemberState state = ConferenceMemberState.UNKNOWN;
public AbstractConferenceMember(
CallParticipant conferenceFocusCallParticipant)
CallPeer conferenceFocusCallParticipant)
{
this.conferenceFocusCallParticipant = conferenceFocusCallParticipant;
}
@ -46,7 +46,7 @@ public AbstractConferenceMember(
/*
* Implements ConferenceMember#getConferenceFocusCallParticipant().
*/
public CallParticipant getConferenceFocusCallParticipant()
public CallPeer getConferenceFocusCallParticipant()
{
return conferenceFocusCallParticipant;
}

@ -109,7 +109,7 @@ public void removeCallListener(CallListener listener)
* @param mute <tt>true</tt> to mute the audio stream being sent to
* <tt>participant</tt>; otherwise, <tt>false</tt>
*/
public void setMute(CallParticipant participant, boolean mute)
public void setMute(CallPeer participant, boolean mute)
{
/*

@ -123,7 +123,7 @@ public int hashCode()
* Returns an iterator over all call participants.
* @return an Iterator over all participants currently involved in the call.
*/
public abstract Iterator<CallParticipant> getCallParticipants();
public abstract Iterator<CallPeer> getCallParticipants();
/**
* Returns the number of participants currently associated with this call.
@ -180,7 +180,7 @@ public ProtocolProviderService getProtocolProvider()
* newly created event.
* @param eventID the ID of the event to create (see CPE member ints)
*/
protected void fireCallParticipantEvent(CallParticipant sourceCallParticipant,
protected void fireCallParticipantEvent(CallPeer sourceCallParticipant,
int eventID)
{
CallParticipantEvent cpEvent = new CallParticipantEvent(

@ -1,257 +0,0 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol;
import java.net.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
/**
* The CallParticipant is an interface that represents participants in a call.
* Users of the PhoneUIService need to implement this interface (or one of its
* default implementations such DefaultCallParticipant) in order to be able to
* register call participant in the user interface.
*
* <p>For SIP calls for example, it would be necessary to create a
* SipCallParticipant class that would provide sip specific implementations of
* various methods (getAddress() for example would return the participant's sip
* URI).
*
* @author Emil Ivov
* @author Lubomir Marinov
*/
public interface CallParticipant
{
/**
* The constant indicating that a <code>CallParticipant</code> has not yet
* transitioned into a state marking the beginning of a participation in a
* <code>Call</code> or that such a transition may have happened but the
* time of its occurrence is unknown.
*/
public static final long CALL_DURATION_START_TIME_UNKNOWN = 0;
/**
* The mute property name.
*/
public static final String MUTE_PROPERTY_NAME = "Mute";
/**
* Returns a unique identifier representing this participant. Identifiers
* returned by this method should remain unique across calls. In other
* words, if it returned the value of "A" for a given participant it should
* not return that same value for any other participant and return a
* different value even if the same person (address) is participating in
* another call. Values need not remain unique after restarting the program.
*
* @return an identifier representing this call participant.
*/
public String getParticipantID();
/**
* Returns a reference to the call that this participant belongs to.
* @return a reference to the call containing this participant.
*/
public Call getCall();
/**
* Returns a human readable name representing this participant.
* @return a String containing a name for that participant.
*/
public String getDisplayName();
/**
* Returns a String locator for that participant. A locator might be a SIP
* URI, an IP address or a telephone number.
* @return the participant's address or phone number.
*/
public String getAddress();
/**
* Returns an object representing the current state of that participant.
* CallParticipantState may vary among CONNECTING, RINGING, CALLING, BUSY,
* CONNECTED, and others, and it reflects the state of the connection between
* us and that participant.
* @return a CallParticipantState instance representing the participant's
* state.
*/
public CallParticipantState getState();
/**
* Allows the user interface to register a listener interested in changes
* @param listener a listener instance to register with this participant.
*/
public void addCallParticipantListener(CallParticipantListener listener);
/**
* Unregisters the specified listener.
* @param listener the listener to unregister.
*/
public void removeCallParticipantListener(CallParticipantListener listener);
/**
* Allows the user interface to register a listener interested in security
* status changes.
*
* @param listener a listener instance to register with this participant
*/
public void addCallParticipantSecurityListener(
CallParticipantSecurityListener listener);
/**
* Unregisters the specified listener.
*
* @param listener the listener to unregister
*/
public void removeCallParticipantSecurityListener(
CallParticipantSecurityListener listener);
/**
* Allows the user interface to register a listener interested in property
* changes.
* @param listener a property change listener instance to register with this
* participant.
*/
public void addPropertyChangeListener(PropertyChangeListener listener);
/**
* Unregisters the specified property change listener.
*
* @param listener the property change listener to unregister.
*/
public void removePropertyChangeListener(PropertyChangeListener listener);
/**
* Gets the time at which this <code>CallParticipant</code> transitioned
* into a state (likely {@link CallParticipantState#CONNECTED}) marking the
* start of the duration of the participation in a <code>Call</code>.
*
* @return the time at which this <code>CallParticipant</code> transitioned
* into a state marking the start of the duration of the
* participation in a <code>Call</code> or
* {@link #CALL_DURATION_START_TIME_UNKNOWN} if such a transition
* has not been performed
*/
long getCallDurationStartTime();
/**
* Returns a string representation of the participant in the form of
* <br>
* Display Name &lt;address&gt;;status=CallParticipantStatus
* @return a string representation of the participant and its state.
*/
public String toString();
/**
* The method returns an image representation of the call participant (e.g.
* a photo). Generally, the image representation is acquired from the
* underlying telephony protocol and is transferred over the network during
* call negotiation.
* @return byte[] a byte array containing the image or null if no image is
* available.
*/
public byte[] getImage();
/**
* Returns the protocol provider that this participant belongs to.
* @return a reference to the ProtocolProviderService that this participant
* belongs to.
*/
public ProtocolProviderService getProtocolProvider();
/**
* Returns the contact corresponding to this participant or null if no
* particular contact has been associated.
* <p>
* @return the <tt>Contact</tt> corresponding to this participant or null
* if no particular contact has been associated.
*/
public Contact getContact();
/**
* Returns a URL pointing to a location with call control information or
* null if such an URL is not available for the current call participant.
*
* @return a URL link to a location with call information or a call control
* web interface related to this participant or <tt>null</tt> if no such URL
* is available.
*/
public URL getCallInfoURL();
/**
* Determines whether the audio stream (if any) being sent to this
* participant is mute.
*
* @return <tt>true</tt> if an audio stream is being sent to this
* participant and it is currently mute; <tt>false</tt>, otherwise
*/
public boolean isMute();
/**
* Determines whether this participant is acting as a conference focus and
* thus may provide information about <code>ConferenceMember</code> such as
* {@link #getConferenceMembers()} and {@link #getConferenceMemberCount()}.
*
* @return <tt>true</tt> if this participant is acting as a conference
* focus; <tt>false</tt>, otherwise
*/
public boolean isConferenceFocus();
/**
* Gets the <code>ConferenceMember</code>s currently known to this
* participant if it is acting as a conference focus.
*
* @return an array of <code>ConferenceMember</code>s describing the members
* of a conference managed by this participant if it is acting as a
* conference focus. If this participant is not acting as a
* conference focus or it does but there are currently no members in
* the conference it manages, an empty array is returned.
*/
public ConferenceMember[] getConferenceMembers();
/**
* Gets the number of <code>ConferenceMember</code>s currently known to this
* participant if it is acting as a conference focus.
*
* @return the number of <code>ConferenceMember</code>s currently known to
* this participant if it is acting as a conference focus. If this
* participant is not acting as a conference focus or it does but
* there are currently no members in the conference it manages, a
* value of zero is returned.
*/
public int getConferenceMemberCount();
/**
* Adds a specific <code>CallParticipantConferenceListener</code> to the
* list of listeners interested in and notified about changes in
* conference-related information such as this participant acting or not
* acting as a conference focus and conference membership details.
*
* @param listener
* a <code>CallParticipantConferenceListener</code> to be
* notified about changes in conference-related information. If
* the specified listener is already in the list of interested
* listeners (i.e. it has been previously added), it is not added
* again.
*/
public void addCallParticipantConferenceListener(
CallParticipantConferenceListener listener);
/**
* Removes a specific <code>CallParticipantConferenceListener</code> from
* the list of listeners interested in and notified about changes in
* conference-related information such as this participant acting or not
* acting as a conference focus and conference membership details.
*
* @param listener
* a <code>CallParticipantConferenceListener</code> to no longer
* be notified about changes in conference-related information
*/
public void removeCallParticipantConferenceListener(
CallParticipantConferenceListener listener);
}

@ -63,7 +63,7 @@ public interface ConferenceMember
* @return the <code>CallParticipant</code> which is the conference focus of
* this <code>ConferenceMember</code>
*/
public CallParticipant getConferenceFocusCallParticipant();
public CallPeer getConferenceFocusCallParticipant();
/**
* Gets the state of the device and signaling session of this

@ -31,7 +31,7 @@ public interface OperationSetAdvancedTelephony
* the callee to transfer <code>participant</code> to
* @throws OperationFailedException
*/
void transfer(CallParticipant participant, CallParticipant target)
void transfer(CallPeer participant, CallPeer target)
throws OperationFailedException;
/**
@ -49,6 +49,6 @@ void transfer(CallParticipant participant, CallParticipant target)
* <code>participant</code> to
* @throws OperationFailedException
*/
void transfer(CallParticipant participant, String target)
void transfer(CallPeer participant, String target)
throws OperationFailedException;
}

@ -79,7 +79,7 @@ public Call createCall(Contact callee)
* @throws OperationFailedException with the corresponding code if we
* encounter an error while performing this operation.
*/
public void answerCallParticipant(CallParticipant participant)
public void answerCallParticipant(CallPeer participant)
throws OperationFailedException;
/**
@ -90,7 +90,7 @@ public void answerCallParticipant(CallParticipant participant)
* @throws OperationFailedException with the corresponding code if we
* encounter an error while performing this operation.
*/
public void putOnHold(CallParticipant participant)
public void putOnHold(CallPeer participant)
throws OperationFailedException;
/**
@ -102,7 +102,7 @@ public void putOnHold(CallParticipant participant)
* @throws OperationFailedException with the corresponding code if we
* encounter an error while performing this operation
*/
public void putOffHold(CallParticipant participant)
public void putOffHold(CallPeer participant)
throws OperationFailedException;
/**
@ -112,7 +112,7 @@ public void putOffHold(CallParticipant participant)
* @throws OperationFailedException with the corresponding code if we
* encounter an error while performing this operation.
*/
public void hangupCallParticipant(CallParticipant participant)
public void hangupCallParticipant(CallPeer participant)
throws OperationFailedException;
/**
@ -134,5 +134,5 @@ public void hangupCallParticipant(CallParticipant participant)
* @param mute <tt>true</tt> to mute the audio stream being sent to
* <tt>participant</tt>; otherwise, <tt>false</tt>
*/
public void setMute(CallParticipant participant, boolean mute);
public void setMute(CallPeer participant, boolean mute);
}

@ -22,6 +22,6 @@ public interface OperationSetCallTransfer
* @param targetURI the uri that we'd like this call participant to be
* transferred to.
*/
public void transferCallParticipant(CallParticipant participant,
public void transferCallParticipant(CallPeer participant,
String targetURI);
}

@ -30,7 +30,7 @@ public interface OperationSetDTMF
* @throws IllegalArgumentException in case the call participant does not
* belong to the underlying implementation.
*/
public void sendDTMF(CallParticipant callParticipant, DTMFTone tone)
public void sendDTMF(CallPeer callParticipant, DTMFTone tone)
throws OperationFailedException,
NullPointerException,
ClassCastException;

@ -23,7 +23,7 @@ public interface OperationSetSecureTelephony
* @param participant the participant for who the call state is required
* @return the call state
*/
public boolean isSecure(CallParticipant participant);
public boolean isSecure(CallPeer participant);
/**
* Sets the SAS verifications state of the call session in which a specific participant
@ -34,5 +34,5 @@ public interface OperationSetSecureTelephony
* @param verified the new SAS verification status
* @param source the source who generated the call change
*/
public boolean setSasVerified(CallParticipant participant, boolean verified);
public boolean setSasVerified(CallPeer participant, boolean verified);
}

@ -44,6 +44,6 @@ public Call createConfCall(String[] callees)
* if allowing additional callees to a pre-established call is
* not supported.
*/
public CallParticipant inviteCalleeToCall(String uri, Call existingCall)
public CallPeer inviteCalleeToCall(String uri, Call existingCall)
throws OperationNotSupportedException;
}

@ -35,13 +35,13 @@ public interface OperationSetVideoTelephony
* removed for <code>participant</code>
*/
public void addVideoListener(
CallParticipant participant, VideoListener listener);
CallPeer participant, VideoListener listener);
/**
* Creates a visual <code>Component</code> which depicts the local video
* being streamed to a specific <code>CallParticipant</code>. The returned
* visual <code>Component</code> should be disposed when it is no longer
* required through {@link #disposeLocalVisualComponent(CallParticipant, Component) disposeLocalVisualComponent}.
* required through {@link #disposeLocalVisualComponent(CallPeer, Component) disposeLocalVisualComponent}.
*
* @param participant the <code>CallParticipant</code> to whom the local
* video which is to be depicted by the returned visual
@ -58,7 +58,7 @@ public void addVideoListener(
* visual <code>Component</code> asynchronously.
*/
public Component createLocalVisualComponent(
CallParticipant participant, VideoListener listener)
CallPeer participant, VideoListener listener)
throws OperationFailedException;
/**
@ -75,7 +75,7 @@ public Component createLocalVisualComponent(
* video to be disposed
*/
public void disposeLocalVisualComponent(
CallParticipant participant, Component component);
CallPeer participant, Component component);
/**
* Gets the visual/video <code>Component</code>s available in this telephony
@ -86,7 +86,7 @@ public void disposeLocalVisualComponent(
* @return an array of the visual <code>Component</code>s available in this
* telephony for the specified <code>participant</code>
*/
public Component[] getVisualComponents(CallParticipant participant);
public Component[] getVisualComponents(CallPeer participant);
/**
* Removes a specific <code>VideoListener</code> from this telephony in
@ -101,7 +101,7 @@ public void disposeLocalVisualComponent(
* removed for <code>participant</code>
*/
public void removeVideoListener(
CallParticipant participant, VideoListener listener);
CallPeer participant, VideoListener listener);
/**
* Sets the indicator which determines whether the streaming of local video

@ -1,86 +0,0 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol.event;
/**
* An abstract adapter class for receiving call participant (change) events.
* This class exists only as a convenience for creating listener objects.
* <p>
* Extend this class to create a <tt>CallParticipantChangeEvent</tt> listener
* and override the methods for the events of interest. (If you implement the
* <tt>CallParticipantListener</tt> interface, you have to define all of the
* methods in it. This abstract class defines null methods for them all, so you
* only have to define methods for events you care about.)
* </p>
*
* @see CallParticipantChangeEvent
* @see CallParticipantListener
*
* @author Lubomir Marinov
*/
public abstract class CallParticipantAdapter
implements CallParticipantListener
{
/**
* Indicates that a change has occurred in the address of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new address.
*/
public void participantAddressChanged(CallParticipantChangeEvent evt)
{
}
/**
* Indicates that a change has occurred in the display name of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new display
* names.
*/
public void participantDisplayNameChanged(CallParticipantChangeEvent evt)
{
}
/**
* Indicates that a change has occurred in the image of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new image.
*/
public void participantImageChanged(CallParticipantChangeEvent evt)
{
}
/**
* Indicates that a change has occurred in the status of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new status.
*/
public void participantStateChanged(CallParticipantChangeEvent evt)
{
}
/**
* Indicates that a change has occurred in the transport address that we use
* to communicate with the participant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new transport
* address.
*/
public void participantTransportAddressChanged(
CallParticipantChangeEvent evt)
{
}
}

@ -1,164 +0,0 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol.event;
import net.java.sip.communicator.service.protocol.*;
/**
* CallParticipantChangeEvent-s are triggerred whenever a change occurs in a
* CallParticipant. Dispatched events may be of one of the following types.
* <p>
* CALL_PARTICIPANT_STATUS_CHANGE - indicates a change in the status of the
* participant.
* <p>
* CALL_PARTICIPANT_DISPLAY_NAME_CHANGE - means that participant's displayName
* has changed
* <p>
* CALL_PARTICIPANT_ADDRESS_CHANGE - means that participant's address has
* changed.
* <p>
* CALL_PARTICIPANT_ADDRESS_CHANGE - means that the transport address of the
* participant (the one that we use to communicate with her) has changed.
* <p>
* CALL_PARTICIPANT_IMAGE_CHANGE - participant updated photo.
* <p>
*
* @author Emil Ivov
*/
public class CallParticipantChangeEvent
extends java.beans.PropertyChangeEvent
{
/**
* An event type indicating that the corresponding event is caused by a
* change of the CallParticipant's status.
*/
public static final String CALL_PARTICIPANT_STATE_CHANGE =
"CallParticipantStatusChange";
/**
* An event type indicating that the corresponding event is caused by a
* change of the participant's display name.
*/
public static final String CALL_PARTICIPANT_DISPLAY_NAME_CHANGE =
"CallParticipantDisplayNameChange";
/**
* An event type indicating that the corresponding event is caused by a
* change of the participant's address.
*/
public static final String CALL_PARTICIPANT_ADDRESS_CHANGE =
"CallParticipantAddressChange";
/**
* An event type indicating that the corresponding event is caused by a
* change of the participant's address.
*/
public static final String CALL_PARTICIPANT_TRANSPORT_ADDRESS_CHANGE =
"CallParticipantAddressChange";
/**
* An event type indicating that the corresponding event is caused by a
* change of the participant's photo/picture.
*/
public static final String CALL_PARTICIPANT_IMAGE_CHANGE =
"CallParticipantImageChange";
/**
* A reason string further explaining the event (may be null). The string
* would be mostly used for events issued upon a CallParticipantState
* transition that has led to a FAILED state.
*/
private final String reason;
/**
* Creates a CallParticipantChangeEvent with the specified source, type,
* oldValue and newValue.
* @param source the participant that produced the event.
* @param type the type of the event (i.e. address change, state change etc.).
* @param oldValue the value of the changed property before the event occurred
* @param newValue current value of the changed property.
*/
public CallParticipantChangeEvent(CallParticipant source,
String type,
Object oldValue,
Object newValue)
{
this(source, type, oldValue, newValue, null);
}
/**
* Creates a CallParticipantChangeEvent with the specified source, type,
* oldValue and newValue.
* @param source the participant that produced the event.
* @param type the type of the event (i.e. address change, state change etc.).
* @param oldValue the value of the changed property before the event occurred
* @param newValue current value of the changed property.
* @param reason a string containing a human readable explanation for the
* reason that triggerred this event (may be null).
*/
public CallParticipantChangeEvent(CallParticipant source,
String type,
Object oldValue,
Object newValue,
String reason)
{
super(source, type, oldValue, newValue);
this.reason = reason;
}
/**
* Returns the type of this event.
* @return a string containing one of the following values:
* CALL_PARTICIPANT_STATUS_CHANGE, CALL_PARTICIPANT_DISPLAY_NAME_CHANGE,
* CALL_PARTICIPANT_ADDRESS_CHANGE, CALL_PARTICIPANT_IMAGE_CHANGE
*/
public String getEventType()
{
return getPropertyName();
}
/**
* Returns a String representation of this CallParticipantChangeEvent.
*
* @return A a String representation of this CallParticipantChangeEvent.
*/
public String toString()
{
return "CallParticipantChangeEvent: type="+getEventType()
+ " oldV="+getOldValue()
+ " newV="+getNewValue()
+ " for participant=" + getSourceCallParticipant();
}
/**
* Returns the <tt>CallParticipant</tt> that this event is about.
*
* @return a reference to the <tt>CallParticipant</tt> that is the source
* of this event.
*/
public CallParticipant getSourceCallParticipant()
{
return (CallParticipant)getSource();
}
/**
* Returns a reason string further explaining the event (may be null). The
* string would be mostly used for events issued upon a CallParticipantState
* transition that has led to a FAILED state.
*
* @return a reason string further explaining the event or null if no reason
* was set.
*/
public String getReasonString()
{
return reason;
}
}

@ -1,164 +0,0 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol.event;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
/**
* Represents an event fired by a <code>CallParticipant</code> to notify
* interested <code>CallParticipantConferenceListener</code>s about changes in
* its conference-related information such as it acting or not acting as a
* conference focus and conference membership details.
*
* @author Lubomir Marinov
*/
public class CallParticipantConferenceEvent
extends EventObject
{
/**
* The ID of <code>CallParticipantConferenceEvent</code> which notifies
* about a change in the characteristic of a specific
* <code>CallParticipant</code> being a conference focus. The event does not
* carry information about a specific <code>ConferenceMember</code> i.e. the
* <code>conferenceMember</code> property is of value <tt>null</tt>.
*/
public static final int CONFERENCE_FOCUS_CHANGED = 1;
/**
* The ID of <code>CallParticipantConferenceEvent</code> which notifies
* about an addition to the list of <code>ConferenceMember</code>s managed
* by a specific <code>CallParticipant</code>. The
* <code>conferenceMember</code> property specifies the
* <code>ConferenceMember</code> which was added and thus caused the event
* to be fired.
*/
public static final int CONFERENCE_MEMBER_ADDED = 2;
/**
* The ID of <code>CallParticipantConferenceEvent</code> which notifies
* about a removal from the list of <code>ConferenceMember</code>s managed
* by a specific <code>CallParticipant</code>. The
* <code>conferenceMember</code> property specifies the
* <code>ConferenceMember</code> which was removed and thus caused the event
* to be fired.
*/
public static final int CONFERENCE_MEMBER_REMOVED = 3;
/**
* The <code>ConferenceMember</code> which has been changed (e.g. added to
* or removed from the conference) if this event has been fired because of
* such a change; otherwise, <tt>null</tt>.
*/
private final ConferenceMember conferenceMember;
/**
* The ID of this event which may be one of
* {@link #CONFERENCE_FOCUS_CHANGED}, {@link #CONFERENCE_MEMBER_ADDED} and
* {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics of the
* change in the conference-related information and the details this event
* carries.
*/
private final int eventID;
/**
* Initializes a new <code>CallParticipantConferenceEvent</code> which is to
* be fired by a specific <code>CallParticipant</code> and which notifies
* about a change in its conference-related information not including a
* change pertaining to a specific <code>ConferenceMember</code>.
*
* @param source
* the <code>CallParticipant</code> which is to fire the new
* event
* @param eventID
* the ID of this event which may be
* {@link #CONFERENCE_FOCUS_CHANGED} and indicates the specifics
* of the change in the conference-related information and the
* details this event carries
*/
public CallParticipantConferenceEvent(CallParticipant source, int eventID)
{
this(source, eventID, null);
}
/**
* Initializes a new <code>CallParticipantConferenceEvent</code> which is to
* be fired by a specific <code>CallParticipant</code> and which notifies
* about a change in its conference-related information pertaining to a
* specific <code>ConferenceMember</code>.
*
* @param source
* the <code>CallParticipant</code> which is to fire the new
* event
* @param eventID
* the ID of this event which may be
* {@link #CONFERENCE_MEMBER_ADDED} and
* {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics
* of the change in the conference-related information and the
* details this event carries
* @param conferenceMember
* the <code>ConferenceMember</code> which caused the new event
* to be fired
*/
public CallParticipantConferenceEvent(
CallParticipant source,
int eventID,
ConferenceMember conferenceMember)
{
super(source);
this.eventID = eventID;
this.conferenceMember = conferenceMember;
}
/**
* Gets the <code>ConferenceMember</code> which has been changed (e.g. added
* to or removed from the conference) if this event has been fired because
* of such a change.
*
* @return the <code>ConferenceMember</code> which has been changed if this
* event has been fired because of such a change; otherwise,
* <tt>null</tt>
*/
public ConferenceMember getConferenceMember()
{
return conferenceMember;
}
/**
* Gets the ID of this event which may be one of
* {@link #CONFERENCE_FOCUS_CHANGED}, {@link #CONFERENCE_MEMBER_ADDED} and
* {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics of the
* change in the conference-related information and the details this event
* carries.
*
* @return the ID of this event which may be one of
* {@link #CONFERENCE_FOCUS_CHANGED},
* {@link #CONFERENCE_MEMBER_ADDED} and
* {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics of
* the change in the conference-related information and the details
* this event carries
*/
public int getEventID()
{
return eventID;
}
/**
* Gets the <code>CallParticipant</code> which is the source of/fired the
* event.
*
* @return the <code>CallParticipant</code> which is the source of/fired the
* event
*/
public CallParticipant getSourceCallParticipant()
{
return (CallParticipant) getSource();
}
}

@ -29,7 +29,7 @@ public interface CallParticipantConferenceListener
* and no associated <code>ConferenceMember</code>
*/
public void conferenceFocusChanged(
CallParticipantConferenceEvent conferenceEvent);
CallPeerConferenceEvent conferenceEvent);
/**
* Notifies this listener about the addition of a specific
@ -44,7 +44,7 @@ public void conferenceFocusChanged(
* <code>ConferenceMember</code> which was added
*/
public void conferenceMemberAdded(
CallParticipantConferenceEvent conferenceEvent);
CallPeerConferenceEvent conferenceEvent);
/**
* Notifies this listener about the removal of a specific
@ -59,5 +59,5 @@ public void conferenceMemberAdded(
* <code>ConferenceMember</code> which was removed
*/
public void conferenceMemberRemoved(
CallParticipantConferenceEvent conferenceEvent);
CallPeerConferenceEvent conferenceEvent);
}

@ -35,7 +35,7 @@ public class CallParticipantControlEvent
* @param targetURI the URI to transfer to if this is a "Transfer" event
* or null otherwise.
*/
public CallParticipantControlEvent(CallParticipant source, String targetURI)
public CallParticipantControlEvent(CallPeer source, String targetURI)
{
super(source);
this.targetURI = targetURI;
@ -45,9 +45,9 @@ public CallParticipantControlEvent(CallParticipant source, String targetURI)
* Returns the CallParticipant that this event is pertaining to.
* @return the CallParticipant that this event is pertaining to.
*/
public CallParticipant getAssociatedCallparticipant()
public CallPeer getAssociatedCallparticipant()
{
return (CallParticipant) source;
return (CallPeer) source;
}
/**

@ -50,7 +50,7 @@ public class CallParticipantEvent
* @param eventID one of the CALL_PARTICIPANT_XXX member ints indicating
* the type of this event.
*/
public CallParticipantEvent(CallParticipant sourceCallParticipant,
public CallParticipantEvent(CallPeer sourceCallParticipant,
Call sourceCall,
int eventID)
{
@ -86,9 +86,9 @@ public Call getSourceCall()
*
* @return a reference to the source <tt>CallParticipant</tt> instance.
*/
public CallParticipant getSourceCallParticipant()
public CallPeer getSourceCallParticipant()
{
return (CallParticipant)getSource();
return (CallPeer)getSource();
}
/**

@ -1,69 +0,0 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol.event;
import java.util.*;
/**
* Receives events notifying of changes that have occurred within a
* <tt>CallParticipant</tt>. Such changes may pertain to current call
* participant state, their display name, address, image and (possibly in the
* future) others.
*
* @author Emil Ivov
*/
public interface CallParticipantListener
extends EventListener
{
/**
* Indicates that a change has occurred in the status of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new status.
*/
public void participantStateChanged(CallParticipantChangeEvent evt);
/**
* Indicates that a change has occurred in the display name of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new display names.
*/
public void participantDisplayNameChanged(CallParticipantChangeEvent evt);
/**
* Indicates that a change has occurred in the address of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new address.
*/
public void participantAddressChanged(CallParticipantChangeEvent evt);
/**
* Indicates that a change has occurred in the transport address that we
* use to communicate with the participant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new transport address.
*/
public void participantTransportAddressChanged(
CallParticipantChangeEvent evt);
/**
* Indicates that a change has occurred in the image of the source
* CallParticipant.
*
* @param evt The <tt>CallParticipantChangeEvent</tt> instance containing
* the source event as well as its previous and its new image.
*/
public void participantImageChanged(CallParticipantChangeEvent evt);
}

@ -66,7 +66,7 @@ public class CallParticipantSecurityMessageEvent
* @param i18nMessage the internationalized message associated with this
* event that could be shown to the user.
*/
public CallParticipantSecurityMessageEvent( CallParticipant callParticipant,
public CallParticipantSecurityMessageEvent( CallPeer callParticipant,
String eventMessage,
String i18nMessage,
int eventSeverity)

@ -26,7 +26,7 @@ public class CallParticipantSecurityOffEvent
* @param sessionType
* the type of the session: audio or video
*/
public CallParticipantSecurityOffEvent( CallParticipant callParticipant,
public CallParticipantSecurityOffEvent( CallPeer callParticipant,
int sessionType)
{
super(callParticipant, sessionType);

@ -39,7 +39,7 @@ public class CallParticipantSecurityOnEvent
* indicates if the security string has already been verified
*/
public CallParticipantSecurityOnEvent(
CallParticipant callParticipant,
CallPeer callParticipant,
int sessionType,
String cipher,
String securityString,
@ -57,9 +57,9 @@ public CallParticipantSecurityOnEvent(
*
* @return the <tt>CallParticipant</tt> for which this event occurred.
*/
public CallParticipant getCallParticipant()
public CallPeer getCallParticipant()
{
return (CallParticipant) getSource();
return (CallPeer) getSource();
}
/**

@ -156,7 +156,7 @@ private void generateCall(String participant)
Iterator iter = newCall.getCallParticipants();
while (iter.hasNext())
{
CallParticipant item = (CallParticipant) iter.next();
CallPeer item = (CallPeer) iter.next();
v.add(item);
}
@ -165,7 +165,7 @@ private void generateCall(String participant)
iter = v.iterator();
while (iter.hasNext())
{
CallParticipant item = (CallParticipant) iter.next();
CallPeer item = (CallPeer) iter.next();
mockBTelphonyOpSet.hangupCallParticipant(item);
}
}
@ -287,13 +287,13 @@ public void checkRecordCompleteness()
Iterator iter = newCall.getCallParticipants();
while (iter.hasNext())
{
CallParticipant item = (CallParticipant) iter.next();
CallPeer item = (CallPeer) iter.next();
v.add(item);
}
waitSeconds(2000);
CallParticipant newParticipant =
CallPeer newParticipant =
mockBTelphonyOpSet.addNewCallParticipant(newCall,
partAddresses[1]);
@ -304,7 +304,7 @@ public void checkRecordCompleteness()
iter = v.iterator();
while (iter.hasNext())
{
CallParticipant item = (CallParticipant) iter.next();
CallPeer item = (CallPeer) iter.next();
mockBTelphonyOpSet.hangupCallParticipant(item);
}
}

@ -291,7 +291,7 @@ private void generateCall(String participant)
Iterator iter = newCall.getCallParticipants();
while (iter.hasNext())
{
CallParticipant item = (CallParticipant) iter.next();
CallPeer item = (CallPeer) iter.next();
v.add(item);
}
@ -300,7 +300,7 @@ private void generateCall(String participant)
iter = v.iterator();
while (iter.hasNext())
{
CallParticipant item = (CallParticipant) iter.next();
CallPeer item = (CallPeer) iter.next();
mockBTelphonyOpSet.hangupCallParticipant(item);
}
}

@ -122,10 +122,10 @@ public void testCreateCancelCall()
assertEquals("callAtP2.getCallParticipantsCount()"
, 1, callAtP2.getCallParticipantsCount());
CallParticipant participantAtP1
= (CallParticipant)callAtP1.getCallParticipants().next();
CallParticipant participantAtP2
= (CallParticipant)callAtP2.getCallParticipants().next();
CallPeer participantAtP1
= (CallPeer)callAtP1.getCallParticipants().next();
CallPeer participantAtP2
= (CallPeer)callAtP2.getCallParticipants().next();
//now add listeners to the participants and make sure they have entered
//the states they were expected to.
@ -352,10 +352,10 @@ public void testCreateRejectCall()
assertEquals("callAtP2.getCallParticipantsCount()"
, 1, callAtP2.getCallParticipantsCount());
CallParticipant participantAtP1
= (CallParticipant)callAtP1.getCallParticipants().next();
CallParticipant participantAtP2
= (CallParticipant)callAtP2.getCallParticipants().next();
CallPeer participantAtP1
= (CallPeer)callAtP1.getCallParticipants().next();
CallPeer participantAtP2
= (CallPeer)callAtP2.getCallParticipants().next();
//now add listeners to the participants and make sure they have entered
//the states they were expected to.
@ -589,10 +589,10 @@ public void aTestCreateAnswerHangupCall()
assertEquals("callAtP2.getCallParticipantsCount()"
, 1, callAtP2.getCallParticipantsCount());
CallParticipant participantAtP1
= (CallParticipant)callAtP1.getCallParticipants().next();
CallParticipant participantAtP2
= (CallParticipant)callAtP2.getCallParticipants().next();
CallPeer participantAtP1
= (CallPeer)callAtP1.getCallParticipants().next();
CallPeer participantAtP2
= (CallPeer)callAtP2.getCallParticipants().next();
//now add listeners to the participants and make sure they have entered
//the states they were expected to.
@ -858,10 +858,10 @@ public void callEnded(CallEvent event)
* status changes.
*/
public class CallParticipantStateEventCollector
extends CallParticipantAdapter
extends CallPeerAdapter
{
public ArrayList collectedEvents = new ArrayList();
private CallParticipant listenedCallParticipant = null;
private CallPeer listenedCallParticipant = null;
public CallParticipantState awaitedState = null;
/**
@ -873,7 +873,7 @@ public class CallParticipantStateEventCollector
* this collector.
*/
public CallParticipantStateEventCollector(
CallParticipant callParticipant,
CallPeer callParticipant,
CallParticipantState awaitedState)
{
this.listenedCallParticipant = callParticipant;
@ -886,7 +886,7 @@ public CallParticipantStateEventCollector(
*
* @param event the event containing the source call.
*/
public void participantStateChanged(CallParticipantChangeEvent event)
public void participantStateChanged(CallPeerChangeEvent event)
{
synchronized(this)
{
@ -942,8 +942,8 @@ public void waitForEvent(long waitFor, boolean exitIfAlreadyInState)
}
if(collectedEvents.size() > 0)
{
CallParticipantChangeEvent lastEvent
= (CallParticipantChangeEvent) collectedEvents
CallPeerChangeEvent lastEvent
= (CallPeerChangeEvent) collectedEvents
.get(collectedEvents.size() - 1);
if (lastEvent.getNewValue().equals(awaitedState))

@ -121,10 +121,10 @@ public void testCreateCancelCall()
assertEquals("callAtP2.getCallParticipantsCount()"
, 1, callAtP2.getCallParticipantsCount());
CallParticipant participantAtP1
= (CallParticipant)callAtP1.getCallParticipants().next();
CallParticipant participantAtP2
= (CallParticipant)callAtP2.getCallParticipants().next();
CallPeer participantAtP1
= (CallPeer)callAtP1.getCallParticipants().next();
CallPeer participantAtP2
= (CallPeer)callAtP2.getCallParticipants().next();
//now add listeners to the participants and make sure they have entered
//the states they were expected to.
@ -351,10 +351,10 @@ public void testCreateRejectCall()
assertEquals("callAtP2.getCallParticipantsCount()"
, 1, callAtP2.getCallParticipantsCount());
CallParticipant participantAtP1
= (CallParticipant)callAtP1.getCallParticipants().next();
CallParticipant participantAtP2
= (CallParticipant)callAtP2.getCallParticipants().next();
CallPeer participantAtP1
= (CallPeer)callAtP1.getCallParticipants().next();
CallPeer participantAtP2
= (CallPeer)callAtP2.getCallParticipants().next();
//now add listeners to the participants and make sure they have entered
//the states they were expected to.
@ -588,10 +588,10 @@ public void aTestCreateAnswerHangupCall()
assertEquals("callAtP2.getCallParticipantsCount()"
, 1, callAtP2.getCallParticipantsCount());
CallParticipant participantAtP1
= (CallParticipant)callAtP1.getCallParticipants().next();
CallParticipant participantAtP2
= (CallParticipant)callAtP2.getCallParticipants().next();
CallPeer participantAtP1
= (CallPeer)callAtP1.getCallParticipants().next();
CallPeer participantAtP2
= (CallPeer)callAtP2.getCallParticipants().next();
//now add listeners to the participants and make sure they have entered
//the states they were expected to.
@ -857,10 +857,10 @@ public void callEnded(CallEvent event)
* status changes.
*/
public class CallParticipantStateEventCollector
extends CallParticipantAdapter
extends CallPeerAdapter
{
public ArrayList collectedEvents = new ArrayList();
private CallParticipant listenedCallParticipant = null;
private CallPeer listenedCallParticipant = null;
public CallParticipantState awaitedState = null;
/**
@ -872,7 +872,7 @@ public class CallParticipantStateEventCollector
* this collector.
*/
public CallParticipantStateEventCollector(
CallParticipant callParticipant,
CallPeer callParticipant,
CallParticipantState awaitedState)
{
this.listenedCallParticipant = callParticipant;
@ -885,7 +885,7 @@ public CallParticipantStateEventCollector(
*
* @param event the event containing the source call.
*/
public void participantStateChanged(CallParticipantChangeEvent event)
public void participantStateChanged(CallPeerChangeEvent event)
{
synchronized(this)
{
@ -941,8 +941,8 @@ public void waitForEvent(long waitFor, boolean exitIfAlreadyInState)
}
if(collectedEvents.size() > 0)
{
CallParticipantChangeEvent lastEvent
= (CallParticipantChangeEvent) collectedEvents
CallPeerChangeEvent lastEvent
= (CallPeerChangeEvent) collectedEvents
.get(collectedEvents.size() - 1);
if (lastEvent.getNewValue().equals(awaitedState))

Loading…
Cancel
Save