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 a3ddf28dd3
commit 7b2534a88d

@ -16,15 +16,15 @@
public class SecurityStatusLabel
extends JLabel
{
private final CallPeerPanel callParticipantPanel;
private final CallPeerPanel callPeerPanel;
public SecurityStatusLabel( CallPeerPanel callParticipantPanel,
public SecurityStatusLabel( CallPeerPanel callPeerPanel,
Icon icon,
int alignment)
{
super(icon, alignment);
this.callParticipantPanel = callParticipantPanel;
this.callPeerPanel = callPeerPanel;
this.setToolTipText("Security status");
}
@ -40,7 +40,7 @@ public JToolTip createToolTip()
ImageIcon audioStatusIcon;
String audioStatusString;
if (callParticipantPanel.isAudioSecurityOn())
if (callPeerPanel.isAudioSecurityOn())
{
audioStatusIcon = new ImageIcon(
ImageLoader.getImage(ImageLoader.SECURE_AUDIO_ON));
@ -55,7 +55,7 @@ public JToolTip createToolTip()
ImageIcon videoStatusIcon;
String videoStatusString;
if (callParticipantPanel.isVideoSecurityOn())
if (callPeerPanel.isVideoSecurityOn())
{
videoStatusIcon = new ImageIcon(
ImageLoader.getImage(ImageLoader.SECURE_VIDEO_ON));
@ -68,7 +68,7 @@ public JToolTip createToolTip()
videoStatusString = "Video security off.";
}
String cipher = "Cipher: " + callParticipantPanel.getEncryptionCipher();
String cipher = "Cipher: " + callPeerPanel.getEncryptionCipher();
tip.addLine(audioStatusIcon,
audioStatusString);

@ -368,13 +368,13 @@ public class ImageLoader
= new ImageID("service.gui.buttons.DIEZ_DIAL_BUTTON");
/**
* A dial button icon. The icon shown in the CallParticipant panel.
* A dial button icon. The icon shown in the CallPeer panel.
*/
public static final ImageID DIAL_BUTTON
= new ImageID("service.gui.buttons.DIAL_BUTTON");
/**
* A put-on/off-hold button icon. The icon shown in the CallParticipant
* A put-on/off-hold button icon. The icon shown in the CallPeer
* panel.
*/
public static final ImageID HOLD_BUTTON
@ -393,55 +393,55 @@ public class ImageLoader
= new ImageID("service.gui.icons.MUTE_STATUS_ICON");
/**
* A mute button icon. The icon shown in the CallParticipant panel.
* A mute button icon. The icon shown in the CallPeer panel.
*/
public static final ImageID MUTE_BUTTON
= new ImageID("service.gui.buttons.MUTE_BUTTON");
/**
* A local video button icon. The icon shown in the CallParticipant panel.
* A local video button icon. The icon shown in the CallPeer panel.
*/
public static final ImageID LOCAL_VIDEO_BUTTON
= new ImageID("service.gui.buttons.LOCAL_VIDEO_BUTTON");
/**
* A call-transfer button icon. The icon shown in the CallParticipant panel.
* A call-transfer button icon. The icon shown in the CallPeer panel.
*/
public static final ImageID TRANSFER_CALL_BUTTON =
new ImageID("service.gui.buttons.TRANSFER_CALL_BUTTON");
/**
* The secure button on icon. The icon shown in the CallParticipant panel.
* The secure button on icon. The icon shown in the CallPeer panel.
*/
public static final ImageID SECURE_BUTTON_ON =
new ImageID("service.gui.buttons.SECURE_BUTTON_ON");
/**
* The secure button off icon. The icon shown in the CallParticipant panel.
* The secure button off icon. The icon shown in the CallPeer panel.
*/
public static final ImageID SECURE_BUTTON_OFF =
new ImageID("service.gui.buttons.SECURE_BUTTON_OFF");
/**
* The secure button on icon. The icon shown in the CallParticipant panel.
* The secure button on icon. The icon shown in the CallPeer panel.
*/
public static final ImageID SECURE_AUDIO_ON =
new ImageID("service.gui.buttons.SECURE_AUDIO_ON");
/**
* The secure button off icon. The icon shown in the CallParticipant panel.
* The secure button off icon. The icon shown in the CallPeer panel.
*/
public static final ImageID SECURE_AUDIO_OFF =
new ImageID("service.gui.buttons.SECURE_AUDIO_OFF");
/**
* The secure button on icon. The icon shown in the CallParticipant panel.
* The secure button on icon. The icon shown in the CallPeer panel.
*/
public static final ImageID SECURE_VIDEO_ON =
new ImageID("service.gui.buttons.SECURE_VIDEO_ON");
/**
* The secure button off icon. The icon shown in the CallParticipant panel.
* The secure button off icon. The icon shown in the CallPeer panel.
*/
public static final ImageID SECURE_VIDEO_OFF =
new ImageID("service.gui.buttons.SECURE_VIDEO_OFF");
@ -460,14 +460,14 @@ public class ImageLoader
/**
* The button icon of the Enter Full Screen command. The icon shown in the
* CallParticipant panel.
* CallPeer panel.
*/
public static final ImageID ENTER_FULL_SCREEN_BUTTON =
new ImageID("service.gui.buttons.ENTER_FULL_SCREEN_BUTTON");
/**
* The button icon of the Exit Full Screen command. The icon shown in the
* CallParticipant panel.
* CallPeer panel.
*/
public static final ImageID EXIT_FULL_SCREEN_BUTTON =
new ImageID("service.gui.buttons.EXIT_FULL_SCREEN_BUTTON");
@ -1273,7 +1273,7 @@ public static Image getBytesInImage(byte[] imageBytes)
/**
* Returns the URI corresponding to the image with the given image
* identifier.
*
*
* @param imageID the identifier of the image
* @return the URI corresponding to the image with the given image
* identifier
@ -1299,7 +1299,7 @@ public static String getImageUri(ImageID imageID)
* Obtains the indexed status image for the given protocol provider.
*
* @param pps the protocol provider for which to create the image
*
*
* @return the indexed status image
*/
public static ImageIcon getAccountStatusImage(ProtocolProviderService pps)
@ -1338,7 +1338,7 @@ public static ImageIcon getAccountStatusImage(ProtocolProviderService pps)
/**
* Badges the given protocol image with an index allowing to distinguish
* different accounts from the same protocol.
*
*
* @param image the initial image to badge with an index
* @param pps the protocol provider service corresponding to the account,
* containing the index.

@ -17,7 +17,7 @@
/**
* Imposes the policy to have one call in progress i.e. to put existing calls on
* hold when a new call enters in progress.
*
*
* @author Lubomir Marinov
*/
public class SingleCallInProgressPolicy
@ -42,7 +42,7 @@ private class SingleCallInProgressPolicyListener
/**
* Stops tracking the state of a specific <code>Call</code> and no
* longer tries to put it on hold when it ends.
*
*
* @see CallListener#callEnded(CallEvent)
*/
public void callEnded(CallEvent callEvent)
@ -52,15 +52,14 @@ public void callEnded(CallEvent callEvent)
}
/**
* Does nothing because adding <code>CallParticipant<code>s to
* Does nothing because adding <code>CallPeer<code>s to
* <code>Call</code>s isn't related to the policy to put existing calls
* on hold when a new call becomes in-progress and just implements
* <code>CallChangeListener</code>.
*
*
* @see CallChangeListener#callPeerAdded(CallPeerEvent)
*/
public void callPeerAdded(
CallPeerEvent callParticipantEvent)
public void callPeerAdded( CallPeerEvent callPeerEvent)
{
/*
@ -70,15 +69,14 @@ public void callPeerAdded(
}
/**
* Does nothing because removing <code>CallParticipant<code>s to
* Does nothing because removing <code>CallPeer<code>s to
* <code>Call</code>s isn't related to the policy to put existing calls
* on hold when a new call becomes in-progress and just implements
* <code>CallChangeListener</code>.
*
*
* @see CallChangeListener#callPeerRemoved(CallPeerEvent)
*/
public void callPeerRemoved(
CallPeerEvent callParticipantEvent)
public void callPeerRemoved( CallPeerEvent callPeerEvent)
{
/*
@ -91,7 +89,7 @@ public void callPeerRemoved(
* Upon a <code>Call</code> changing its state to
* <code>CallState.CALL_IN_PROGRESS</code>, puts the other existing
* <code>Call</code>s on hold.
*
*
* @see .CallChangeListener#callStateChanged(CallChangeEvent)
*/
public void callStateChanged(CallChangeEvent callChangeEvent)
@ -103,7 +101,7 @@ public void callStateChanged(CallChangeEvent callChangeEvent)
* Remembers an incoming <code>Call</code> so that it can put the other
* existing <code>Call</code>s on hold when it changes its state to
* <code>CallState.CALL_IN_PROGRESS</code>.
*
*
* @see CallListener#incomingCallReceived(CallEvent)
*/
public void incomingCallReceived(CallEvent callEvent)
@ -116,7 +114,7 @@ public void incomingCallReceived(CallEvent callEvent)
* Remembers an outgoing <code>Call</code> so that it can put the other
* existing <code>Call</code>s on hold when it changes its state to
* <code>CallState.CALL_IN_PROGRESS</code>.
*
*
* @see CallListener#outgoingCallCreated(CallEvent)
*/
public void outgoingCallCreated(CallEvent callEvent)
@ -131,7 +129,7 @@ public void outgoingCallCreated(CallEvent callEvent)
* registers/unregisters in order to take them into account when putting
* existing calls on hold upon a new call entering its in-progress
* state.
*
*
* @param serviceEvent
* the <code>ServiceEvent</code> event describing a change in
* the state of a service registration which may be a
@ -170,7 +168,7 @@ public void serviceChanged(ServiceEvent serviceEvent)
* Initializes a new <code>SingleCallInProgressPolicy</code> instance which
* will apply to the <code>Call</code>s of a specific
* <code>BundleContext</code>.
*
*
* @param bundleContext
* the <code>BundleContext</code> to the
* <code>Call<code>s of which the new policy should apply
@ -185,7 +183,7 @@ public SingleCallInProgressPolicy(BundleContext bundleContext)
/**
* Registers a specific <code>Call</code> with this policy in order to have
* the rules of the latter apply to the former.
*
*
* @param call
* the <code>Call</code> to register with this policy in order to
* have the rules of the latter apply to the former
@ -213,7 +211,7 @@ private void addCallListener(Call call)
* Registers a specific <code>OperationSetBasicTelephony</code> with this
* policy in order to have the rules of the latter apply to the
* <code>Call</code>s created by the former.
*
*
* @param telephony
* the <code>OperationSetBasicTelephony</code> to register with
* this policy in order to have the rules of the latter apply to
@ -229,7 +227,7 @@ private void addOperationSetBasicTelephonyListener(
* Handles changes in the state of a <code>Call</code> this policy applies
* to in order to detect when new calls become in-progress and when the
* other calls should be put on hold.
*
*
* @param callChangeEvent
* a <code>CallChangeEvent</code> value which describes the
* <code>Call</code> and the change in its state
@ -271,7 +269,7 @@ public void dispose()
* to in order to have them or stop having them put the other existing calls
* on hold when the former change their states to
* <code>CallState.CALL_IN_PROGRESS</code>.
*
*
* @param type
* one of {@link CallEvent#CALL_ENDED},
* {@link CallEvent#CALL_INITIATED} and
@ -299,11 +297,11 @@ private void handleCallEvent(int type, CallEvent callEvent)
}
/**
* Puts the <code>CallParticipant</code>s of a specific <code>Call</code> on
* Puts the <code>CallPeer</code>s of a specific <code>Call</code> on
* hold.
*
*
* @param call
* the <code>Call</code> the <code>CallParticipant</code>s of
* the <code>Call</code> the <code>CallPeer</code>s of
* which are to be put on hold
*/
private void putOnHold(Call call)
@ -314,23 +312,23 @@ private void putOnHold(Call call)
if (telephony != null)
{
for (Iterator<CallPeer> participantIter =
call.getCallPeers(); participantIter.hasNext();)
for (Iterator<CallPeer> peerIter =
call.getCallPeers(); peerIter.hasNext();)
{
CallPeer participant = participantIter.next();
CallPeerState participantState = participant.getState();
CallPeer peer = peerIter.next();
CallPeerState peerState = peer.getState();
if (!CallPeerState.DISCONNECTED.equals(participantState)
&& !CallPeerState.FAILED.equals(participantState)
&& !CallPeerState.isOnHold(participantState))
if (!CallPeerState.DISCONNECTED.equals(peerState)
&& !CallPeerState.FAILED.equals(peerState)
&& !CallPeerState.isOnHold(peerState))
{
try
{
telephony.putOnHold(participant);
telephony.putOnHold(peer);
}
catch (OperationFailedException ex)
{
logger.error("Failed to put " + participant
logger.error("Failed to put " + peer
+ " on hold.", ex);
}
}
@ -341,7 +339,7 @@ private void putOnHold(Call call)
/**
* Unregisters a specific <code>Call</code> from this policy in order to
* have the rules of the latter no longer applied to the former.
*
*
* @param call
* the <code>Call</code> to unregister from this policy in order
* to have the rules of the latter no longer apply to the former
@ -360,7 +358,7 @@ private void removeCallListener(Call call)
* Unregisters a specific <code>OperationSetBasicTelephony</code> from this
* policy in order to have the rules of the latter no longer apply to the
* <code>Call</code>s created by the former.
*
*
* @param telephony
* the <code>OperationSetBasicTelephony</code> to unregister from
* this policy in order to have the rules of the latter apply to
@ -377,7 +375,7 @@ private void removeOperationSetBasicTelephonyListener(
* <code>OperationSetBasicTelephony</code> instances in order to apply or
* unapply the rules of this policy to the <code>Call</code>s originating
* from them.
*
*
* @param serviceEvent
* a <code>ServiceEvent</code> value which described a change in
* a OSGi service and which is to be examined for the registering

Loading…
Cancel
Save