From 0598e56a0ef2cf450d482005931990b76ad406da Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Sun, 9 Aug 2009 21:38:34 +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 --- .../OperationSetVideoTelephonySipImpl.java | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java index da2f0051e..80279cba0 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java @@ -53,35 +53,35 @@ public OperationSetVideoTelephonySipImpl( } /* - * Delegates to the CallSession of the Call of the specified CallParticipant + * Delegates to the CallSession of the Call of the specified CallPeer * because the video is provided by the CallSession in the SIP protocol * implementation. Because other OperationSetVideoTelephony implementations * may not provide their video through the CallSession, this implementation * promotes itself as the provider of the video by replacing the CallSession * in the VideoEvents it fires. */ - public void addVideoListener(CallPeer participant, + public void addVideoListener(CallPeer peer, VideoListener listener) { if (listener == null) throw new NullPointerException("listener"); - ((CallSipImpl) participant.getCall()).getMediaCallSession() + ((CallSipImpl) peer.getCall()).getMediaCallSession() .addVideoListener( - new InternalVideoListener(this, participant, listener)); + new InternalVideoListener(this, peer, listener)); } /* * Implements OperationSetVideoTelephony#createLocalVisualComponent( - * CallParticipant, VideoListener). Delegates to CallSession#createLocalVisualComponent( - * VideoListener) of the Call of the specified CallParticipant because the + * CallPeer, VideoListener). Delegates to CallSession#createLocalVisualComponent( + * VideoListener) of the Call of the specified CallPeer because the * CallSession manages the visual components which represent local video. */ - public Component createLocalVisualComponent(CallPeer participant, + public Component createLocalVisualComponent(CallPeer peer, VideoListener listener) throws OperationFailedException { CallSession callSession = - ((CallSipImpl) participant.getCall()).getMediaCallSession(); + ((CallSipImpl) peer.getCall()).getMediaCallSession(); if (callSession != null) { @@ -101,50 +101,50 @@ public Component createLocalVisualComponent(CallPeer participant, /* * Implements OperationSetVideoTelephony#disposeLocalVisualComponent( - * CallParticipant, Component). Delegates to CallSession#disposeLocalVisualComponent( - * Component) of the Call of the specified CallParticipant because the + * CallPeer, Component). Delegates to CallSession#disposeLocalVisualComponent( + * Component) of the Call of the specified CallPeer because the * CallSession manages the visual components which represent local video. */ - public void disposeLocalVisualComponent(CallPeer participant, + public void disposeLocalVisualComponent(CallPeer peer, Component component) { CallSession callSession = - ((CallSipImpl) participant.getCall()).getMediaCallSession(); + ((CallSipImpl) peer.getCall()).getMediaCallSession(); if (callSession != null) callSession.disposeLocalVisualComponent(component); } /* - * Delegates to the CallSession of the Call of the specified CallParticipant + * Delegates to the CallSession of the Call of the specified CallPeer * because the video is provided by the CallSession in the SIP protocol * implementation. */ - public Component[] getVisualComponents(CallPeer participant) + public Component[] getVisualComponents(CallPeer peer) { CallSession callSession = - ((CallSipImpl) participant.getCall()).getMediaCallSession(); + ((CallSipImpl) peer.getCall()).getMediaCallSession(); return (callSession != null) ? callSession.getVisualComponents() : new Component[0]; } /* - * Delegates to the CallSession of the Call of the specified CallParticipant + * Delegates to the CallSession of the Call of the specified CallPeer * because the video is provided by the CallSession in the SIP protocol * implementation. Because other OperationSetVideoTelephony implementations * may not provide their video through the CallSession, this implementation * promotes itself as the provider of the video by replacing the CallSession * in the VideoEvents it fires. */ - public void removeVideoListener(CallPeer participant, + public void removeVideoListener(CallPeer peer, VideoListener listener) { if (listener != null) { - ((CallSipImpl) participant.getCall()).getMediaCallSession() + ((CallSipImpl) peer.getCall()).getMediaCallSession() .removeVideoListener( - new InternalVideoListener(this, participant, listener)); + new InternalVideoListener(this, peer, listener)); } } @@ -152,7 +152,7 @@ public void removeVideoListener(CallPeer participant, * Implements OperationSetVideoTelephony#setLocalVideoAllowed(Call, * boolean). Modifies the local media setup to reflect the requested setting * for the streaming of the local video and then re-invites all - * CallParticipants to re-negotiate the modified media setup. + * CallPeers to re-negotiate the modified media setup. */ public void setLocalVideoAllowed(Call call, boolean allowed) throws OperationFailedException @@ -178,31 +178,31 @@ 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. + * CallPeers to re-negotiate the modified media setup. */ - Iterator participants = call.getCallPeers(); - while (participants.hasNext()) + Iterator peers = call.getCallPeers(); + while (peers.hasNext()) { - CallPeerSipImpl participant - = (CallPeerSipImpl) participants.next(); + CallPeerSipImpl peer + = (CallPeerSipImpl) peers.next(); String sdpOffer = null; try { sdpOffer = callSession.createSdpOffer( - participant.getSdpDescription()); + peer.getSdpDescription()); } catch (MediaException ex) { throw new OperationFailedException( - "Failed to create re-invite offer for participant " - + participant, + "Failed to create re-invite offer for peer " + + peer, OperationFailedException.INTERNAL_ERROR, ex); } - basicTelephony.sendInviteRequest(participant, sdpOffer); + basicTelephony.sendInviteRequest(peer, sdpOffer); } } @@ -270,10 +270,10 @@ private static class InternalVideoListener private final VideoListener delegate; /** - * The CallParticipant whose videos {@link #delegate} is + * The CallPeer whose videos {@link #delegate} is * interested in. */ - private final CallPeer participant; + private final CallPeer peer; /** * The OperationSetVideoTelephony which is to be presented @@ -287,12 +287,12 @@ private static class InternalVideoListener * impersonate the sources of VideoEvents with a specific * OperationSetVideoTelephony for a specific * VideoListener interested in the videos of a specific - * CallParticipant. + * CallPeer. * * @param telephony the OperationSetVideoTelephony which is * to be stated as the source of the VideoEvent * sent to the specified delegate VideoListener - * @param participant the CallParticipant whose videos the + * @param peer the CallPeer whose videos the * specified delegate VideoListener is * interested in * @param delegate the VideoListener which shouldn't know @@ -301,20 +301,20 @@ private static class InternalVideoListener * telephony */ public InternalVideoListener(OperationSetVideoTelephony telephony, - CallPeer participant, VideoListener delegate) + CallPeer peer, VideoListener delegate) { - if (participant == null) - throw new NullPointerException("participant"); + if (peer == null) + throw new NullPointerException("peer cannot be null"); this.telephony = telephony; - this.participant = participant; + this.peer = peer; this.delegate = delegate; } /* * Two InternalVideoListeners are equal if they impersonate the sources * of VideoEvents with equal OperationSetVideoTelephonies for equal - * delegate VideoListeners added to equal CallParticipants. + * delegate VideoListeners added to equal CallPeer-s. */ public boolean equals(Object other) { @@ -326,7 +326,7 @@ public boolean equals(Object other) InternalVideoListener otherListener = (InternalVideoListener) other; return otherListener.telephony.equals(telephony) - && otherListener.participant.equals(participant) + && otherListener.peer.equals(peer) && otherListener.delegate.equals(delegate); }