From ca908bebb88f981abcfa135844ec3cd58b668ca0 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Sun, 9 Aug 2009 21:48:14 +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/callhistory/CallRecordImpl.java | 2 +- .../impl/gui/main/call/CallManager.java | 20 ++++----- .../gui/main/call/ReceivedCallDialog.java | 45 +++++++++---------- .../impl/gui/main/call/SecurityPanel.java | 8 ++-- .../protocol/event/CallChangeEvent.java | 2 +- 5 files changed, 38 insertions(+), 39 deletions(-) diff --git a/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java index 4fb410ad3..c52728a86 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallRecordImpl.java @@ -53,7 +53,7 @@ public Call getSourceCall() /** * Set the time when the call finishes - * If some participant has no end Time set we set it also + * If some peer has no end Time set we set it also * @param endTime Date */ public void setEndTime(Date endTime) diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java index e4b98ba32..ccde718cc 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java @@ -280,7 +280,7 @@ public void run() /** - * Answers all call participants in the given call. + * Answers all call peers in the given call. */ private static class AnswerCallThread extends Thread @@ -295,22 +295,22 @@ public AnswerCallThread(Call call) public void run() { ProtocolProviderService pps = call.getProtocolProvider(); - Iterator participants = call.getCallPeers(); + Iterator peers = call.getCallPeers(); - while (participants.hasNext()) + while (peers.hasNext()) { - CallPeer participant = participants.next(); + CallPeer peer = peers.next(); OperationSetBasicTelephony telephony = (OperationSetBasicTelephony) pps .getOperationSet(OperationSetBasicTelephony.class); try { - telephony.answerCallPeer(participant); + telephony.answerCallPeer(peer); } catch (OperationFailedException e) { - logger.error("Could not answer to : " + participant + logger.error("Could not answer to : " + peer + " caused by the following exception: " + e); } } @@ -318,7 +318,7 @@ public void run() } /** - * Hangups all call participants in the given call. + * Hangups all call peers in the given call. */ private static class HangupCallThread extends Thread @@ -333,11 +333,11 @@ public HangupCallThread(Call call) public void run() { ProtocolProviderService pps = call.getProtocolProvider(); - Iterator participants = call.getCallPeers(); + Iterator peers = call.getCallPeers(); - while (participants.hasNext()) + while (peers.hasNext()) { - CallPeer participant = participants.next(); + CallPeer participant = peers.next(); OperationSetBasicTelephony telephony = (OperationSetBasicTelephony) pps .getOperationSet(OperationSetBasicTelephony.class); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java index b14c8cc9a..0dbb05f78 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/ReceivedCallDialog.java @@ -121,41 +121,40 @@ private void initComponents() */ private void initCallLabel(JLabel callLabel) { - Iterator participantsIter - = incomingCall.getCallPeers(); + Iterator peersIter = incomingCall.getCallPeers(); - boolean hasMoreParticipants = false; + boolean hasMorePeers = false; String text = ""; ImageIcon imageIcon = ImageUtils.getScaledRoundedIcon(ImageLoader .getImage(ImageLoader.DEFAULT_USER_PHOTO), 40, 45); - while (participantsIter.hasNext()) + while (peersIter.hasNext()) { - CallPeer participant = participantsIter.next(); + CallPeer peer = peersIter.next(); - // More participants. - if (participantsIter.hasNext()) + // More peers. + if (peersIter.hasNext()) { text = callLabel.getText() - + participant.getDisplayName() + ", "; + + peer.getDisplayName() + ", "; - hasMoreParticipants = true; + hasMorePeers = true; } - // Only one participant. + // Only one peer. else { text = callLabel.getText() - + participant.getDisplayName() + + peer.getDisplayName() + " " + GuiActivator.getResources().getI18NString("service.gui.IS_CALLING"); - imageIcon = getParticipantImage(participant); + imageIcon = getPeerImage(peer); } } - if (hasMoreParticipants) + if (hasMorePeers) text += GuiActivator.getResources() .getI18NString("service.gui.ARE_CALLING"); @@ -186,21 +185,21 @@ else if (buttonName.equals(HANGUP_BUTTON)) } /** - * Returns the participant image. + * Returns the peer image. * - * @param participant The call participant, for which we're returning an + * @param peer The call peer, for which we're returning an * image. - * @return the participant image. + * @return the peer image. */ - private ImageIcon getParticipantImage(CallPeer participant) + private ImageIcon getPeerImage(CallPeer peer) { ImageIcon icon = null; - // We search for a contact corresponding to this call participant and + // We search for a contact corresponding to this call peer and // try to get its image. - if (participant.getContact() != null) + if (peer.getContact() != null) { MetaContact metaContact = GuiActivator.getMetaContactListService() - .findMetaContactByContact(participant.getContact()); + .findMetaContactByContact(peer.getContact()); byte[] avatar = metaContact.getAvatar(); @@ -209,9 +208,9 @@ private ImageIcon getParticipantImage(CallPeer participant) } // If the icon is still null we try to get an image from the call - // participant. - if (icon == null && participant.getImage() != null) - icon = new ImageIcon(participant.getImage()); + // peer. + if (icon == null && peer.getImage() != null) + icon = new ImageIcon(peer.getImage()); return icon; } diff --git a/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java index 23046bacd..34e0f3060 100755 --- a/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/SecurityPanel.java @@ -19,7 +19,7 @@ public class SecurityPanel extends TransparentPanel { - private final CallPeer participant; + private final CallPeer peer; private final Image iconEncr; private final Image iconEncrVerified; @@ -32,7 +32,7 @@ public class SecurityPanel public SecurityPanel(CallPeer participant) { - this.participant = participant; + this.peer = participant; this.setLayout(new GridLayout(1, 0, 5, 5)); @@ -60,7 +60,7 @@ private void addComponentsToPane() public void actionPerformed(ActionEvent e) { boolean sucess = false; - Call call = participant.getCall(); + Call call = peer.getCall(); if (call != null) { @@ -71,7 +71,7 @@ public void actionPerformed(ActionEvent e) if (secure != null) { - sucess = secure.setSasVerified( participant, + sucess = secure.setSasVerified( peer, !sasVerified); } diff --git a/src/net/java/sip/communicator/service/protocol/event/CallChangeEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallChangeEvent.java index 32673e2eb..6cffba677 100644 --- a/src/net/java/sip/communicator/service/protocol/event/CallChangeEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallChangeEvent.java @@ -30,7 +30,7 @@ public class CallChangeEvent /** * Creates a CallChangeEvent with the specified source, type, oldValue and * newValue. - * @param source the participant that produced the event. + * @param source the peer that produced the event. * @param type the type of the event (the name of the property that has * changed). * @param oldValue the value of the changed property before the event