diff options
author | Emil Ivov <emcho@jitsi.org> | 2009-08-09 21:20:49 +0000 |
---|---|---|
committer | Emil Ivov <emcho@jitsi.org> | 2009-08-09 21:20:49 +0000 |
commit | 4884f5a92b9ebda7d9db9bc229bf8c63fb650a99 (patch) | |
tree | 06f1bd22215c4f21749a8534680fa2067daedfc6 /src/net/java/sip/communicator | |
parent | 2cd08f0a854b6f0d5e1cbc7d1caeccce97a0e73d (diff) | |
download | jitsi-4884f5a92b9ebda7d9db9bc229bf8c63fb650a99.zip jitsi-4884f5a92b9ebda7d9db9bc229bf8c63fb650a99.tar.gz jitsi-4884f5a92b9ebda7d9db9bc229bf8c63fb650a99.tar.bz2 |
Renames CallParticipant to CallPeer so that it would better reflect our new Call architecture that also includes conferencing and ConferenceMembers
Diffstat (limited to 'src/net/java/sip/communicator')
52 files changed, 206 insertions, 946 deletions
diff --git a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java index b2c2bbb..b7011fb 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java @@ -846,7 +846,7 @@ public class CallHistoryServiceImpl * Adding a record for joining participant * @param callParticipant CallParticipant */ - private void handleParticipantAdded(CallParticipant callParticipant) + private void handleParticipantAdded(CallPeer callParticipant) { CallRecord callRecord = findCallRecord(callParticipant.getCall()); @@ -854,9 +854,9 @@ public class CallHistoryServiceImpl if(callRecord == null) return; - callParticipant.addCallParticipantListener(new CallParticipantAdapter() + callParticipant.addCallParticipantListener(new CallPeerAdapter() { - public void participantStateChanged(CallParticipantChangeEvent evt) + public void participantStateChanged(CallPeerChangeEvent evt) { if(evt.getNewValue().equals(CallParticipantState.DISCONNECTED)) return; @@ -899,7 +899,7 @@ public class CallHistoryServiceImpl * @param callParticipant CallParticipant * @param srcCall Call */ - private void handleParticipantRemoved(CallParticipant callParticipant, + private void handleParticipantRemoved(CallPeer callParticipant, Call srcCall) { CallRecord callRecord = findCallRecord(srcCall); @@ -947,7 +947,7 @@ public class CallHistoryServiceImpl * @return CallParticipantRecordImpl the corresponding record */ private CallParticipantRecordImpl findParticipantRecord( - CallParticipant callParticipant) + CallPeer callParticipant) { CallRecord record = findCallRecord(callParticipant.getCall()); @@ -980,7 +980,7 @@ public class CallHistoryServiceImpl currentCallRecords.add(newRecord); // if has already perticipants Dispatch them - Iterator<CallParticipant> iter = sourceCall.getCallParticipants(); + Iterator<CallPeer> iter = sourceCall.getCallParticipants(); while (iter.hasNext()) { handleParticipantAdded(iter.next()); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java index 04757c2..caeda06 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallDialog.java @@ -201,8 +201,8 @@ public class CallDialog private DialpadDialog getDialpadDialog()
{
Call call = callPanel.getCall();
- Iterator<CallParticipant> callParticipants =
- (call == null) ? new Vector<CallParticipant>().iterator()
+ Iterator<CallPeer> callParticipants =
+ (call == null) ? new Vector<CallPeer>().iterator()
: callPanel.getCall().getCallParticipants();
return new DialpadDialog(callParticipants);
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 a042a37..67e455b 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 @@ -295,11 +295,11 @@ public class CallManager public void run() { ProtocolProviderService pps = call.getProtocolProvider(); - Iterator<CallParticipant> participants = call.getCallParticipants(); + Iterator<CallPeer> participants = call.getCallParticipants(); while (participants.hasNext()) { - CallParticipant participant = participants.next(); + CallPeer participant = participants.next(); OperationSetBasicTelephony telephony = (OperationSetBasicTelephony) pps .getOperationSet(OperationSetBasicTelephony.class); @@ -333,11 +333,11 @@ public class CallManager public void run() { ProtocolProviderService pps = call.getProtocolProvider(); - Iterator<CallParticipant> participants = call.getCallParticipants(); + Iterator<CallPeer> participants = call.getCallParticipants(); while (participants.hasNext()) { - CallParticipant participant = participants.next(); + CallPeer participant = participants.next(); OperationSetBasicTelephony telephony = (OperationSetBasicTelephony) pps .getOperationSet(OperationSetBasicTelephony.class); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java index 4a7d616..1e7af04 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java @@ -31,15 +31,15 @@ import net.java.sip.communicator.util.swing.*; public class CallPanel extends TransparentPanel implements CallChangeListener, - CallParticipantListener, + CallPeerListener, PropertyChangeListener, CallParticipantSecurityListener { private final TransparentPanel mainPanel = new TransparentPanel(); - private final Hashtable<CallParticipant, CallParticipantPanel> + private final Hashtable<CallPeer, CallParticipantPanel> participantsPanels = - new Hashtable<CallParticipant, CallParticipantPanel>(); + new Hashtable<CallPeer, CallParticipantPanel>(); private String title; @@ -70,7 +70,7 @@ public class CallPanel if (contactsCount > 0) { - CallParticipant participant = + CallPeer participant = call.getCallParticipants().next(); this.title = participant.getDisplayName(); @@ -86,7 +86,7 @@ public class CallPanel * @param callType the type of call - INCOMING of OUTGOING */ private CallParticipantPanel addCallParticipant( - CallParticipant participant, String callType) + CallPeer participant, String callType) { CallParticipantPanel participantPanel = getParticipantPanel(participant); @@ -152,7 +152,7 @@ public class CallPanel { if (evt.getSourceCall() == call) { - CallParticipant participant = evt.getSourceCallParticipant(); + CallPeer participant = evt.getSourceCallParticipant(); CallParticipantPanel participantPanel = getParticipantPanel(participant); @@ -189,9 +189,9 @@ public class CallPanel * Implements the CallParicipantChangeListener.participantStateChanged * method. */ - public void participantStateChanged(CallParticipantChangeEvent evt) + public void participantStateChanged(CallPeerChangeEvent evt) { - CallParticipant sourceParticipant = evt.getSourceCallParticipant(); + CallPeer sourceParticipant = evt.getSourceCallParticipant(); if (sourceParticipant.getCall() != call) return; @@ -258,22 +258,22 @@ public class CallPanel participantPanel.setState(newStateString, newStateIcon); } - public void participantDisplayNameChanged(CallParticipantChangeEvent evt) + public void participantDisplayNameChanged(CallPeerChangeEvent evt) { } - public void participantAddressChanged(CallParticipantChangeEvent evt) + public void participantAddressChanged(CallPeerChangeEvent evt) { } - public void participantImageChanged(CallParticipantChangeEvent evt) + public void participantImageChanged(CallPeerChangeEvent evt) { } public void securityOn(CallParticipantSecurityOnEvent securityEvent) { - CallParticipant participant = - (CallParticipant) securityEvent.getSource(); + CallPeer participant = + (CallPeer) securityEvent.getSource(); CallParticipantPanel participantPanel = getParticipantPanel(participant); @@ -298,8 +298,8 @@ public class CallPanel public void securityOff(CallParticipantSecurityOffEvent securityEvent) { - CallParticipant participant = - (CallParticipant) securityEvent.getSource(); + CallPeer participant = + (CallPeer) securityEvent.getSource(); CallParticipantPanel participantPanel = getParticipantPanel(participant); @@ -343,11 +343,11 @@ public class CallPanel this.mainPanel.removeAll(); this.participantsPanels.clear(); - Iterator<CallParticipant> participants = call.getCallParticipants(); + Iterator<CallPeer> participants = call.getCallParticipants(); while (participants.hasNext()) { - CallParticipant participant = participants.next(); + CallPeer participant = participants.next(); participant.addCallParticipantListener(this); participant.addCallParticipantSecurityListener(this); @@ -366,7 +366,7 @@ public class CallPanel * address. */ public void participantTransportAddressChanged( - CallParticipantChangeEvent evt) + CallPeerChangeEvent evt) { /** @todo implement participantTransportAddressChanged() */ } @@ -377,9 +377,9 @@ public class CallPanel private class RemoveParticipantPanelListener implements ActionListener { - private CallParticipant participant; + private CallPeer participant; - public RemoveParticipantPanelListener(CallParticipant participant) + public RemoveParticipantPanelListener(CallPeer participant) { this.participant = participant; } @@ -425,12 +425,12 @@ public class CallPanel * @return the <tt>CallParticipantPanel</tt>, which correspond to the given * participant */ - public CallParticipantPanel getParticipantPanel(CallParticipant participant) + public CallParticipantPanel getParticipantPanel(CallPeer participant) { - for (Map.Entry<CallParticipant, CallParticipantPanel> participantEntry : + for (Map.Entry<CallPeer, CallParticipantPanel> participantEntry : participantsPanels.entrySet()) { - CallParticipant entryParticipant = participantEntry.getKey(); + CallPeer entryParticipant = participantEntry.getKey(); if ((entryParticipant != null) && entryParticipant.equals(participant)) @@ -484,12 +484,12 @@ public class CallPanel { String propertyName = evt.getPropertyName(); - if (propertyName.equals(CallParticipant.MUTE_PROPERTY_NAME)) + if (propertyName.equals(CallPeer.MUTE_PROPERTY_NAME)) { boolean isMute = (Boolean) evt.getNewValue(); - CallParticipant sourceParticipant - = (CallParticipant) evt.getSource(); + CallPeer sourceParticipant + = (CallPeer) evt.getSource(); if (sourceParticipant.getCall() != call) return; diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java index 5d5d8f3..902c079 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallParticipantPanel.java @@ -56,7 +56,7 @@ public class CallParticipantPanel private final String participantName; - private final CallParticipant callParticipant; + private final CallPeer callParticipant; private final java.util.List<Container> videoContainers = new ArrayList<Container>(); @@ -89,7 +89,7 @@ public class CallParticipantPanel * @param callParticipant a call participant */ public CallParticipantPanel(CallDialog callDialog, - CallParticipant callParticipant) + CallPeer callParticipant) { this.callDialog = callDialog; this.callParticipant = callParticipant; diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java index fb2ff44..63cc949 100755 --- a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java @@ -49,8 +49,8 @@ public class DialPanel GuiActivator.getResources() .getSettingsInt("impl.gui.DIAL_PAD_VERTICAL_GAP"))); - private final java.util.List<CallParticipant> callParticipantsList = - new LinkedList<CallParticipant>(); + private final java.util.List<CallPeer> callParticipantsList = + new LinkedList<CallPeer>(); private MainCallPanel parentCallPanel; @@ -74,7 +74,7 @@ public class DialPanel * @param callParticipants the <tt>CallParticipant</tt>s, for which the * dialpad will be opened. */ - public DialPanel(Iterator<CallParticipant> callParticipants) + public DialPanel(Iterator<CallPeer> callParticipants) { // We need to send DTMF tones to all participants each time the user // presses a dial button, so we put the iterator into a list. @@ -409,14 +409,14 @@ public class DialPanel */ private void sendDtmfTone(DTMFTone dtmfTone) { - Iterator<CallParticipant> callParticipants + Iterator<CallPeer> callParticipants = this.callParticipantsList.iterator(); try { while (callParticipants.hasNext()) { - CallParticipant participant + CallPeer participant = callParticipants.next(); if (participant.getProtocolProvider() diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DialpadDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/DialpadDialog.java index 16ba703..ec6b2b7 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/DialpadDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/DialpadDialog.java @@ -31,7 +31,7 @@ public class DialpadDialog * * @param callParticipants The corresponding call participants. */ - public DialpadDialog(Iterator<CallParticipant> callParticipants) + public DialpadDialog(Iterator<CallPeer> callParticipants) { this.setModal(false); diff --git a/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java b/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java index 7a96bec..5a061f8 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/HoldButton.java @@ -122,12 +122,12 @@ public class HoldButton (OperationSetBasicTelephony) call.getProtocolProvider() .getOperationSet(OperationSetBasicTelephony.class); - Iterator<CallParticipant> participants + Iterator<CallPeer> participants = call.getCallParticipants(); while (participants.hasNext()) { - CallParticipant callParticipant = participants.next(); + CallPeer callParticipant = participants.next(); try { diff --git a/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java b/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java index b05eb19..1c3c626 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/MuteButton.java @@ -112,12 +112,12 @@ public class MuteButton { if (call != null) { - Iterator<CallParticipant> participants + Iterator<CallPeer> participants = call.getCallParticipants(); while (participants.hasNext()) { - CallParticipant callParticipant = participants.next(); + CallPeer callParticipant = participants.next(); OperationSetBasicTelephony telephony = (OperationSetBasicTelephony) call.getProtocolProvider() 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 6177230..99ebadc 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,7 +121,7 @@ public class ReceivedCallDialog */ private void initCallLabel(JLabel callLabel) { - Iterator<CallParticipant> participantsIter + Iterator<CallPeer> participantsIter = incomingCall.getCallParticipants(); boolean hasMoreParticipants = false; @@ -133,7 +133,7 @@ public class ReceivedCallDialog while (participantsIter.hasNext()) { - CallParticipant participant = participantsIter.next(); + CallPeer participant = participantsIter.next(); // More participants. if (participantsIter.hasNext()) @@ -192,7 +192,7 @@ public class ReceivedCallDialog * image. * @return the participant image. */ - private ImageIcon getParticipantImage(CallParticipant participant) + private ImageIcon getParticipantImage(CallPeer participant) { ImageIcon icon = null; // We search for a contact corresponding to this call participant and 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 44875c7..bfe8277 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 @@ import net.java.sip.communicator.util.swing.*; public class SecurityPanel extends TransparentPanel { - private final CallParticipant participant; + private final CallPeer participant; private final Image iconEncr; private final Image iconEncrVerified; @@ -30,7 +30,7 @@ public class SecurityPanel private final JLabel securityStringLabel = new JLabel(); - public SecurityPanel(CallParticipant participant) + public SecurityPanel(CallPeer participant) { this.participant = participant; diff --git a/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java b/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java index 9222efe..867a519 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/TransferCallButton.java @@ -35,7 +35,7 @@ public class TransferCallButton * The <code>CallParticipant</code> (whose <code>Call</code> is) to be * transfered. */ - private final CallParticipant callParticipant; + private final CallPeer callParticipant; /** * Initializes a new <code>TransferCallButton</code> instance which is to @@ -45,7 +45,7 @@ public class TransferCallButton * @param callParticipant the <code>CallParticipant</code> to be associated * with the new instance and to be transfered */ - public TransferCallButton(CallParticipant callParticipant) + public TransferCallButton(CallPeer callParticipant) { super(ImageLoader.getImage(ImageLoader.TRANSFER_CALL_BUTTON)); @@ -137,7 +137,7 @@ public class TransferCallButton { try { - CallParticipant targetParticipant = + CallPeer targetParticipant = findCallParticipant(target); if (targetParticipant == null) @@ -170,17 +170,17 @@ public class TransferCallButton * @param address the address to locate the associated * <code>CallParticipant</code> of */ - private CallParticipant findCallParticipant( + private CallPeer findCallParticipant( OperationSetBasicTelephony telephony, String address) { for (Iterator<Call> callIter = telephony.getActiveCalls(); callIter.hasNext();) { Call call = callIter.next(); - for (Iterator<CallParticipant> participantIter = + for (Iterator<CallPeer> participantIter = call.getCallParticipants(); participantIter.hasNext();) { - CallParticipant participant = participantIter.next(); + CallPeer participant = participantIter.next(); if (address.equals(participant.getAddress())) { @@ -200,7 +200,7 @@ public class TransferCallButton * @return the first <code>CallParticipant</code> among all existing ones * who has the specified <code>address</code> */ - private CallParticipant findCallParticipant(String address) + private CallPeer findCallParticipant(String address) throws OperationFailedException { BundleContext bundleContext = GuiActivator.bundleContext; @@ -221,7 +221,7 @@ public class TransferCallButton Class<OperationSetBasicTelephony> telephonyClass = OperationSetBasicTelephony.class; - CallParticipant participant = null; + CallPeer participant = null; for (ServiceReference serviceReference : serviceReferences) { diff --git a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java index fa7d76a..53f8cf0 100644 --- a/src/net/java/sip/communicator/impl/media/CallSessionImpl.java +++ b/src/net/java/sip/communicator/impl/media/CallSessionImpl.java @@ -1148,14 +1148,14 @@ public class CallSessionImpl * @throws ParseException if sdpAnswerStr does not contain a valid sdp * String. */ - public void processSdpAnswer(CallParticipant responder, + public void processSdpAnswer(CallPeer responder, String sdpAnswerStr) throws MediaException, ParseException { processSdpStr(responder, sdpAnswerStr, true); } - private String processSdpStr(CallParticipant participant, + private String processSdpStr(CallPeer participant, String sdpStr, boolean answer) throws MediaException, ParseException @@ -1291,7 +1291,7 @@ public class CallSessionImpl * @throws ParseException if <tt>sdpOfferStr</tt> does not contain a valid * sdp string. */ - public String processSdpOffer(CallParticipant offerer, String sdpOfferStr) + public String processSdpOffer(CallPeer offerer, String sdpOfferStr) throws MediaException, ParseException { return processSdpStr(offerer, sdpOfferStr, false); diff --git a/src/net/java/sip/communicator/impl/media/transform/zrtp/SecurityEventManager.java b/src/net/java/sip/communicator/impl/media/transform/zrtp/SecurityEventManager.java index 0d64cfb..45a7611 100644 --- a/src/net/java/sip/communicator/impl/media/transform/zrtp/SecurityEventManager.java +++ b/src/net/java/sip/communicator/impl/media/transform/zrtp/SecurityEventManager.java @@ -46,7 +46,7 @@ public class SecurityEventManager extends ZrtpUserCallback .getResources().getI18NString( "impl.media.security.WARNING_NO_EXPECTED_RS_MATCH"); - private CallParticipant callParticipant; + private CallPeer callParticipant; private final CallSession callSession; @@ -90,7 +90,7 @@ public class SecurityEventManager extends ZrtpUserCallback // At this moment we're supporting a security call between only two // participants. In the future the call participant would be passed // as a parameter to the SecurityEventManager. - Iterator<CallParticipant> callParticipants + Iterator<CallPeer> callParticipants = callSession.getCall().getCallParticipants(); while (callParticipants.hasNext()) diff --git a/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java b/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java index 4d80e3d..32a831c 100644 --- a/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java +++ b/src/net/java/sip/communicator/impl/protocol/SingleCallInProgressPolicy.java @@ -314,10 +314,10 @@ public class SingleCallInProgressPolicy if (telephony != null)
{
- for (Iterator<CallParticipant> participantIter =
+ for (Iterator<CallPeer> participantIter =
call.getCallParticipants(); participantIter.hasNext();)
{
- CallParticipant participant = participantIter.next();
+ CallPeer participant = participantIter.next();
CallParticipantState participantState = participant.getState();
if (!CallParticipantState.DISCONNECTED.equals(participantState)
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java index 70ff899..acbaad9 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallJabberImpl.java @@ -24,7 +24,7 @@ import org.jivesoftware.smackx.jingle.*; */ public class CallJabberImpl extends Call - implements CallParticipantListener + implements CallPeerListener { /** * Logger of this class @@ -120,7 +120,7 @@ public class CallJabberImpl * * @param evt unused. */ - public void participantImageChanged(CallParticipantChangeEvent evt) + public void participantImageChanged(CallPeerChangeEvent evt) {} /** @@ -129,7 +129,7 @@ public class CallJabberImpl * * @param evt unused. */ - public void participantAddressChanged(CallParticipantChangeEvent evt) + public void participantAddressChanged(CallPeerChangeEvent evt) {} /** @@ -139,7 +139,7 @@ public class CallJabberImpl * @param evt unused. */ public void participantTransportAddressChanged( - CallParticipantChangeEvent evt) + CallPeerChangeEvent evt) {} @@ -149,7 +149,7 @@ public class CallJabberImpl * * @param evt unused. */ - public void participantDisplayNameChanged(CallParticipantChangeEvent evt) + public void participantDisplayNameChanged(CallPeerChangeEvent evt) {} /** @@ -158,7 +158,7 @@ public class CallJabberImpl * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing * the source event as well as its previous and its new status. */ - public void participantStateChanged(CallParticipantChangeEvent evt) + public void participantStateChanged(CallPeerChangeEvent evt) { if(((CallParticipantState)evt.getNewValue()) == CallParticipantState.DISCONNECTED diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/CallParticipantJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/CallParticipantJabberImpl.java index 8b14c10..5e6c631 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/CallParticipantJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/CallParticipantJabberImpl.java @@ -92,7 +92,7 @@ public class CallParticipantJabberImpl this.participantAddress = address; //Fire the Event fireCallParticipantChangeEvent( - CallParticipantChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE, + CallPeerChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE, oldAddress, address.toString()); } @@ -144,7 +144,7 @@ public class CallParticipantJabberImpl //Fire the Event fireCallParticipantChangeEvent( - CallParticipantChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE, + CallPeerChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE, oldImage, image); } diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java index d6060ae..cc9c7cf 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java @@ -288,7 +288,7 @@ public class OperationSetBasicTelephonyJabberImpl * * @param participant the call participant to put on hold. */ - public void putOffHold(CallParticipant participant) + public void putOffHold(CallPeer participant) { /** @todo implement putOffHold() */ ((CallParticipantJabberImpl) participant).getJingleSession(). @@ -300,7 +300,7 @@ public class OperationSetBasicTelephonyJabberImpl * * @param participant the participant that we'd like to put on hold. */ - public void putOnHold(CallParticipant participant) + public void putOnHold(CallPeer participant) { /** @todo implement putOnHold() */ ((CallParticipantJabberImpl) participant).getJingleSession(). @@ -320,7 +320,7 @@ public class OperationSetBasicTelephonyJabberImpl * // TODO: ask for suppression of OperationFailedException from the interface. * // what happens if hangup fails ? are we forced to continue to talk ? :o) */ - public void hangupCallParticipant(CallParticipant participant) + public void hangupCallParticipant(CallPeer participant) throws ClassCastException, OperationFailedException { CallParticipantJabberImpl callParticipant @@ -348,7 +348,7 @@ public class OperationSetBasicTelephonyJabberImpl * @param participant the call participant that we want to answer * @throws OperationFailedException if we fails to answer */ - public void answerCallParticipant(CallParticipant participant) + public void answerCallParticipant(CallPeer participant) throws OperationFailedException { CallParticipantJabberImpl callParticipant @@ -387,8 +387,8 @@ public class OperationSetBasicTelephonyJabberImpl //go through all call participants and say bye to every one. while (callParticipants.hasNext()) { - CallParticipant participant - = (CallParticipant) callParticipants.next(); + CallPeer participant + = (CallPeer) callParticipants.next(); try { this.hangupCallParticipant(participant); 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 8c2ff84..d3af756 100644 --- a/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java +++ b/src/net/java/sip/communicator/impl/protocol/mock/MockCall.java @@ -17,7 +17,7 @@ import net.java.sip.communicator.util.*; */ public class MockCall extends Call - implements CallParticipantListener + implements CallPeerListener { private static final Logger logger = Logger.getLogger(MockCall.class); @@ -98,7 +98,7 @@ public class MockCall setCallState(CallState.CALL_ENDED); } - public void participantStateChanged(CallParticipantChangeEvent evt) + public void participantStateChanged(CallPeerChangeEvent evt) { if ( ( (CallParticipantState) evt.getNewValue()) == CallParticipantState.DISCONNECTED @@ -116,19 +116,19 @@ public class MockCall } } - public void participantDisplayNameChanged(CallParticipantChangeEvent evt) + public void participantDisplayNameChanged(CallPeerChangeEvent evt) { } - public void participantAddressChanged(CallParticipantChangeEvent evt) + public void participantAddressChanged(CallPeerChangeEvent evt) { } - public void participantImageChanged(CallParticipantChangeEvent evt) + public void participantImageChanged(CallPeerChangeEvent evt) { } - public void participantTransportAddressChanged(CallParticipantChangeEvent + public void participantTransportAddressChanged(CallPeerChangeEvent evt) { } diff --git a/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java b/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java index 96b37d3..1a1bdf6 100644 --- a/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/impl/protocol/mock/MockOperationSetBasicTelephony.java @@ -44,7 +44,7 @@ public class MockOperationSetBasicTelephony * @throws OperationFailedException with the corresponding code if we * encounter an error while performing this operation. */ - public void answerCallParticipant(CallParticipant participant) throws + public void answerCallParticipant(CallPeer participant) throws OperationFailedException { MockCallParticipant callParticipant @@ -128,7 +128,7 @@ public class MockOperationSetBasicTelephony * @throws OperationFailedException with the corresponding code if we * encounter an error while performing this operation. */ - public void hangupCallParticipant(CallParticipant participant) throws + public void hangupCallParticipant(CallPeer participant) throws OperationFailedException { //do nothing if the call is already ended @@ -154,7 +154,7 @@ public class MockOperationSetBasicTelephony * net.java.sip.communicator.service.protocol.OperationSetBasicTelephony * method */ - public void putOffHold(CallParticipant participant) + public void putOffHold(CallPeer participant) { } @@ -169,7 +169,7 @@ public class MockOperationSetBasicTelephony * net.java.sip.communicator.service.protocol.OperationSetBasicTelephony * method */ - public void putOnHold(CallParticipant participant) throws + public void putOnHold(CallPeer participant) throws OperationFailedException { } @@ -199,7 +199,7 @@ public class MockOperationSetBasicTelephony return newCall; } - public CallParticipant addNewCallParticipant(Call call, String address) + public CallPeer addNewCallParticipant(Call call, String address) { MockCallParticipant callPArt = new MockCallParticipant(address, (MockCall)call); diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ActiveCallsRepository.java b/src/net/java/sip/communicator/impl/protocol/sip/ActiveCallsRepository.java index d8c0182..fc79bc3 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/ActiveCallsRepository.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/ActiveCallsRepository.java @@ -194,7 +194,7 @@ public class ActiveCallsRepository if (!callID.equals(call.getCallID())) continue; - for (Iterator<CallParticipant> callParticipantIter = call.getCallParticipants(); + for (Iterator<CallPeer> callParticipantIter = call.getCallParticipants(); callParticipantIter.hasNext();) { CallParticipantSipImpl callParticipant = diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallParticipantSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/CallParticipantSipImpl.java index 76755a5..eba611a 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallParticipantSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallParticipantSipImpl.java @@ -133,7 +133,7 @@ public class CallParticipantSipImpl this.participantAddress = address; //Fire the Event fireCallParticipantChangeEvent( - CallParticipantChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE, + CallPeerChangeEvent.CALL_PARTICIPANT_ADDRESS_CHANGE, oldAddress, address.toString()); } @@ -172,7 +172,7 @@ public class CallParticipantSipImpl //Fire the Event fireCallParticipantChangeEvent( - CallParticipantChangeEvent.CALL_PARTICIPANT_DISPLAY_NAME_CHANGE, + CallPeerChangeEvent.CALL_PARTICIPANT_DISPLAY_NAME_CHANGE, oldName, displayName); } @@ -202,7 +202,7 @@ public class CallParticipantSipImpl //Fire the Event fireCallParticipantChangeEvent( - CallParticipantChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE, + CallPeerChangeEvent.CALL_PARTICIPANT_IMAGE_CHANGE, oldImage, image); } @@ -361,7 +361,7 @@ public class CallParticipantSipImpl this.transportAddress = transportAddress; this.fireCallParticipantChangeEvent( - CallParticipantChangeEvent + CallPeerChangeEvent .CALL_PARTICIPANT_TRANSPORT_ADDRESS_CHANGE, oldTransportAddress, transportAddress); diff --git a/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java index eb62b65..fae2de8 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/CallSipImpl.java @@ -22,7 +22,7 @@ import net.java.sip.communicator.util.*; */ public class CallSipImpl extends Call - implements CallParticipantListener + implements CallPeerListener { private static final Logger logger = Logger.getLogger(CallSipImpl.class); @@ -108,9 +108,9 @@ public class CallSipImpl * * @return an Iterator over all participants currently involved in the call. */ - public Iterator<CallParticipant> getCallParticipants() + public Iterator<CallPeer> getCallParticipants() { - return new LinkedList<CallParticipant>(callParticipants).iterator(); + return new LinkedList<CallPeer>(callParticipants).iterator(); } /** @@ -130,7 +130,7 @@ public class CallSipImpl * * @param evt unused. */ - public void participantImageChanged(CallParticipantChangeEvent evt) + public void participantImageChanged(CallPeerChangeEvent evt) { } @@ -140,7 +140,7 @@ public class CallSipImpl * * @param evt unused. */ - public void participantAddressChanged(CallParticipantChangeEvent evt) + public void participantAddressChanged(CallPeerChangeEvent evt) { } @@ -151,7 +151,7 @@ public class CallSipImpl * @param evt unused. */ public void participantTransportAddressChanged( - CallParticipantChangeEvent evt) + CallPeerChangeEvent evt) { } @@ -161,7 +161,7 @@ public class CallSipImpl * * @param evt unused. */ - public void participantDisplayNameChanged(CallParticipantChangeEvent evt) + public void participantDisplayNameChanged(CallPeerChangeEvent evt) { } @@ -171,7 +171,7 @@ public class CallSipImpl * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing * the source event as well as its previous and its new status. */ - public void participantStateChanged(CallParticipantChangeEvent evt) + public void participantStateChanged(CallPeerChangeEvent evt) { CallParticipantState newState = (CallParticipantState) evt.getNewValue(); @@ -213,7 +213,7 @@ public class CallSipImpl */ public CallParticipantSipImpl findCallParticipant(Dialog dialog) { - Iterator<CallParticipant> callParticipants = this.getCallParticipants(); + Iterator<CallPeer> callParticipants = this.getCallParticipants(); if (logger.isTraceEnabled()) { diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java index 4d04b86..0a2aab9 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java @@ -367,7 +367,7 @@ public class OperationSetBasicTelephonySipImpl * @param participant the call participant to put on hold. * @throws OperationFailedException */ - public synchronized void putOffHold(CallParticipant participant) + public synchronized void putOffHold(CallPeer participant) throws OperationFailedException { putOnHold(participant, false); @@ -379,7 +379,7 @@ public class OperationSetBasicTelephonySipImpl * @param participant the participant that we'd like to put on hold. * @throws OperationFailedException */ - public synchronized void putOnHold(CallParticipant participant) + public synchronized void putOnHold(CallPeer participant) throws OperationFailedException { putOnHold(participant, true); @@ -393,7 +393,7 @@ public class OperationSetBasicTelephonySipImpl * put on hold; <tt>false</tt>, otherwise * @throws OperationFailedException */ - private void putOnHold(CallParticipant participant, boolean on) + private void putOnHold(CallPeer participant, boolean on) throws OperationFailedException { CallSession callSession = @@ -990,7 +990,7 @@ public class OperationSetBasicTelephonySipImpl while (activeCallsIter.hasNext()) { CallSipImpl activeCall = activeCallsIter.next(); - Iterator<CallParticipant> callParticipantsIter = + Iterator<CallPeer> callParticipantsIter = activeCall.getCallParticipants(); while (callParticipantsIter.hasNext()) { @@ -1783,7 +1783,7 @@ public class OperationSetBasicTelephonySipImpl * @throws OperationFailedException * @throws ParseException */ - private void processInviteSendingResponse(CallParticipant participant, + private void processInviteSendingResponse(CallPeer participant, Response response) throws OperationFailedException, ParseException { /* @@ -1829,7 +1829,7 @@ public class OperationSetBasicTelephonySipImpl * @throws OperationFailedException * @throws ParseException */ - private void processInviteSentResponse(CallParticipant participant, + private void processInviteSentResponse(CallPeer participant, Response response) throws OperationFailedException { /* @@ -2612,7 +2612,7 @@ public class OperationSetBasicTelephonySipImpl * CallParticipantSipImpl. * @throws OperationFailedException if we fail to terminate the call. */ - public synchronized void hangupCallParticipant(CallParticipant participant) + public synchronized void hangupCallParticipant(CallPeer participant) throws ClassCastException, OperationFailedException { @@ -2907,7 +2907,7 @@ public class OperationSetBasicTelephonySipImpl * @throws OperationFailedException if we fail to create or send the * response. */ - public synchronized void answerCallParticipant(CallParticipant participant) + public synchronized void answerCallParticipant(CallPeer participant) throws OperationFailedException { CallParticipantSipImpl callParticipant = @@ -3135,13 +3135,13 @@ public class OperationSetBasicTelephonySipImpl { CallSipImpl call = activeCalls.next(); - Iterator<CallParticipant> callParticipants + Iterator<CallPeer> callParticipants = call.getCallParticipants(); // go through all call participants and say bye to every one. while (callParticipants.hasNext()) { - CallParticipant participant = callParticipants.next(); + CallPeer participant = callParticipants.next(); try { this.hangupCallParticipant(participant); @@ -3167,7 +3167,7 @@ public class OperationSetBasicTelephonySipImpl * @param mute <tt>true</tt> to mute the audio stream being sent to * <tt>participant</tt>; otherwise, <tt>false</tt> */ - public void setMute(CallParticipant participant, boolean mute) + public void setMute(CallPeer participant, boolean mute) { CallParticipantSipImpl sipParticipant = (CallParticipantSipImpl) participant; @@ -3185,7 +3185,7 @@ public class OperationSetBasicTelephonySipImpl * @return <code>true</code> to indicate that the call associated with the * given participant is secured, otherwise returns <code>false</code>. */ - public boolean isSecure(CallParticipant participant) + public boolean isSecure(CallPeer participant) { CallSession cs = ((CallSipImpl) participant.getCall()).getMediaCallSession(); @@ -3200,7 +3200,7 @@ public class OperationSetBasicTelephonySipImpl * @param isVerified indicates whether the SAS string is verified or not * for the given participant. */ - public boolean setSasVerified( CallParticipant participant, + public boolean setSasVerified( CallPeer participant, boolean isVerified) { CallSession cs @@ -3220,7 +3220,7 @@ public class OperationSetBasicTelephonySipImpl * <code>participant</code> to * @throws OperationFailedException */ - private void transfer(CallParticipant participant, Address target) + private void transfer(CallPeer participant, Address target) throws OperationFailedException { CallParticipantSipImpl sipParticipant = @@ -3251,7 +3251,7 @@ public class OperationSetBasicTelephonySipImpl * #transfer(net.java.sip.communicator.service.protocol.CallParticipant, * net.java.sip.communicator.service.protocol.CallParticipant) */ - public void transfer(CallParticipant participant, CallParticipant target) + public void transfer(CallPeer participant, CallPeer target) throws OperationFailedException { Address targetAddress = parseAddressString(target.getAddress()); @@ -3303,7 +3303,7 @@ public class OperationSetBasicTelephonySipImpl * #transfer(net.java.sip.communicator.service.protocol.CallParticipant, * String) */ - public void transfer(CallParticipant participant, String target) + public void transfer(CallPeer participant, String target) throws OperationFailedException { transfer(participant, parseAddressString(target)); diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDTMFSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDTMFSipImpl.java index e28c201..8d93c69 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDTMFSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetDTMFSipImpl.java @@ -274,7 +274,7 @@ public class OperationSetDTMFSipImpl * @throws IllegalArgumentException in case the call participant does not * belong to the underlying implementation. */ - public void sendDTMF(CallParticipant callParticipant, DTMFTone tone) + public void sendDTMF(CallPeer callParticipant, DTMFTone tone) throws OperationFailedException, NullPointerException, IllegalArgumentException 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 d6669b7..0325ec7 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java @@ -60,7 +60,7 @@ public class OperationSetVideoTelephonySipImpl * promotes itself as the provider of the video by replacing the CallSession * in the VideoEvents it fires. */ - public void addVideoListener(CallParticipant participant, + public void addVideoListener(CallPeer participant, VideoListener listener) { if (listener == null) @@ -77,7 +77,7 @@ public class OperationSetVideoTelephonySipImpl * VideoListener) of the Call of the specified CallParticipant because the * CallSession manages the visual components which represent local video. */ - public Component createLocalVisualComponent(CallParticipant participant, + public Component createLocalVisualComponent(CallPeer participant, VideoListener listener) throws OperationFailedException { CallSession callSession = @@ -105,7 +105,7 @@ public class OperationSetVideoTelephonySipImpl * Component) of the Call of the specified CallParticipant because the * CallSession manages the visual components which represent local video. */ - public void disposeLocalVisualComponent(CallParticipant participant, + public void disposeLocalVisualComponent(CallPeer participant, Component component) { CallSession callSession = @@ -120,7 +120,7 @@ public class OperationSetVideoTelephonySipImpl * because the video is provided by the CallSession in the SIP protocol * implementation. */ - public Component[] getVisualComponents(CallParticipant participant) + public Component[] getVisualComponents(CallPeer participant) { CallSession callSession = ((CallSipImpl) participant.getCall()).getMediaCallSession(); @@ -137,7 +137,7 @@ public class OperationSetVideoTelephonySipImpl * promotes itself as the provider of the video by replacing the CallSession * in the VideoEvents it fires. */ - public void removeVideoListener(CallParticipant participant, + public void removeVideoListener(CallPeer participant, VideoListener listener) { if (listener != null) @@ -180,7 +180,7 @@ public class OperationSetVideoTelephonySipImpl * Once the local state has been modified, re-invite all * CallParticipants to re-negotiate the modified media setup. */ - Iterator<CallParticipant> participants = call.getCallParticipants(); + Iterator<CallPeer> participants = call.getCallParticipants(); while (participants.hasNext()) { CallParticipantSipImpl participant @@ -273,7 +273,7 @@ public class OperationSetVideoTelephonySipImpl * The <code>CallParticipant</code> whose videos {@link #delegate} is * interested in. */ - private final CallParticipant participant; + private final CallPeer participant; /** * The <code>OperationSetVideoTelephony</code> which is to be presented @@ -301,7 +301,7 @@ public class OperationSetVideoTelephonySipImpl * <code>telephony</code> */ public InternalVideoListener(OperationSetVideoTelephony telephony, - CallParticipant participant, VideoListener delegate) + CallPeer participant, VideoListener delegate) { if (participant == null) throw new NullPointerException("participant"); diff --git a/src/net/java/sip/communicator/plugin/mailbox/Mailbox.java b/src/net/java/sip/communicator/plugin/mailbox/Mailbox.java index 4555c1e..03ea85f 100644 --- a/src/net/java/sip/communicator/plugin/mailbox/Mailbox.java +++ b/src/net/java/sip/communicator/plugin/mailbox/Mailbox.java @@ -581,8 +581,8 @@ public class Mailbox while(participants.hasNext()) { - CallParticipant participant - = (CallParticipant)participants.next(); + CallPeer participant + = (CallPeer)participants.next(); try { @@ -617,8 +617,8 @@ public class Mailbox while(callParticipants.hasNext()) { - CallParticipant participant - = (CallParticipant)callParticipants.next(); + CallPeer participant + = (CallPeer)callParticipants.next(); try { diff --git a/src/net/java/sip/communicator/service/media/CallSession.java b/src/net/java/sip/communicator/service/media/CallSession.java index 5481e2c..b549084 100644 --- a/src/net/java/sip/communicator/service/media/CallSession.java +++ b/src/net/java/sip/communicator/service/media/CallSession.java @@ -183,7 +183,7 @@ public interface CallSession * @throws ParseException if <tt>sdpOfferStr</tt> does not contain a valid * sdp string. */ - public String processSdpOffer(CallParticipant offerer, String sdpOffer) + public String processSdpOffer(CallPeer offerer, String sdpOffer) throws MediaException, ParseException; /** @@ -198,7 +198,7 @@ public interface CallSession * @throws ParseException if <tt>sdpAnswerStr</tt> does not contain a valid * sdp string. */ - public void processSdpAnswer(CallParticipant responder, String sdpAnswer) + public void processSdpAnswer(CallPeer responder, String sdpAnswer) throws MediaException, ParseException; /** diff --git a/src/net/java/sip/communicator/service/media/event/MediaEvent.java b/src/net/java/sip/communicator/service/media/event/MediaEvent.java index 5735f9b..afd0048 100644 --- a/src/net/java/sip/communicator/service/media/event/MediaEvent.java +++ b/src/net/java/sip/communicator/service/media/event/MediaEvent.java @@ -16,7 +16,7 @@ import net.java.sip.communicator.service.protocol.*; public class MediaEvent extends java.util.EventObject { - CallParticipant callParticipant; + CallPeer callParticipant; /** * Remote user involved in the event. diff --git a/src/net/java/sip/communicator/service/protocol/AbstractCallParticipant.java b/src/net/java/sip/communicator/service/protocol/AbstractCallParticipant.java index b87df46..d9fc4e0 100644 --- a/src/net/java/sip/communicator/service/protocol/AbstractCallParticipant.java +++ b/src/net/java/sip/communicator/service/protocol/AbstractCallParticipant.java @@ -22,7 +22,7 @@ import net.java.sip.communicator.util.*; */ public abstract class AbstractCallParticipant extends PropertyChangeNotifier - implements CallParticipant + implements CallPeer { private static final Logger logger = Logger.getLogger(AbstractCallParticipant.class); @@ -38,8 +38,8 @@ public abstract class AbstractCallParticipant /** * All the CallParticipant listeners registered with this CallParticipant. */ - protected final List<CallParticipantListener> callParticipantListeners - = new ArrayList<CallParticipantListener>(); + protected final List<CallPeerListener> callParticipantListeners + = new ArrayList<CallPeerListener>(); /** * All the CallParticipantSecurityListener-s registered with this @@ -88,7 +88,7 @@ public abstract class AbstractCallParticipant * receiving CallParticipantEvents * @param listener a listener instance to register with this participant. */ - public void addCallParticipantListener(CallParticipantListener listener) + public void addCallParticipantListener(CallPeerListener listener) { if (listener == null) return; @@ -103,7 +103,7 @@ public abstract class AbstractCallParticipant * Unregisters the specified listener. * @param listener the listener to unregister. */ - public void removeCallParticipantListener(CallParticipantListener listener) + public void removeCallParticipantListener(CallPeerListener listener) { if (listener == null) return; @@ -182,38 +182,38 @@ public abstract class AbstractCallParticipant Object newValue, String reason) { - CallParticipantChangeEvent evt = new CallParticipantChangeEvent( + CallPeerChangeEvent evt = new CallPeerChangeEvent( this, eventType, oldValue, newValue, reason); logger.debug("Dispatching a CallParticipantChangeEvent event to " + callParticipantListeners.size() +" listeners. event is: " + evt.toString()); - Iterator<CallParticipantListener> listeners = null; + Iterator<CallPeerListener> listeners = null; synchronized (callParticipantListeners) { - listeners = new ArrayList<CallParticipantListener>( + listeners = new ArrayList<CallPeerListener>( callParticipantListeners).iterator(); } while (listeners.hasNext()) { - CallParticipantListener listener - = (CallParticipantListener) listeners.next(); + CallPeerListener listener + = (CallPeerListener) listeners.next(); - if(eventType.equals(CallParticipantChangeEvent + if(eventType.equals(CallPeerChangeEvent .CALL_PARTICIPANT_ADDRESS_CHANGE)) { listener.participantAddressChanged(evt); - } else if(eventType.equals(CallParticipantChangeEvent + } else if(eventType.equals(CallPeerChangeEvent .CALL_PARTICIPANT_DISPLAY_NAME_CHANGE)) { listener.participantDisplayNameChanged(evt); - } else if(eventType.equals(CallParticipantChangeEvent + } else if(eventType.equals(CallPeerChangeEvent .CALL_PARTICIPANT_IMAGE_CHANGE)) { listener.participantImageChanged(evt); - } else if(eventType.equals(CallParticipantChangeEvent + } else if(eventType.equals(CallPeerChangeEvent .CALL_PARTICIPANT_STATE_CHANGE)) { listener.participantStateChanged(evt); @@ -401,7 +401,7 @@ public abstract class AbstractCallParticipant } fireCallParticipantChangeEvent( - CallParticipantChangeEvent.CALL_PARTICIPANT_STATE_CHANGE, + CallPeerChangeEvent.CALL_PARTICIPANT_STATE_CHANGE, oldState, newState); } @@ -426,7 +426,7 @@ public abstract class AbstractCallParticipant * @return the time at which this <code>CallParticipant</code> transitioned * into a state marking the start of the duration of the * participation in a <code>Call</code> or - * {@link CallParticipant#CALL_DURATION_START_TIME_UNKNOWN} if such + * {@link CallPeer#CALL_DURATION_START_TIME_UNKNOWN} if such * a transition has not been performed */ public long getCallDurationStartTime() @@ -476,9 +476,9 @@ public abstract class AbstractCallParticipant this.conferenceFocus = conferenceFocus; fireCallParticipantConferenceEvent( - new CallParticipantConferenceEvent( + new CallPeerConferenceEvent( this, - CallParticipantConferenceEvent.CONFERENCE_FOCUS_CHANGED)); + CallPeerConferenceEvent.CONFERENCE_FOCUS_CHANGED)); } } @@ -540,9 +540,9 @@ public abstract class AbstractCallParticipant conferenceMembers.add(conferenceMember); } fireCallParticipantConferenceEvent( - new CallParticipantConferenceEvent( + new CallPeerConferenceEvent( this, - CallParticipantConferenceEvent.CONFERENCE_MEMBER_ADDED, + CallPeerConferenceEvent.CONFERENCE_MEMBER_ADDED, conferenceMember)); } @@ -570,9 +570,9 @@ public abstract class AbstractCallParticipant return; } fireCallParticipantConferenceEvent( - new CallParticipantConferenceEvent( + new CallPeerConferenceEvent( this, - CallParticipantConferenceEvent.CONFERENCE_MEMBER_REMOVED, + CallPeerConferenceEvent.CONFERENCE_MEMBER_REMOVED, conferenceMember)); } @@ -617,7 +617,7 @@ public abstract class AbstractCallParticipant * carrying the event data */ protected void fireCallParticipantConferenceEvent( - CallParticipantConferenceEvent conferenceEvent) + CallPeerConferenceEvent conferenceEvent) { CallParticipantConferenceListener[] listeners; @@ -635,13 +635,13 @@ public abstract class AbstractCallParticipant for (CallParticipantConferenceListener listener : listeners) switch (eventID) { - case CallParticipantConferenceEvent.CONFERENCE_FOCUS_CHANGED: + case CallPeerConferenceEvent.CONFERENCE_FOCUS_CHANGED: listener.conferenceFocusChanged(conferenceEvent); break; - case CallParticipantConferenceEvent.CONFERENCE_MEMBER_ADDED: + case CallPeerConferenceEvent.CONFERENCE_MEMBER_ADDED: listener.conferenceMemberAdded(conferenceEvent); break; - case CallParticipantConferenceEvent.CONFERENCE_MEMBER_REMOVED: + case CallPeerConferenceEvent.CONFERENCE_MEMBER_REMOVED: listener.conferenceMemberRemoved(conferenceEvent); break; } diff --git a/src/net/java/sip/communicator/service/protocol/AbstractConferenceMember.java b/src/net/java/sip/communicator/service/protocol/AbstractConferenceMember.java index a84565d..e98e0a5 100644 --- a/src/net/java/sip/communicator/service/protocol/AbstractConferenceMember.java +++ b/src/net/java/sip/communicator/service/protocol/AbstractConferenceMember.java @@ -23,7 +23,7 @@ public class AbstractConferenceMember * The <code>CallParticipant</code> which is the conference focus of this * <code>ConferenceMember</code>. */ - private final CallParticipant conferenceFocusCallParticipant; + private final CallPeer conferenceFocusCallParticipant; /** * The user-friendly display name of this <code>ConferenceMember</code> in @@ -38,7 +38,7 @@ public class AbstractConferenceMember private ConferenceMemberState state = ConferenceMemberState.UNKNOWN; public AbstractConferenceMember( - CallParticipant conferenceFocusCallParticipant) + CallPeer conferenceFocusCallParticipant) { this.conferenceFocusCallParticipant = conferenceFocusCallParticipant; } @@ -46,7 +46,7 @@ public class AbstractConferenceMember /* * Implements ConferenceMember#getConferenceFocusCallParticipant(). */ - public CallParticipant getConferenceFocusCallParticipant() + public CallPeer getConferenceFocusCallParticipant() { return conferenceFocusCallParticipant; } diff --git a/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java index ce417c9..719f7c9 100644 --- a/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java @@ -109,7 +109,7 @@ public abstract class AbstractOperationSetBasicTelephony * @param mute <tt>true</tt> to mute the audio stream being sent to * <tt>participant</tt>; otherwise, <tt>false</tt> */ - public void setMute(CallParticipant participant, boolean mute) + public void setMute(CallPeer participant, boolean mute) { /* diff --git a/src/net/java/sip/communicator/service/protocol/Call.java b/src/net/java/sip/communicator/service/protocol/Call.java index c10aba4..cb2d051 100644 --- a/src/net/java/sip/communicator/service/protocol/Call.java +++ b/src/net/java/sip/communicator/service/protocol/Call.java @@ -123,7 +123,7 @@ public abstract class Call * Returns an iterator over all call participants. * @return an Iterator over all participants currently involved in the call. */ - public abstract Iterator<CallParticipant> getCallParticipants(); + public abstract Iterator<CallPeer> getCallParticipants(); /** * Returns the number of participants currently associated with this call. @@ -180,7 +180,7 @@ public abstract class Call * newly created event. * @param eventID the ID of the event to create (see CPE member ints) */ - protected void fireCallParticipantEvent(CallParticipant sourceCallParticipant, + protected void fireCallParticipantEvent(CallPeer sourceCallParticipant, int eventID) { CallParticipantEvent cpEvent = new CallParticipantEvent( diff --git a/src/net/java/sip/communicator/service/protocol/CallParticipant.java b/src/net/java/sip/communicator/service/protocol/CallParticipant.java deleted file mode 100644 index 186adb7..0000000 --- a/src/net/java/sip/communicator/service/protocol/CallParticipant.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.service.protocol; - -import java.net.*; - -import net.java.sip.communicator.service.protocol.event.*; -import net.java.sip.communicator.util.*; - -/** - * The CallParticipant is an interface that represents participants in a call. - * Users of the PhoneUIService need to implement this interface (or one of its - * default implementations such DefaultCallParticipant) in order to be able to - * register call participant in the user interface. - * - * <p>For SIP calls for example, it would be necessary to create a - * SipCallParticipant class that would provide sip specific implementations of - * various methods (getAddress() for example would return the participant's sip - * URI). - * - * @author Emil Ivov - * @author Lubomir Marinov - */ -public interface CallParticipant -{ - - /** - * The constant indicating that a <code>CallParticipant</code> has not yet - * transitioned into a state marking the beginning of a participation in a - * <code>Call</code> or that such a transition may have happened but the - * time of its occurrence is unknown. - */ - public static final long CALL_DURATION_START_TIME_UNKNOWN = 0; - - /** - * The mute property name. - */ - public static final String MUTE_PROPERTY_NAME = "Mute"; - - /** - * Returns a unique identifier representing this participant. Identifiers - * returned by this method should remain unique across calls. In other - * words, if it returned the value of "A" for a given participant it should - * not return that same value for any other participant and return a - * different value even if the same person (address) is participating in - * another call. Values need not remain unique after restarting the program. - * - * @return an identifier representing this call participant. - */ - public String getParticipantID(); - - /** - * Returns a reference to the call that this participant belongs to. - * @return a reference to the call containing this participant. - */ - public Call getCall(); - - /** - * Returns a human readable name representing this participant. - * @return a String containing a name for that participant. - */ - public String getDisplayName(); - - /** - * Returns a String locator for that participant. A locator might be a SIP - * URI, an IP address or a telephone number. - * @return the participant's address or phone number. - */ - public String getAddress(); - - /** - * Returns an object representing the current state of that participant. - * CallParticipantState may vary among CONNECTING, RINGING, CALLING, BUSY, - * CONNECTED, and others, and it reflects the state of the connection between - * us and that participant. - * @return a CallParticipantState instance representing the participant's - * state. - */ - public CallParticipantState getState(); - - /** - * Allows the user interface to register a listener interested in changes - * @param listener a listener instance to register with this participant. - */ - public void addCallParticipantListener(CallParticipantListener listener); - - /** - * Unregisters the specified listener. - * @param listener the listener to unregister. - */ - public void removeCallParticipantListener(CallParticipantListener listener); - - /** - * Allows the user interface to register a listener interested in security - * status changes. - * - * @param listener a listener instance to register with this participant - */ - public void addCallParticipantSecurityListener( - CallParticipantSecurityListener listener); - - /** - * Unregisters the specified listener. - * - * @param listener the listener to unregister - */ - public void removeCallParticipantSecurityListener( - CallParticipantSecurityListener listener); - - /** - * Allows the user interface to register a listener interested in property - * changes. - * @param listener a property change listener instance to register with this - * participant. - */ - public void addPropertyChangeListener(PropertyChangeListener listener); - - /** - * Unregisters the specified property change listener. - * - * @param listener the property change listener to unregister. - */ - public void removePropertyChangeListener(PropertyChangeListener listener); - - /** - * Gets the time at which this <code>CallParticipant</code> transitioned - * into a state (likely {@link CallParticipantState#CONNECTED}) marking the - * start of the duration of the participation in a <code>Call</code>. - * - * @return the time at which this <code>CallParticipant</code> transitioned - * into a state marking the start of the duration of the - * participation in a <code>Call</code> or - * {@link #CALL_DURATION_START_TIME_UNKNOWN} if such a transition - * has not been performed - */ - long getCallDurationStartTime(); - - /** - * Returns a string representation of the participant in the form of - * <br> - * Display Name <address>;status=CallParticipantStatus - * @return a string representation of the participant and its state. - */ - public String toString(); - - /** - * The method returns an image representation of the call participant (e.g. - * a photo). Generally, the image representation is acquired from the - * underlying telephony protocol and is transferred over the network during - * call negotiation. - * @return byte[] a byte array containing the image or null if no image is - * available. - */ - public byte[] getImage(); - - /** - * Returns the protocol provider that this participant belongs to. - * @return a reference to the ProtocolProviderService that this participant - * belongs to. - */ - public ProtocolProviderService getProtocolProvider(); - - /** - * Returns the contact corresponding to this participant or null if no - * particular contact has been associated. - * <p> - * @return the <tt>Contact</tt> corresponding to this participant or null - * if no particular contact has been associated. - */ - public Contact getContact(); - - /** - * Returns a URL pointing to a location with call control information or - * null if such an URL is not available for the current call participant. - * - * @return a URL link to a location with call information or a call control - * web interface related to this participant or <tt>null</tt> if no such URL - * is available. - */ - public URL getCallInfoURL(); - - /** - * Determines whether the audio stream (if any) being sent to this - * participant is mute. - * - * @return <tt>true</tt> if an audio stream is being sent to this - * participant and it is currently mute; <tt>false</tt>, otherwise - */ - public boolean isMute(); - - /** - * Determines whether this participant is acting as a conference focus and - * thus may provide information about <code>ConferenceMember</code> such as - * {@link #getConferenceMembers()} and {@link #getConferenceMemberCount()}. - * - * @return <tt>true</tt> if this participant is acting as a conference - * focus; <tt>false</tt>, otherwise - */ - public boolean isConferenceFocus(); - - /** - * Gets the <code>ConferenceMember</code>s currently known to this - * participant if it is acting as a conference focus. - * - * @return an array of <code>ConferenceMember</code>s describing the members - * of a conference managed by this participant if it is acting as a - * conference focus. If this participant is not acting as a - * conference focus or it does but there are currently no members in - * the conference it manages, an empty array is returned. - */ - public ConferenceMember[] getConferenceMembers(); - - /** - * Gets the number of <code>ConferenceMember</code>s currently known to this - * participant if it is acting as a conference focus. - * - * @return the number of <code>ConferenceMember</code>s currently known to - * this participant if it is acting as a conference focus. If this - * participant is not acting as a conference focus or it does but - * there are currently no members in the conference it manages, a - * value of zero is returned. - */ - public int getConferenceMemberCount(); - - /** - * Adds a specific <code>CallParticipantConferenceListener</code> to the - * list of listeners interested in and notified about changes in - * conference-related information such as this participant acting or not - * acting as a conference focus and conference membership details. - * - * @param listener - * a <code>CallParticipantConferenceListener</code> to be - * notified about changes in conference-related information. If - * the specified listener is already in the list of interested - * listeners (i.e. it has been previously added), it is not added - * again. - */ - public void addCallParticipantConferenceListener( - CallParticipantConferenceListener listener); - - /** - * Removes a specific <code>CallParticipantConferenceListener</code> from - * the list of listeners interested in and notified about changes in - * conference-related information such as this participant acting or not - * acting as a conference focus and conference membership details. - * - * @param listener - * a <code>CallParticipantConferenceListener</code> to no longer - * be notified about changes in conference-related information - */ - public void removeCallParticipantConferenceListener( - CallParticipantConferenceListener listener); -} diff --git a/src/net/java/sip/communicator/service/protocol/ConferenceMember.java b/src/net/java/sip/communicator/service/protocol/ConferenceMember.java index fb55852..27d9081 100644 --- a/src/net/java/sip/communicator/service/protocol/ConferenceMember.java +++ b/src/net/java/sip/communicator/service/protocol/ConferenceMember.java @@ -63,7 +63,7 @@ public interface ConferenceMember * @return the <code>CallParticipant</code> which is the conference focus of * this <code>ConferenceMember</code> */ - public CallParticipant getConferenceFocusCallParticipant(); + public CallPeer getConferenceFocusCallParticipant(); /** * Gets the state of the device and signaling session of this diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetAdvancedTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetAdvancedTelephony.java index 2b335ab..c657e3f 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetAdvancedTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetAdvancedTelephony.java @@ -31,7 +31,7 @@ public interface OperationSetAdvancedTelephony * the callee to transfer <code>participant</code> to * @throws OperationFailedException */ - void transfer(CallParticipant participant, CallParticipant target) + void transfer(CallPeer participant, CallPeer target) throws OperationFailedException; /** @@ -49,6 +49,6 @@ public interface OperationSetAdvancedTelephony * <code>participant</code> to * @throws OperationFailedException */ - void transfer(CallParticipant participant, String target) + void transfer(CallPeer participant, String target) throws OperationFailedException; } diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java index c8bba6b..b16741c 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java @@ -79,7 +79,7 @@ public interface OperationSetBasicTelephony * @throws OperationFailedException with the corresponding code if we * encounter an error while performing this operation. */ - public void answerCallParticipant(CallParticipant participant) + public void answerCallParticipant(CallPeer participant) throws OperationFailedException; /** @@ -90,7 +90,7 @@ public interface OperationSetBasicTelephony * @throws OperationFailedException with the corresponding code if we * encounter an error while performing this operation. */ - public void putOnHold(CallParticipant participant) + public void putOnHold(CallPeer participant) throws OperationFailedException; /** @@ -102,7 +102,7 @@ public interface OperationSetBasicTelephony * @throws OperationFailedException with the corresponding code if we * encounter an error while performing this operation */ - public void putOffHold(CallParticipant participant) + public void putOffHold(CallPeer participant) throws OperationFailedException; /** @@ -112,7 +112,7 @@ public interface OperationSetBasicTelephony * @throws OperationFailedException with the corresponding code if we * encounter an error while performing this operation. */ - public void hangupCallParticipant(CallParticipant participant) + public void hangupCallParticipant(CallPeer participant) throws OperationFailedException; /** @@ -134,5 +134,5 @@ public interface OperationSetBasicTelephony * @param mute <tt>true</tt> to mute the audio stream being sent to * <tt>participant</tt>; otherwise, <tt>false</tt> */ - public void setMute(CallParticipant participant, boolean mute); + public void setMute(CallPeer participant, boolean mute); } diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetCallTransfer.java b/src/net/java/sip/communicator/service/protocol/OperationSetCallTransfer.java index fcba14d..d9f4a49 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetCallTransfer.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetCallTransfer.java @@ -22,6 +22,6 @@ public interface OperationSetCallTransfer * @param targetURI the uri that we'd like this call participant to be * transferred to. */ - public void transferCallParticipant(CallParticipant participant, + public void transferCallParticipant(CallPeer participant, String targetURI); } diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetDTMF.java b/src/net/java/sip/communicator/service/protocol/OperationSetDTMF.java index de9c5f1..ff5b062 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetDTMF.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetDTMF.java @@ -30,7 +30,7 @@ public interface OperationSetDTMF * @throws IllegalArgumentException in case the call participant does not * belong to the underlying implementation. */ - public void sendDTMF(CallParticipant callParticipant, DTMFTone tone) + public void sendDTMF(CallPeer callParticipant, DTMFTone tone) throws OperationFailedException, NullPointerException, ClassCastException; diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java index 3d46154..9778f06 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetSecureTelephony.java @@ -23,7 +23,7 @@ public interface OperationSetSecureTelephony * @param participant the participant for who the call state is required * @return the call state */ - public boolean isSecure(CallParticipant participant); + public boolean isSecure(CallPeer participant); /** * Sets the SAS verifications state of the call session in which a specific participant @@ -34,5 +34,5 @@ public interface OperationSetSecureTelephony * @param verified the new SAS verification status * @param source the source who generated the call change */ - public boolean setSasVerified(CallParticipant participant, boolean verified); + public boolean setSasVerified(CallPeer participant, boolean verified); } diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetTelephonyConferencing.java b/src/net/java/sip/communicator/service/protocol/OperationSetTelephonyConferencing.java index 00b8233..d67733b 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetTelephonyConferencing.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetTelephonyConferencing.java @@ -44,6 +44,6 @@ public interface OperationSetTelephonyConferencing * if allowing additional callees to a pre-established call is * not supported. */ - public CallParticipant inviteCalleeToCall(String uri, Call existingCall) + public CallPeer inviteCalleeToCall(String uri, Call existingCall) throws OperationNotSupportedException; } diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java index dd7ac67..e7975f6 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetVideoTelephony.java @@ -35,13 +35,13 @@ public interface OperationSetVideoTelephony * removed for <code>participant</code> */ public void addVideoListener( - CallParticipant participant, VideoListener listener); + CallPeer participant, VideoListener listener); /** * Creates a visual <code>Component</code> which depicts the local video * being streamed to a specific <code>CallParticipant</code>. The returned * visual <code>Component</code> should be disposed when it is no longer - * required through {@link #disposeLocalVisualComponent(CallParticipant, Component) disposeLocalVisualComponent}. + * required through {@link #disposeLocalVisualComponent(CallPeer, Component) disposeLocalVisualComponent}. * * @param participant the <code>CallParticipant</code> to whom the local * video which is to be depicted by the returned visual @@ -58,7 +58,7 @@ public interface OperationSetVideoTelephony * visual <code>Component</code> asynchronously. */ public Component createLocalVisualComponent( - CallParticipant participant, VideoListener listener) + CallPeer participant, VideoListener listener) throws OperationFailedException; /** @@ -75,7 +75,7 @@ public interface OperationSetVideoTelephony * video to be disposed */ public void disposeLocalVisualComponent( - CallParticipant participant, Component component); + CallPeer participant, Component component); /** * Gets the visual/video <code>Component</code>s available in this telephony @@ -86,7 +86,7 @@ public interface OperationSetVideoTelephony * @return an array of the visual <code>Component</code>s available in this * telephony for the specified <code>participant</code> */ - public Component[] getVisualComponents(CallParticipant participant); + public Component[] getVisualComponents(CallPeer participant); /** * Removes a specific <code>VideoListener</code> from this telephony in @@ -101,7 +101,7 @@ public interface OperationSetVideoTelephony * removed for <code>participant</code> */ public void removeVideoListener( - CallParticipant participant, VideoListener listener); + CallPeer participant, VideoListener listener); /** * Sets the indicator which determines whether the streaming of local video diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantAdapter.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantAdapter.java deleted file mode 100644 index e61197e..0000000 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantAdapter.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.service.protocol.event; - -/** - * An abstract adapter class for receiving call participant (change) events. - * This class exists only as a convenience for creating listener objects. - * <p> - * Extend this class to create a <tt>CallParticipantChangeEvent</tt> listener - * and override the methods for the events of interest. (If you implement the - * <tt>CallParticipantListener</tt> interface, you have to define all of the - * methods in it. This abstract class defines null methods for them all, so you - * only have to define methods for events you care about.) - * </p> - * - * @see CallParticipantChangeEvent - * @see CallParticipantListener - * - * @author Lubomir Marinov - */ -public abstract class CallParticipantAdapter - implements CallParticipantListener -{ - - /** - * Indicates that a change has occurred in the address of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new address. - */ - public void participantAddressChanged(CallParticipantChangeEvent evt) - { - } - - /** - * Indicates that a change has occurred in the display name of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new display - * names. - */ - public void participantDisplayNameChanged(CallParticipantChangeEvent evt) - { - } - - /** - * Indicates that a change has occurred in the image of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new image. - */ - public void participantImageChanged(CallParticipantChangeEvent evt) - { - } - - /** - * Indicates that a change has occurred in the status of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new status. - */ - public void participantStateChanged(CallParticipantChangeEvent evt) - { - } - - /** - * Indicates that a change has occurred in the transport address that we use - * to communicate with the participant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new transport - * address. - */ - public void participantTransportAddressChanged( - CallParticipantChangeEvent evt) - { - } -} diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantChangeEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantChangeEvent.java deleted file mode 100644 index dc482d4..0000000 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantChangeEvent.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.service.protocol.event; - -import net.java.sip.communicator.service.protocol.*; - -/** - * CallParticipantChangeEvent-s are triggerred whenever a change occurs in a - * CallParticipant. Dispatched events may be of one of the following types. - * <p> - * CALL_PARTICIPANT_STATUS_CHANGE - indicates a change in the status of the - * participant. - * <p> - * CALL_PARTICIPANT_DISPLAY_NAME_CHANGE - means that participant's displayName - * has changed - * <p> - * CALL_PARTICIPANT_ADDRESS_CHANGE - means that participant's address has - * changed. - * <p> - * CALL_PARTICIPANT_ADDRESS_CHANGE - means that the transport address of the - * participant (the one that we use to communicate with her) has changed. - * <p> - * CALL_PARTICIPANT_IMAGE_CHANGE - participant updated photo. - * <p> - * - * @author Emil Ivov - */ -public class CallParticipantChangeEvent - extends java.beans.PropertyChangeEvent -{ - /** - * An event type indicating that the corresponding event is caused by a - * change of the CallParticipant's status. - */ - public static final String CALL_PARTICIPANT_STATE_CHANGE = - "CallParticipantStatusChange"; - - /** - * An event type indicating that the corresponding event is caused by a - * change of the participant's display name. - */ - public static final String CALL_PARTICIPANT_DISPLAY_NAME_CHANGE = - "CallParticipantDisplayNameChange"; - - /** - * An event type indicating that the corresponding event is caused by a - * change of the participant's address. - */ - public static final String CALL_PARTICIPANT_ADDRESS_CHANGE = - "CallParticipantAddressChange"; - - /** - * An event type indicating that the corresponding event is caused by a - * change of the participant's address. - */ - public static final String CALL_PARTICIPANT_TRANSPORT_ADDRESS_CHANGE = - "CallParticipantAddressChange"; - - /** - * An event type indicating that the corresponding event is caused by a - * change of the participant's photo/picture. - */ - public static final String CALL_PARTICIPANT_IMAGE_CHANGE = - "CallParticipantImageChange"; - - /** - * A reason string further explaining the event (may be null). The string - * would be mostly used for events issued upon a CallParticipantState - * transition that has led to a FAILED state. - */ - private final String reason; - - /** - * Creates a CallParticipantChangeEvent with the specified source, type, - * oldValue and newValue. - * @param source the participant that produced the event. - * @param type the type of the event (i.e. address change, state change etc.). - * @param oldValue the value of the changed property before the event occurred - * @param newValue current value of the changed property. - */ - public CallParticipantChangeEvent(CallParticipant source, - String type, - Object oldValue, - Object newValue) - { - this(source, type, oldValue, newValue, null); - } - - /** - * Creates a CallParticipantChangeEvent with the specified source, type, - * oldValue and newValue. - * @param source the participant that produced the event. - * @param type the type of the event (i.e. address change, state change etc.). - * @param oldValue the value of the changed property before the event occurred - * @param newValue current value of the changed property. - * @param reason a string containing a human readable explanation for the - * reason that triggerred this event (may be null). - */ - public CallParticipantChangeEvent(CallParticipant source, - String type, - Object oldValue, - Object newValue, - String reason) - { - super(source, type, oldValue, newValue); - this.reason = reason; - } - - /** - * Returns the type of this event. - * @return a string containing one of the following values: - * CALL_PARTICIPANT_STATUS_CHANGE, CALL_PARTICIPANT_DISPLAY_NAME_CHANGE, - * CALL_PARTICIPANT_ADDRESS_CHANGE, CALL_PARTICIPANT_IMAGE_CHANGE - */ - public String getEventType() - { - return getPropertyName(); - } - - /** - * Returns a String representation of this CallParticipantChangeEvent. - * - * @return A a String representation of this CallParticipantChangeEvent. - */ - public String toString() - { - - return "CallParticipantChangeEvent: type="+getEventType() - + " oldV="+getOldValue() - + " newV="+getNewValue() - + " for participant=" + getSourceCallParticipant(); - } - - /** - * Returns the <tt>CallParticipant</tt> that this event is about. - * - * @return a reference to the <tt>CallParticipant</tt> that is the source - * of this event. - */ - public CallParticipant getSourceCallParticipant() - { - return (CallParticipant)getSource(); - } - - /** - * Returns a reason string further explaining the event (may be null). The - * string would be mostly used for events issued upon a CallParticipantState - * transition that has led to a FAILED state. - * - * @return a reason string further explaining the event or null if no reason - * was set. - */ - public String getReasonString() - { - return reason; - } - - -} - diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceEvent.java deleted file mode 100644 index 94501c5..0000000 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceEvent.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.service.protocol.event; - -import java.util.*; - -import net.java.sip.communicator.service.protocol.*; - -/** - * Represents an event fired by a <code>CallParticipant</code> to notify - * interested <code>CallParticipantConferenceListener</code>s about changes in - * its conference-related information such as it acting or not acting as a - * conference focus and conference membership details. - * - * @author Lubomir Marinov - */ -public class CallParticipantConferenceEvent - extends EventObject -{ - - /** - * The ID of <code>CallParticipantConferenceEvent</code> which notifies - * about a change in the characteristic of a specific - * <code>CallParticipant</code> being a conference focus. The event does not - * carry information about a specific <code>ConferenceMember</code> i.e. the - * <code>conferenceMember</code> property is of value <tt>null</tt>. - */ - public static final int CONFERENCE_FOCUS_CHANGED = 1; - - /** - * The ID of <code>CallParticipantConferenceEvent</code> which notifies - * about an addition to the list of <code>ConferenceMember</code>s managed - * by a specific <code>CallParticipant</code>. The - * <code>conferenceMember</code> property specifies the - * <code>ConferenceMember</code> which was added and thus caused the event - * to be fired. - */ - public static final int CONFERENCE_MEMBER_ADDED = 2; - - /** - * The ID of <code>CallParticipantConferenceEvent</code> which notifies - * about a removal from the list of <code>ConferenceMember</code>s managed - * by a specific <code>CallParticipant</code>. The - * <code>conferenceMember</code> property specifies the - * <code>ConferenceMember</code> which was removed and thus caused the event - * to be fired. - */ - public static final int CONFERENCE_MEMBER_REMOVED = 3; - - /** - * The <code>ConferenceMember</code> which has been changed (e.g. added to - * or removed from the conference) if this event has been fired because of - * such a change; otherwise, <tt>null</tt>. - */ - private final ConferenceMember conferenceMember; - - /** - * The ID of this event which may be one of - * {@link #CONFERENCE_FOCUS_CHANGED}, {@link #CONFERENCE_MEMBER_ADDED} and - * {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics of the - * change in the conference-related information and the details this event - * carries. - */ - private final int eventID; - - /** - * Initializes a new <code>CallParticipantConferenceEvent</code> which is to - * be fired by a specific <code>CallParticipant</code> and which notifies - * about a change in its conference-related information not including a - * change pertaining to a specific <code>ConferenceMember</code>. - * - * @param source - * the <code>CallParticipant</code> which is to fire the new - * event - * @param eventID - * the ID of this event which may be - * {@link #CONFERENCE_FOCUS_CHANGED} and indicates the specifics - * of the change in the conference-related information and the - * details this event carries - */ - public CallParticipantConferenceEvent(CallParticipant source, int eventID) - { - this(source, eventID, null); - } - - /** - * Initializes a new <code>CallParticipantConferenceEvent</code> which is to - * be fired by a specific <code>CallParticipant</code> and which notifies - * about a change in its conference-related information pertaining to a - * specific <code>ConferenceMember</code>. - * - * @param source - * the <code>CallParticipant</code> which is to fire the new - * event - * @param eventID - * the ID of this event which may be - * {@link #CONFERENCE_MEMBER_ADDED} and - * {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics - * of the change in the conference-related information and the - * details this event carries - * @param conferenceMember - * the <code>ConferenceMember</code> which caused the new event - * to be fired - */ - public CallParticipantConferenceEvent( - CallParticipant source, - int eventID, - ConferenceMember conferenceMember) - { - super(source); - - this.eventID = eventID; - this.conferenceMember = conferenceMember; - } - - /** - * Gets the <code>ConferenceMember</code> which has been changed (e.g. added - * to or removed from the conference) if this event has been fired because - * of such a change. - * - * @return the <code>ConferenceMember</code> which has been changed if this - * event has been fired because of such a change; otherwise, - * <tt>null</tt> - */ - public ConferenceMember getConferenceMember() - { - return conferenceMember; - } - - /** - * Gets the ID of this event which may be one of - * {@link #CONFERENCE_FOCUS_CHANGED}, {@link #CONFERENCE_MEMBER_ADDED} and - * {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics of the - * change in the conference-related information and the details this event - * carries. - * - * @return the ID of this event which may be one of - * {@link #CONFERENCE_FOCUS_CHANGED}, - * {@link #CONFERENCE_MEMBER_ADDED} and - * {@link #CONFERENCE_MEMBER_REMOVED} and indicates the specifics of - * the change in the conference-related information and the details - * this event carries - */ - public int getEventID() - { - return eventID; - } - - /** - * Gets the <code>CallParticipant</code> which is the source of/fired the - * event. - * - * @return the <code>CallParticipant</code> which is the source of/fired the - * event - */ - public CallParticipant getSourceCallParticipant() - { - return (CallParticipant) getSource(); - } -} diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceListener.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceListener.java index 7c3287e..9ce46db 100644 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceListener.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallParticipantConferenceListener.java @@ -29,7 +29,7 @@ public interface CallParticipantConferenceListener * and no associated <code>ConferenceMember</code> */ public void conferenceFocusChanged( - CallParticipantConferenceEvent conferenceEvent); + CallPeerConferenceEvent conferenceEvent); /** * Notifies this listener about the addition of a specific @@ -44,7 +44,7 @@ public interface CallParticipantConferenceListener * <code>ConferenceMember</code> which was added */ public void conferenceMemberAdded( - CallParticipantConferenceEvent conferenceEvent); + CallPeerConferenceEvent conferenceEvent); /** * Notifies this listener about the removal of a specific @@ -59,5 +59,5 @@ public interface CallParticipantConferenceListener * <code>ConferenceMember</code> which was removed */ public void conferenceMemberRemoved( - CallParticipantConferenceEvent conferenceEvent); + CallPeerConferenceEvent conferenceEvent); } diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantControlEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantControlEvent.java index 8b1c996..83406a0 100644 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantControlEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallParticipantControlEvent.java @@ -35,7 +35,7 @@ public class CallParticipantControlEvent * @param targetURI the URI to transfer to if this is a "Transfer" event * or null otherwise. */ - public CallParticipantControlEvent(CallParticipant source, String targetURI) + public CallParticipantControlEvent(CallPeer source, String targetURI) { super(source); this.targetURI = targetURI; @@ -45,9 +45,9 @@ public class CallParticipantControlEvent * Returns the CallParticipant that this event is pertaining to. * @return the CallParticipant that this event is pertaining to. */ - public CallParticipant getAssociatedCallparticipant() + public CallPeer getAssociatedCallparticipant() { - return (CallParticipant) source; + return (CallPeer) source; } /** diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantEvent.java index 736a6cd..a4e305f 100644 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallParticipantEvent.java @@ -50,7 +50,7 @@ public class CallParticipantEvent * @param eventID one of the CALL_PARTICIPANT_XXX member ints indicating * the type of this event. */ - public CallParticipantEvent(CallParticipant sourceCallParticipant, + public CallParticipantEvent(CallPeer sourceCallParticipant, Call sourceCall, int eventID) { @@ -86,9 +86,9 @@ public class CallParticipantEvent * * @return a reference to the source <tt>CallParticipant</tt> instance. */ - public CallParticipant getSourceCallParticipant() + public CallPeer getSourceCallParticipant() { - return (CallParticipant)getSource(); + return (CallPeer)getSource(); } /** diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantListener.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantListener.java deleted file mode 100644 index 2b2de8c..0000000 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantListener.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. - */ -package net.java.sip.communicator.service.protocol.event; - -import java.util.*; - - -/** - * Receives events notifying of changes that have occurred within a - * <tt>CallParticipant</tt>. Such changes may pertain to current call - * participant state, their display name, address, image and (possibly in the - * future) others. - * - * @author Emil Ivov - */ -public interface CallParticipantListener - extends EventListener -{ - - /** - * Indicates that a change has occurred in the status of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new status. - */ - public void participantStateChanged(CallParticipantChangeEvent evt); - - /** - * Indicates that a change has occurred in the display name of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new display names. - */ - public void participantDisplayNameChanged(CallParticipantChangeEvent evt); - - /** - * Indicates that a change has occurred in the address of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new address. - */ - public void participantAddressChanged(CallParticipantChangeEvent evt); - - /** - * Indicates that a change has occurred in the transport address that we - * use to communicate with the participant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new transport address. - */ - public void participantTransportAddressChanged( - CallParticipantChangeEvent evt); - - /** - * Indicates that a change has occurred in the image of the source - * CallParticipant. - * - * @param evt The <tt>CallParticipantChangeEvent</tt> instance containing - * the source event as well as its previous and its new image. - */ - public void participantImageChanged(CallParticipantChangeEvent evt); -} diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityMessageEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityMessageEvent.java index 19b89f2..c799a7c 100644 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityMessageEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityMessageEvent.java @@ -66,7 +66,7 @@ public class CallParticipantSecurityMessageEvent * @param i18nMessage the internationalized message associated with this * event that could be shown to the user. */ - public CallParticipantSecurityMessageEvent( CallParticipant callParticipant, + public CallParticipantSecurityMessageEvent( CallPeer callParticipant, String eventMessage, String i18nMessage, int eventSeverity) diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOffEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOffEvent.java index 20bfb3a..72800df 100644 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOffEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOffEvent.java @@ -26,7 +26,7 @@ public class CallParticipantSecurityOffEvent * @param sessionType * the type of the session: audio or video */ - public CallParticipantSecurityOffEvent( CallParticipant callParticipant, + public CallParticipantSecurityOffEvent( CallPeer callParticipant, int sessionType) { super(callParticipant, sessionType); diff --git a/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOnEvent.java b/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOnEvent.java index d87f5fc..93eee78 100755 --- a/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOnEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/CallParticipantSecurityOnEvent.java @@ -39,7 +39,7 @@ public class CallParticipantSecurityOnEvent * indicates if the security string has already been verified */ public CallParticipantSecurityOnEvent( - CallParticipant callParticipant, + CallPeer callParticipant, int sessionType, String cipher, String securityString, @@ -57,9 +57,9 @@ public class CallParticipantSecurityOnEvent * * @return the <tt>CallParticipant</tt> for which this event occurred. */ - public CallParticipant getCallParticipant() + public CallPeer getCallParticipant() { - return (CallParticipant) getSource(); + return (CallPeer) getSource(); } /** |