Renames occurrences of callParticipant to callPeer so that it would better reflect our new Call architecture that also includes conferencing and ConferenceMembers

cusax-fix
Emil Ivov 17 years ago
parent faeed55b68
commit ca908bebb8

@ -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)

@ -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<CallPeer> participants = call.getCallPeers();
Iterator<CallPeer> 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<CallPeer> participants = call.getCallPeers();
Iterator<CallPeer> peers = call.getCallPeers();
while (participants.hasNext())
while (peers.hasNext())
{
CallPeer participant = participants.next();
CallPeer participant = peers.next();
OperationSetBasicTelephony telephony =
(OperationSetBasicTelephony) pps
.getOperationSet(OperationSetBasicTelephony.class);

@ -121,41 +121,40 @@ private void initComponents()
*/
private void initCallLabel(JLabel callLabel)
{
Iterator<CallPeer> participantsIter
= incomingCall.getCallPeers();
Iterator<CallPeer> 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;
}

@ -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);
}

@ -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

Loading…
Cancel
Save