From eda1cbabae716adb209328e9effd598ee579c844 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Sun, 9 Aug 2009 21:40:10 +0000 Subject: [PATCH] Renames occurrences of callParticipant to callPeer so that it would better reflect our new Call architecture that also includes conferencing and ConferenceMembers --- .../impl/protocol/mock/MockCall.java | 56 +++++++++---------- .../impl/protocol/mock/MockCallPeer.java | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java b/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java index 1a9fdfc7f..94ead97a7 100644 --- a/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java +++ b/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java @@ -22,9 +22,9 @@ public class MockCall private static final Logger logger = Logger.getLogger(MockCall.class); /** - * A list containing all CallParticipants of this call. + * A list containing all CallPeers of this call. */ - private Vector callParticipants = new Vector(); + private Vector callPeers = new Vector(); public MockCall(MockProvider sourceProvider) @@ -33,68 +33,68 @@ public MockCall(MockProvider sourceProvider) } /** - * Returns an iterator over all call participants. + * Returns an iterator over all call peers. * - * @return an Iterator over all participants currently involved in the + * @return an Iterator over all peers currently involved in the * call. */ - public Iterator getCallPeers() + public Iterator getCallPeers() { - return callParticipants.iterator(); + return callPeers.iterator(); } /** - * Returns the number of participants currently associated with this call. + * Returns the number of peers currently associated with this call. * - * @return an int indicating the number of participants + * @return an int indicating the number of peers * currently associated with this call. */ public int getCallPeerCount() { - return callParticipants.size(); + return callPeers.size(); } /** - * Adds callParticipant to the list of participants in this call. - * If the call participant is already included in the call, the method has + * Adds callPeer to the list of peers in this call. + * If the call peer is already included in the call, the method has * no effect. * - * @param callParticipant the new CallParticipant + * @param callPeer the new CallPeer */ - public void addCallParticipant(MockCallPeer callParticipant) + public void addCallPeer(MockCallPeer callPeer) { - if(callParticipants.contains(callParticipant)) + if(callPeers.contains(callPeer)) return; - callParticipant.addCallPeerListener(this); + callPeer.addCallPeerListener(this); - this.callParticipants.add(callParticipant); + this.callPeers.add(callPeer); - logger.info("Will fire participant added"); + logger.info("Will fire peer added"); fireCallPeerEvent( - callParticipant, CallPeerEvent.CALL_PEER_ADDED); + callPeer, CallPeerEvent.CALL_PEER_ADDED); } /** - * Removes callParticipant from the list of participants in this - * call. The method has no effect if there was no such participant in the + * Removes callPeer from the list of peers in this + * call. The method has no effect if there was no such peer in the * call. * - * @param callParticipant the CallParticipant leaving the call; + * @param callPeer the CallPeer leaving the call; */ - public void removeCallParticipant(MockCallPeer callParticipant) + public void removeCallPeer(MockCallPeer callPeer) { - if(!callParticipants.contains(callParticipant)) + if(!callPeers.contains(callPeer)) return; - this.callParticipants.remove(callParticipant); - callParticipant.removeCallPeerListener(this); + this.callPeers.remove(callPeer); + callPeer.removeCallPeerListener(this); fireCallPeerEvent( - callParticipant, CallPeerEvent.CALL_PEER_REMVOVED); + callPeer, CallPeerEvent.CALL_PEER_REMVOVED); - if(callParticipants.size() == 0) + if(callPeers.size() == 0) setCallState(CallState.CALL_ENDED); } @@ -105,7 +105,7 @@ public void peerStateChanged(CallPeerChangeEvent evt) || ( (CallPeerState) evt.getNewValue()) == CallPeerState.FAILED) { - removeCallParticipant( + removeCallPeer( (MockCallPeer) evt.getSourceCallPeer()); } else if ( ( (CallPeerState) evt.getNewValue()) diff --git a/src/net/java/sip/communicator/impl/protocol/mock/MockCallPeer.java b/src/net/java/sip/communicator/impl/protocol/mock/MockCallPeer.java index 6c1e0033e..6c56ded07 100644 --- a/src/net/java/sip/communicator/impl/protocol/mock/MockCallPeer.java +++ b/src/net/java/sip/communicator/impl/protocol/mock/MockCallPeer.java @@ -34,7 +34,7 @@ public MockCallPeer(String address, MockCall owningCall) this.participantAddress = address; this.call = owningCall; - call.addCallParticipant(this); + call.addCallPeer(this); //create the uid this.participantID = String.valueOf( System.currentTimeMillis())