Javadoc fixes. Removes a few warning. Moves code from CallSipImpl to CallPeerSipImpl

cusax-fix
Emil Ivov 17 years ago
parent c8f81f8353
commit 96046cd449

@ -980,7 +980,7 @@ private void handleNewCall(Call sourceCall, String direction)
currentCallRecords.add(newRecord);
// if has already perticipants Dispatch them
Iterator<CallPeer> iter = sourceCall.getCallPeers();
Iterator<? extends CallPeer> iter = sourceCall.getCallPeers();
while (iter.hasNext())
{
handlePeerAdded(iter.next());

@ -25,7 +25,7 @@
/**
* The dialog created for a given call.
*
*
* @author Yana Stamcheva
*/
public class CallDialog
@ -240,7 +240,7 @@ private void actionPerformedOnHangupButton()
/**
* Returns the <tt>Call</tt> corresponding to this CallDialog.
*
*
* @return the <tt>Call</tt> corresponding to this CallDialog.
*/
public Call getCall()
@ -259,12 +259,12 @@ protected void close(boolean isEscaped)
/**
* Returns the <tt>DialpadDialog</tt> corresponding to this CallDialog.
*
*
* @return the <tt>DialpadDialog</tt> corresponding to this CallDialog.
*/
private DialpadDialog getDialpadDialog()
{
Iterator<CallPeer> callPeers =
Iterator<? extends CallPeer> callPeers =
(call == null)
? new Vector<CallPeer>().iterator()
: call.getCallPeers();
@ -275,7 +275,7 @@ private DialpadDialog getDialpadDialog()
/**
* Returns <code>true</code> if the hold button is selected,
* <code>false</code> - otherwise.
*
*
* @return <code>true</code> if the hold button is selected,
* <code>false</code> - otherwise.
*/
@ -286,7 +286,7 @@ public boolean isHoldButtonSelected()
/**
* Selects or unselects the hold button in this call dialog.
*
*
* @param isSelected indicates if the hold button should be selected or not
*/
public void setHoldButtonSelected(boolean isSelected)
@ -297,7 +297,7 @@ public void setHoldButtonSelected(boolean isSelected)
/**
* Returns <code>true</code> if the mute button is selected,
* <code>false</code> - otherwise.
*
*
* @return <code>true</code> if the mute button is selected,
* <code>false</code> - otherwise.
*/
@ -308,7 +308,7 @@ public boolean isMuteButtonSelected()
/**
* Selects or unselects the mute button in this call dialog.
*
*
* @param isSelected indicates if the mute button should be selected or not
*/
public void setMuteButtonSelected(boolean isSelected)
@ -319,7 +319,7 @@ public void setMuteButtonSelected(boolean isSelected)
/**
* Returns <code>true</code> if the video button is selected,
* <code>false</code> - otherwise.
*
*
* @return <code>true</code> if the video button is selected,
* <code>false</code> - otherwise.
*/
@ -330,7 +330,7 @@ public boolean isVideoButtonSelected()
/**
* Selects or unselects the video button in this call dialog.
*
*
* @param isSelected indicates if the video button should be selected or not
*/
public void setVideoButtonSelected(boolean isSelected)
@ -424,7 +424,7 @@ public void callStateChanged(CallChangeEvent evt)
/**
* Checks if the contained call is a conference call.
*
*
* @return <code>true</code> if the contained <tt>Call</tt> is a conference
* call, otherwise - returns <code>false</code>.
*/
@ -436,7 +436,7 @@ private boolean isConference()
// If one of our peers is a conference focus, we're in a
// conference call.
Iterator<CallPeer> callPeers = call.getCallPeers();
Iterator<? extends CallPeer> callPeers = call.getCallPeers();
while (callPeers.hasNext())
{

@ -321,7 +321,7 @@ public AnswerCallThread(Call call)
public void run()
{
ProtocolProviderService pps = call.getProtocolProvider();
Iterator<CallPeer> peers = call.getCallPeers();
Iterator<? extends CallPeer> peers = call.getCallPeers();
while (peers.hasNext())
{
@ -460,7 +460,7 @@ public HangupCallThread(Call call)
public void run()
{
ProtocolProviderService pps = call.getProtocolProvider();
Iterator<CallPeer> peers = call.getCallPeers();
Iterator<? extends CallPeer> peers = call.getCallPeers();
while (peers.hasNext())
{

@ -32,6 +32,9 @@ public class DialPanel
extends JPanel
implements MouseListener
{
/**
* Our class logger
*/
private final Logger logger = Logger.getLogger(DialPanel.class);
/**
@ -74,7 +77,7 @@ public DialPanel(MainCallPanel parentCallPanel)
* @param callPeers the <tt>CallPeer</tt>s, for which the
* dialpad will be opened.
*/
public DialPanel(Iterator<CallPeer> callPeers)
public DialPanel(Iterator<? extends CallPeer> callPeers)
{
// We need to send DTMF tones to all peers each time the user
// presses a dial button, so we put the iterator into a list.
@ -409,7 +412,7 @@ public void actionPerformed(ActionEvent e)
*/
private void sendDtmfTone(DTMFTone dtmfTone)
{
Iterator<CallPeer> callPeers = this.callPeersList.iterator();
Iterator<? extends CallPeer> callPeers = this.callPeersList.iterator();
try
{

@ -25,6 +25,12 @@ public class DialpadDialog
extends JDialog
implements WindowFocusListener
{
/**
* Creates a new instance of this class using the specified
* <tt>dialPanel</tt>.
*
* @param dialPanel the <tt>DialPanel</tt> that we'd like to wrap.
*/
private DialpadDialog(DialPanel dialPanel)
{
dialPanel.setOpaque(false);
@ -48,7 +54,7 @@ private DialpadDialog(DialPanel dialPanel)
*
* @param callPeers The corresponding call peers.
*/
public DialpadDialog(Iterator<CallPeer> callPeers)
public DialpadDialog(Iterator<? extends CallPeer> callPeers)
{
this(new DialPanel(callPeers));
@ -71,6 +77,12 @@ public DialpadDialog(MainCallPanel mainCallPanel)
*/
private static class BackgroundPanel extends JPanel
{
/**
* Calls <tt>super</tt>'s <tt>paintComponent</tt> method and then adds
* background with gradient.
*
* @param g a reference to the currently valid <tt>Graphics</tt> object
*/
public void paintComponent(Graphics g)
{
super.paintComponent(g);
@ -94,10 +106,20 @@ public void paintComponent(Graphics g)
}
}
/**
* Dummy implementation.
*
* @param e unused
*/
public void windowGainedFocus(WindowEvent e)
{
}
/**
* Dummy implementation.
*
* @param e unused
*/
public void windowLostFocus(WindowEvent e)
{
this.setVisible(false);

@ -125,7 +125,7 @@ public void actionPerformed(ActionEvent evt)
(OperationSetBasicTelephony) call.getProtocolProvider()
.getOperationSet(OperationSetBasicTelephony.class);
Iterator<CallPeer> peers = call.getCallPeers();
Iterator<? extends CallPeer> peers = call.getCallPeers();
while (peers.hasNext())
{

@ -112,7 +112,7 @@ public void actionPerformed(ActionEvent evt)
{
if (call != null)
{
Iterator<CallPeer> peers
Iterator<? extends CallPeer> peers
= call.getCallPeers();
while (peers.hasNext())

@ -121,7 +121,7 @@ private void initComponents()
*/
private void initCallLabel(JLabel callLabel)
{
Iterator<CallPeer> peersIter = incomingCall.getCallPeers();
Iterator<? extends CallPeer> peersIter = incomingCall.getCallPeers();
boolean hasMorePeers = false;
String text = "";

@ -20,29 +20,32 @@
import net.java.sip.communicator.util.swing.*;
/**
* Represents an UI means to transfer (the <code>Call</code> of) an associated
* <code>CallPariticant</code>.
* Represents an UI means to transfer (the <tt>Call</tt> of) an associated
* <tt>CallPariticant</tt>.
*
* @author Lubomir Marinov
*/
public class TransferCallButton
extends SIPCommButton
{
/**
* Our class logger.
*/
private static final Logger logger =
Logger.getLogger(TransferCallButton.class);
/**
* The <code>CallPeer</code> (whose <code>Call</code> is) to be
* The <tt>CallPeer</tt> (whose <tt>Call</tt> is) to be
* transfered.
*/
private final CallPeer callPeer;
/**
* Initializes a new <code>TransferCallButton</code> instance which is to
* transfer (the <code>Call</code> of) a specific
* <code>CallPeer</code>.
* Initializes a new <tt>TransferCallButton</tt> instance which is to
* transfer (the <tt>Call</tt> of) a specific
* <tt>CallPeer</tt>.
*
* @param callPeer the <code>CallPeer</code> to be associated
* @param callPeer the <tt>CallPeer</tt> to be associated
* with the new instance and to be transfered
*/
public TransferCallButton(CallPeer callPeer)
@ -59,7 +62,7 @@ public TransferCallButton(CallPeer callPeer)
/**
* Invoked when an action occurs.
*
* @param evt the <code>ActionEvent</code> instance containing the
* @param evt the <tt>ActionEvent</tt> instance containing the
* data associated with the action and the act of its
* performing
*/
@ -72,11 +75,11 @@ public void actionPerformed(ActionEvent evt)
/**
* Handles actions performed on this button on behalf of a specific
* <code>ActionListener</code>.
* <tt>ActionListener</tt>.
*
* @param listener the <code>ActionListener</code> notified about the
* @param listener the <tt>ActionListener</tt> notified about the
* performing of the action
* @param evt the <code>ActionEvent</code> containing the data associated
* @param evt the <tt>ActionEvent</tt> containing the data associated
* with the action and the act of its performing
*/
private void actionPerformed(ActionListener listener, ActionEvent evt)
@ -169,7 +172,7 @@ private CallPeer findCallPeer(
{
Call call = callIter.next();
for (Iterator<CallPeer> peerIter = call.getCallPeers();
for (Iterator<? extends CallPeer> peerIter = call.getCallPeers();
peerIter.hasNext();)
{
CallPeer peer = peerIter.next();
@ -182,13 +185,15 @@ private CallPeer findCallPeer(
}
/**
* Returns the first <code>CallPeer</code> among all existing ones
* Returns the first <tt>CallPeer</tt> among all existing ones
* who has a specific address.
*
* @param address the address of the <code>CallPeer</code> to be
* located
* @return the first <code>CallPeer</code> among all existing ones
* who has the specified <code>address</code>
* @param address the address of the <tt>CallPeer</tt> to be located
* @return the first <tt>CallPeer</tt> among all existing ones
* who has the specified <tt>address</tt>
*
* @throws OperationFailedException in case we fail retrieving a reference
* to <tt>ProtocolProviderService</tt>s
*/
private CallPeer findCallPeer(String address)
throws OperationFailedException
@ -231,18 +236,18 @@ private CallPeer findCallPeer(String address)
}
/**
* Gets the first <code>Frame</code> in the ancestor <code>Component</code>
* hierarchy of a specific <code>Component</code>.
* Gets the first <tt>Frame</tt> in the ancestor <tt>Component</tt>
* hierarchy of a specific <tt>Component</tt>.
* <p>
* The located <code>Frame</code> (if any) is often used as the owner of
* <code>Dialog</code>s opened by the specified <code>Component</code> in
* order to provide natural <code>Frame</code> ownership.
*
* The located <tt>Frame</tt> (if any) is often used as the owner of
* <tt>Dialog</tt>s opened by the specified <tt>Component</tt> in
* order to provide natural <tt>Frame</tt> ownership.
*
* @param component the <tt>Component</tt> which is to have its
* <tt>Component</tt> hierarchy examined for <tt>Frame</tt>
* @return the first <code>Frame</code> in the ancestor
* <code>Component</code> hierarchy of the specified <code>Component</code>;
* <tt>null</tt>, if no such <code>Frame</code> was located
* @return the first <tt>Frame</tt> in the ancestor
* <tt>Component</tt> hierarchy of the specified <tt>Component</tt>;
* <tt>null</tt>, if no such <tt>Frame</tt> was located
*/
public static Frame getFrame(Component component)
{

@ -60,7 +60,7 @@ public ConferenceCallPanel(CallDialog callDialog, Call c)
this.addLocalCallPeer();
Iterator<CallPeer> iterator = this.call.getCallPeers();
Iterator<? extends CallPeer> iterator = this.call.getCallPeers();
while (iterator.hasNext())
{
this.addCallPeerPanel(iterator.next());

@ -35,21 +35,39 @@
*/
public class SecurityEventManager extends ZrtpUserCallback
{
/**
* Our class logger.
*/
private static final Logger logger
= Logger.getLogger(SecurityEventManager.class);
/**
* A warning <tt>String</tt> that we display to the user.
*/
public static final String WARNING_NO_RS_MATCH = MediaActivator
.getResources().getI18NString(
"impl.media.security.WARNING_NO_RS_MATCH");
/**
* A warning <tt>String</tt> that we display to the user.
*/
public static final String WARNING_NO_EXPECTED_RS_MATCH = MediaActivator
.getResources().getI18NString(
"impl.media.security.WARNING_NO_EXPECTED_RS_MATCH");
/**
* A reference to the <tt>CallPeer</tt> that we will be interacting with.
*/
private CallPeer callPeer;
/**
* The session that this manager is associated with.
*/
private final CallSession callSession;
/**
* A callback to the instance that created us.
*/
private final SessionCreatorCallback peerSecurityCallback;
/**
@ -79,6 +97,9 @@ public class SecurityEventManager extends ZrtpUserCallback
/**
* The class constructor.
*
* @param callSession the call session that this manager is to be associated
* with.
*/
public SecurityEventManager(CallSession callSession)
{
@ -90,7 +111,7 @@ public SecurityEventManager(CallSession callSession)
// At this moment we're supporting a security call between only two
// peers. In the future the call peer would be passed
// as a parameter to the SecurityEventManager.
Iterator<CallPeer> callPeers
Iterator<? extends CallPeer> callPeers
= callSession.getCall().getCallPeers();
while (callPeers.hasNext())
@ -356,16 +377,24 @@ public void confirmGoClear()
+ ": GoClear confirmation requested.");
}
/**
* Converts the <tt>sessionType</tt> into into a <tt>String</tt>.
*
* @param sessionType one of the
* <tt>CallPeerSecurityStatusEvent.XXX_SESSION</tt> fields
*
* @return a <tt>String</tt> representation of <tt>sessionType</tt>.
*/
private String sessionTypeToString(int sessionType)
{
switch (sessionType)
{
case CallPeerSecurityStatusEvent.AUDIO_SESSION:
return "AUDIO_SESSION";
case CallPeerSecurityStatusEvent.VIDEO_SESSION:
return "VIDEO_SESSION";
default:
throw new IllegalArgumentException("sessionType");
case CallPeerSecurityStatusEvent.AUDIO_SESSION:
return "AUDIO_SESSION";
case CallPeerSecurityStatusEvent.VIDEO_SESSION:
return "VIDEO_SESSION";
default:
throw new IllegalArgumentException("sessionType");
}
}
}

@ -90,7 +90,10 @@ public void callPeerRemoved( CallPeerEvent callPeerEvent)
* <code>CallState.CALL_IN_PROGRESS</code>, puts the other existing
* <code>Call</code>s on hold.
*
* @see .CallChangeListener#callStateChanged(CallChangeEvent)
* @param callChangeEvent the <tt>CallChangeEvent</tt> that we are to
* deliver.
*
* @see CallChangeListener#callStateChanged(CallChangeEvent)
*/
public void callStateChanged(CallChangeEvent callChangeEvent)
{
@ -143,6 +146,9 @@ public void serviceChanged(ServiceEvent serviceEvent)
}
}
/**
* Our class logger
*/
private static final Logger logger =
Logger.getLogger(SingleCallInProgressPolicy.class);
@ -312,7 +318,7 @@ private void putOnHold(Call call)
if (telephony != null)
{
for (Iterator<CallPeer> peerIter =
for (Iterator<? extends CallPeer> peerIter =
call.getCallPeers(); peerIter.hasNext();)
{
CallPeer peer = peerIter.next();

@ -137,6 +137,7 @@ public Contact findContactByID(String contactID)
*
* @param statusMessage a String containing the new status message.
*/
@Deprecated
public void setStatusMessage(String statusMessage)
{
this.statusMessage = statusMessage;
@ -279,7 +280,7 @@ public void publishPresenceStatus(PresenceStatus status,
{
PresenceStatus oldPresenceStatus = this.presenceStatus;
this.presenceStatus = status;
//OK, now post the new status message!
if(statusMessage != null && !statusMessage.equals(""))
{
@ -290,11 +291,11 @@ public void publishPresenceStatus(PresenceStatus status,
adapter.setStatusMessage(statusMessage);
}
}
this.statusMessage = statusMessage;
this.fireProviderStatusChangeEvent(oldPresenceStatus);
try
{
if(this.presenceStatus == FacebookStatusEnum.OFFLINE)
@ -325,7 +326,7 @@ else if(this.presenceStatus == FacebookStatusEnum.INVISIBLE)
throw new OperationFailedException(
"unable to change facebook visibility", -1, e);
}
/*// since we are not a real protocol, we set the contact presence status
// ourselves and make them have the same status as ours.

@ -1,6 +1,6 @@
/*
* 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.impl.protocol.icq;
@ -15,7 +15,7 @@
/**
* A ICQ implementation of the ad-hoc multi user chat operation set.
*
*
* @author Valentin Martinet
*/
public class OperationSetAdHocMultiUserChatIcqImpl
@ -81,7 +81,7 @@ public class OperationSetAdHocMultiUserChatIcqImpl
/**
* Instantiates the user operation set with a currently valid instance of
* the Icq protocol provider.
*
*
* @param icqProvider a currently valid instance of
* ProtocolProviderServiceIcqImpl.
*/
@ -94,7 +94,7 @@ public class OperationSetAdHocMultiUserChatIcqImpl
/**
* Adds a listener to invitation notifications.
*
*
* @param listener an invitation listener.
*/
public void addInvitationListener(AdHocChatRoomInvitationListener listener)
@ -109,7 +109,7 @@ public void addInvitationListener(AdHocChatRoomInvitationListener listener)
/**
* Subscribes <tt>listener</tt> so that it would receive events indicating
* rejection of a multi user chat invitation that we've sent earlier.
*
*
* @param listener the listener that we'll subscribe for invitation
* rejection events.
*/
@ -126,7 +126,7 @@ public void addInvitationRejectionListener(
/**
* Adds a listener that will be notified of changes in our status in a chat
* room such as us being kicked, banned or dropped.
*
*
* @param listener the <tt>LocalUserAdHocChatRoomPresenceListener</tt>.
*/
public void addPresenceListener(
@ -141,7 +141,7 @@ public void addPresenceListener(
/**
* Returns a list of all currently joined <tt>AdHocChatRoom</tt>-s.
*
*
* @return a list of all currently joined <tt>AdHocChatRoom</tt>-s
*/
public List<AdHocChatRoom> getAdHocChatRooms()
@ -153,18 +153,18 @@ public List<AdHocChatRoom> getAdHocChatRooms()
* Creates a room with the named <tt>roomName</tt> and according to the
* specified <tt>roomProperties</tt> on the server that this protocol
* provider is currently connected to.
*
*
* @param roomName the name of the <tt>AdHocChatRoom</tt> to create.
* @param roomProperties properties specifying how the room should be
* created. Contains list of invitees and the invitation message.
*
*
* @throws OperationFailedException if the room couldn't be created for some
* reason (e.g. room already exists; user already joined to an
* existent room or user has no permissions to create an ad-hoc
* chat room).
* @throws OperationNotSupportedException if ad-hoc chat room creation is
* not supported by this server
*
*
* @return AdHocChatRoom the ad-hoc chat room that we've just created.
*/
public AdHocChatRoom createAdHocChatRoom(String roomName,
@ -194,7 +194,7 @@ public AdHocChatRoom createAdHocChatRoom(String roomName,
*
* @param adHocRoomName the name of the ad-hoc room
* @param contacts the list of contacts
*
*
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
@ -203,8 +203,8 @@ public AdHocChatRoom createAdHocChatRoom(String adHocRoomName,
throws OperationFailedException,
OperationNotSupportedException
{
AdHocChatRoom adHocChatRoom
= createAdHocChatRoom(adHocRoomName, new Hashtable());
AdHocChatRoom adHocChatRoom = createAdHocChatRoom(
adHocRoomName, new Hashtable<String, Object>());
if (adHocChatRoom != null && contacts != null)
{
@ -270,7 +270,7 @@ private AdHocChatRoom createLocalChatRoomInstance(
/**
* Returns true if <tt>contact</tt> supports multi user chat sessions.
*
*
* @param contact reference to the contact whose support for chat rooms we
* are currently querying.
* @return a boolean indicating whether <tt>contact</tt> supports chat
@ -287,7 +287,7 @@ public boolean isMultiChatSupportedByContact(Contact contact)
/**
* Informs the sender of an invitation that we decline their invitation.
*
*
* @param invitation the connection to use for sending the rejection.
* @param rejectReason the reason to reject the given invitation
*/
@ -309,7 +309,7 @@ public void rejectInvitation(AdHocChatRoomInvitation invitation,
/**
* Removes <tt>listener</tt> from the list of invitation listeners
* registered to receive invitation events.
*
*
* @param listener the invitation listener to remove.
*/
public void removeInvitationListener(
@ -324,7 +324,7 @@ public void removeInvitationListener(
/**
* Removes <tt>listener</tt> from the list of invitation listeners
* registered to receive invitation rejection events.
*
*
* @param listener the invitation listener to remove.
*/
public void removeInvitationRejectionListener(
@ -339,7 +339,7 @@ public void removeInvitationRejectionListener(
/**
* Removes a listener that was being notified of changes in our status in a
* room such as us being joined or dropped.
*
*
* @param listener the <tt>LocalUserAdHocChatRoomPresenceListener</tt>.
*/
public void removePresenceListener(
@ -354,7 +354,7 @@ public void removePresenceListener(
/**
* Delivers a <tt>AdHocChatRoomInvitationReceivedEvent</tt> to all
* registered <tt>AdHocChatRoomInvitationListener</tt>s.
*
*
* @param targetChatRoom the ad-hoc room that invitation refers to
* @param inviter the inviter that sent the invitation
* @param reason the reason why the inviter sent the invitation
@ -391,7 +391,7 @@ public void fireInvitationEvent(AdHocChatRoom targetChatRoom,
/**
* Delivers a <tt>LocalUserAdHocChatRoomPresenceChangeEvent</tt> to all
* registered <tt>LocalUserAdHocChatRoomPresenceListener</tt>s.
*
*
* @param chatRoom the <tt>AdHocChatRoom</tt> which has been joined, left,
* etc.
* @param eventType the type of this event; one of LOCAL_USER_JOINED,
@ -433,7 +433,7 @@ private class RegistrationStateListener
* The method is called by a ProtocolProvider implementation whenever a
* change in the registration state of the corresponding provider had
* occurred.
*
*
* @param evt ProviderStatusChangeEvent the event describing the status
* change.
*/

@ -149,7 +149,7 @@ else if(smackType.equals(FormField.TYPE_LIST_MULTI))
*/
public Iterator<Object> getValues()
{
Iterator<Object> valuesIter = null;
Iterator<? extends Object> valuesIter = null;
List<Object> values = new ArrayList<Object>();
Iterator<String> smackValues = smackFormField.getValues();
@ -169,9 +169,9 @@ public Iterator<Object> getValues()
valuesIter = values.iterator();
}
else
valuesIter = (Iterator) smackValues;
valuesIter = (Iterator<? extends Object>) smackValues;
return valuesIter;
return (Iterator<Object>)valuesIter;
}
/**

@ -17,10 +17,10 @@
/**
* A MSN implementation of the ad-hoc multi user chat operation set.
*
*
* @author Valentin Martinet
*/
public class OperationSetAdHocMultiUserChatMsnImpl
public class OperationSetAdHocMultiUserChatMsnImpl
implements OperationSetAdHocMultiUserChat
{
private static final Logger logger
@ -53,7 +53,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
* A list of listeners subscribed for events indicating rejection of a multi
* user chat invitation sent by us.
*/
private Vector<AdHocChatRoomInvitationRejectionListener>
private Vector<AdHocChatRoomInvitationRejectionListener>
invitationRejectionListeners
= new Vector<AdHocChatRoomInvitationRejectionListener>();
@ -78,7 +78,7 @@ public OperationSetAdHocMultiUserChatMsnImpl(
/**
* Adds the given presence listener to existing presence listeners list.
*
*
* @param listener the listener to add
*/
public void addPresenceListener(
@ -93,7 +93,7 @@ public void addPresenceListener(
/**
* Adds a listener to invitation notifications.
*
*
* @param listener an invitation listener.
*/
public void addInvitationListener(AdHocChatRoomInvitationListener listener)
@ -108,7 +108,7 @@ public void addInvitationListener(AdHocChatRoomInvitationListener listener)
/**
* Removes <tt>listener</tt> from the list of invitation listeners
* registered to receive invitation events.
*
*
* @param listener the invitation listener to remove.
*/
public void removeInvitationListener(
@ -122,7 +122,7 @@ public void removeInvitationListener(
/**
* Adds a listener to invitation notifications.
*
*
* @param listener an invitation listener.
*/
public void addInvitationRejectionListener(
@ -138,7 +138,7 @@ public void addInvitationRejectionListener(
/**
* Removes <tt>listener</tt> from the list of invitation listeners
* registered to receive invitation events.
*
*
* @param listener the invitation listener to remove.
*/
public void removeInvitationRejectionListener(
@ -152,7 +152,7 @@ public void removeInvitationRejectionListener(
/**
* Creates a message by a given message text.
*
*
* @param messageText The message text.
* @return the newly created message.
*/
@ -164,12 +164,12 @@ public Message createMessage(String messageText)
}
/**
* Creates an ad-hoc room with the named <tt>adHocRoomName</tt> and in
* Creates an ad-hoc room with the named <tt>adHocRoomName</tt> and in
* including to the specified <tt>contacts</tt>.
*
*
* @param adHocRoomName the name of the ad-hoc room
* @param contacts the list of contacts
*
*
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
@ -177,8 +177,8 @@ public AdHocChatRoom createAdHocChatRoom( String adHocRoomName,
List<Contact> contacts)
throws OperationFailedException, OperationNotSupportedException
{
AdHocChatRoom adHocChatRoom
= createAdHocChatRoom(adHocRoomName, new Hashtable());
AdHocChatRoom adHocChatRoom = createAdHocChatRoom(
adHocRoomName, new Hashtable<String, Object>());
if (adHocChatRoom != null && contacts != null)
{
@ -196,10 +196,10 @@ public AdHocChatRoom createAdHocChatRoom( String adHocRoomName,
/**
* Creates an <tt>AdHocChatRoom</tt> whose name is _adHocRoomName with the
* properties contained in _adHocRoomProperties
*
*
* @param adHocRoomName the name of the ad-hoc room
* @param adHocRoomProperties the ad-hoc room's properties
*
*
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
@ -227,7 +227,7 @@ public AdHocChatRoom createAdHocChatRoom(String adHocRoomName,
/**
* Creates a <tt>ChatRoom</tt> from the specified chatRoomName.
*
*
* @param adHocChatRoomName the specific ad-hoc chat room name.
* @param switchboardId the identifier of the switchboard
* @return the ad-hoc chat room that we've just created.
@ -253,16 +253,16 @@ private AdHocChatRoomMsnImpl createLocalAdHocChatRoomInstance(
/**
* Returns the <tt>AdHocChatRoomMsnImpl</tt> corresponding to the given
* <tt>switchboard</tt>, if one exists, otherwise returns null.
*
*
* @param switchboard the Msn switchboard corresponding to a chat room
*
*
* @return the <tt>AdHocChatRoomMsnImpl</tt> corresponding to the given
* <tt>switchboard</tt>, otherwise null
*/
private AdHocChatRoomMsnImpl getLocalAdHocChatRoomInstance(
MsnSwitchboard switchboard)
{
AdHocChatRoomMsnImpl adHocRoom = (AdHocChatRoomMsnImpl)
AdHocChatRoomMsnImpl adHocRoom = (AdHocChatRoomMsnImpl)
this.adHocChatRoomCache.get(switchboard);
return adHocRoom;
@ -279,7 +279,7 @@ private AdHocChatRoomMsnImpl getLocalAdHocChatRoomInstance(
private AdHocChatRoomMsnImpl createLocalAdHocChatRoomInstance(
MsnSwitchboard switchboard)
{
AdHocChatRoomMsnImpl adHocChatRoom = (AdHocChatRoomMsnImpl)
AdHocChatRoomMsnImpl adHocChatRoom = (AdHocChatRoomMsnImpl)
this.adHocChatRoomCache.get(String.valueOf(switchboard.hashCode()));
if (adHocChatRoom == null)
@ -305,7 +305,7 @@ private AdHocChatRoomMsnImpl createLocalAdHocChatRoomInstance(
/**
* Delivers a <tt>LocalUserAdHocChatRoomPresenceChangeEvent</tt> to all
* registered <tt>LocalUserAdHocChatRoomPresenceListener</tt>s.
*
*
* @param adHocChatRoom the <tt>AdHocChatRoom</tt> which has been joined,
* left, etc.
* @param eventType the type of this event; one of LOCAL_USER_JOINED,
@ -342,7 +342,7 @@ public void fireLocalUserPresenceEvent( AdHocChatRoom adHocChatRoom,
* by the switchboard, if it is not created by the user, its an active file
* transfer switchboard or the user count is too low then this method return
* false.
*
*
* @param switchboard The corresponding MSNswitchboard.
* @return true if it is a group chat message or false in the other case.
*/
@ -367,18 +367,18 @@ public boolean isGroupChatMessage(MsnSwitchboard switchboard)
}
}
public boolean isMultiChatSupportedByContact(Contact contact)
public boolean isMultiChatSupportedByContact(Contact contact)
{
return false;
}
/**
* Removes the given listener from presence listeners' list.
*
*
* @param listener the listener to remove
*/
public void removePresenceListener(
LocalUserAdHocChatRoomPresenceListener listener)
LocalUserAdHocChatRoomPresenceListener listener)
{
synchronized (this.presenceListeners)
{
@ -391,7 +391,7 @@ public void removePresenceListener(
/**
* Makes sure that we are properly connected.
*
*
* @throws OperationFailedException if the provider is not connected.
* @throws OperationNotSupportedException if the service is not supported by
* the server.
@ -420,7 +420,7 @@ private class RegistrationStateListener
* The method is called by a ProtocolProvider implementation whenever a
* change in the registration state of the corresponding provider had
* occurred.
*
*
* @param evt ProviderStatusChangeEvent the event describing the status
* change.
*/
@ -506,7 +506,7 @@ public void activityEmailNotificationReceived(
/**
* The Switchboard Listener, listens to all four switchboard events:
* Switchboard started/closed and User joins/left.
*
*
*/
private class MsnSwitchboardListener
extends MsnSwitchboardAdapter
@ -630,7 +630,7 @@ public void switchboardStarted(MsnSwitchboard switchboard)
* Note: Not supported inside the MSN.
*/
public void rejectInvitation(AdHocChatRoomInvitation invitation,
String rejectReason)
String rejectReason)
{
// there is no way to block invitations, because there arn't any
// invitations.

@ -25,6 +25,9 @@
public class ActiveCallsRepository
extends CallChangeAdapter
{
/**
* Our class logger.
*/
private static final Logger logger
= Logger.getLogger(ActiveCallsRepository.class);
@ -199,7 +202,8 @@ public CallPeerSipImpl findCallPeer(String callID,
if (!callID.equals(call.getCallID()))
continue;
for (Iterator<CallPeer> callPeerIter = call.getCallPeers();
for (Iterator<? extends CallPeer> callPeerIter
= call.getCallPeers();
callPeerIter.hasNext();)
{
CallPeerSipImpl callPeer =
@ -250,11 +254,11 @@ public CallPeerSipImpl findCallPeer(String branchID, String callID)
while (activeCallsIter.hasNext())
{
CallSipImpl activeCall = activeCallsIter.next();
Iterator<CallPeer> callPeersIter = activeCall.getCallPeers();
Iterator<CallPeerSipImpl> callPeersIter = activeCall.getCallPeers();
while (callPeersIter.hasNext())
{
CallPeerSipImpl cp = (CallPeerSipImpl) callPeersIter.next();
CallPeerSipImpl cp = callPeersIter.next();
Dialog cpDialog = cp.getDialog();
Transaction cpTran = cp.getLatestInviteTransaction();

@ -1402,6 +1402,185 @@ public synchronized void answer()
"Failed to send an OK response to an INVITE request",
OperationFailedException.NETWORK_FAILURE, ex, logger);
}
}
/**
* Puts the <tt>CallPeer</tt> represented by this instance on or off hold.
*
* @param on <tt>true</tt> to have the <tt>CallPeer</tt> put on hold;
* <tt>false</tt>, otherwise
*
* @throws OperationFailedException if we fail to construct or send the
* INVITE request putting the remote side on/off hold.
*/
public void putOnHold(boolean on)
throws OperationFailedException
{
CallSession callSession = getMediaCallSession();
try
{
sendReInvite(callSession.createSdpDescriptionForHold(
getSdpDescription(), on));
}
catch (MediaException ex)
{
ProtocolProviderServiceSipImpl.throwOperationFailedException(
"Failed to create SDP offer to hold.",
OperationFailedException.INTERNAL_ERROR, ex, logger);
}
/*
* Putting on hold isn't a negotiation (i.e. the issuing side takes the
* decision and executes it) so we're muting now regardless of the
* desire of the peer to accept the offer.
*/
callSession.putOnHold(on, true);
CallPeerState state = getState();
if (CallPeerState.ON_HOLD_LOCALLY.equals(state))
{
if (!on)
setState(CallPeerState.CONNECTED);
}
else if (CallPeerState.ON_HOLD_MUTUALLY.equals(state))
{
if (!on)
setState(CallPeerState.ON_HOLD_REMOTELY);
}
else if (CallPeerState.ON_HOLD_REMOTELY.equals(state))
{
if (on)
setState(CallPeerState.ON_HOLD_MUTUALLY);
}
else if (on)
{
setState(CallPeerState.ON_HOLD_LOCALLY);
}
}
/**
* Sends a reINVITE request with a specific <tt>sdpOffer</tt> (description)
* within the current <tt>Dialog</tt> with a the call peer represented by
* this instance.
*
* @param sdpOffer the offer that we'd like to use for the newly created
* INVITE request.
*
* @throws OperationFailedException if sending the request fails for some
* reason.
*/
private void sendReInvite(String sdpOffer)
throws OperationFailedException
{
Dialog dialog = getDialog();
Request invite = messageFactory.createRequest(dialog, Request.INVITE);
try
{
invite.setContent(sdpOffer, getProtocolProvider().getHeaderFactory()
.createContentTypeHeader("application", "sdp"));
}
catch (ParseException ex)
{
ProtocolProviderServiceSipImpl.throwOperationFailedException(
"Failed to parse SDP offer for the new invite.",
OperationFailedException.INTERNAL_ERROR, ex, logger);
}
getProtocolProvider().sendInDialogRequest(
getJainSipProvider(), invite, dialog);
}
/**
* Modifies the local media setup to reflect the requested setting for the
* streaming of the local video and then re-invites the peer represented by
* this class using a corresponding SDP description..
*
* @param allowed <tt>true</tt> if local video transmission is allowed and
* <tt>false</tt> otherwise.
*
* @throws OperationFailedException if video initialization fails.
*/
public void setLocalVideoAllowed(boolean allowed)
throws OperationFailedException
{
CallSession callSession = getMediaCallSession();
if(callSession.isLocalVideoAllowed() == allowed)
return;
try
{
/*
* Modify the local media setup to reflect the requested setting for
* the streaming of the local video.
*/
callSession.setLocalVideoAllowed(allowed);
}
catch (MediaException ex)
{
throw new OperationFailedException(
"Failed to allow/disallow the streaming of local video.",
OperationFailedException.INTERNAL_ERROR, ex);
}
String sdpOffer = null;
try
{
sdpOffer = callSession.createSdpOffer(getSdpDescription());
}
catch (MediaException ex)
{
throw new OperationFailedException(
"Failed to create re-invite offer for peer "
+ this,OperationFailedException.INTERNAL_ERROR, ex);
}
sendReInvite(sdpOffer);
}
/**
* Determines whether we are currently streaming video toward whoever this
* <tt>CallPeerSipImpl</tt> represents.
*
* @return <tt>true</tt> if we are currently streaming video toward this
* <tt>CallPeer</tt> and <tt>false</tt> otherwise.
*/
public boolean isLocalVideoStreaming()
{
return getMediaCallSession().isLocalVideoStreaming();
}
/**
* Adds a specific <tt>PropertyChangeListener</tt> to the list of
* listeners which get notified when the properties (e.g.
* LOCAL_VIDEO_STREAMING) associated with this <tt>CallPeer</tt> change
* their values.
*
* @param listener the <tt>PropertyChangeListener</tt> to be notified
* when the properties associated with the specified <tt>Call</tt> change
* their values
*/
public void addVideoPropertyChangeListener(PropertyChangeListener listener)
{
getMediaCallSession().addPropertyChangeListener(listener);
}
/**
* Removes a specific <tt>PropertyChangeListener</tt> from the list of
* listeners which get notified when the properties (e.g.
* LOCAL_VIDEO_STREAMING) associated with this <tt>CallPeer</tt> change
* their values.
*
* @param listener the <tt>PropertyChangeListener</tt> to no longer be
* notified when the properties associated with the specified <tt>Call</tt>
* change their values
*/
public void removeVideoPropertyChangeListener(
PropertyChangeListener listener)
{
getMediaCallSession().removePropertyChangeListener(listener);
}
}

@ -53,6 +53,11 @@ public class CallSipImpl
*/
private final OperationSetBasicTelephonySipImpl parentOpSet;
/**
* Our video streaming policy.
*/
private boolean isLocalVideoAllowed = false;
/**
* Crates a CallSipImpl instance belonging to <tt>sourceProvider</tt> and
* initiated by <tt>CallCreator</tt>.
@ -129,9 +134,9 @@ public void removeCallPeer(CallPeerSipImpl callPeer)
*
* @return an Iterator over all peers currently involved in the call.
*/
public Iterator<CallPeer> getCallPeers()
public Iterator<CallPeerSipImpl> getCallPeers()
{
return new LinkedList<CallPeer>(callPeers).iterator();
return new LinkedList<CallPeerSipImpl>(callPeers).iterator();
}
/**
@ -238,7 +243,7 @@ public boolean contains(Dialog dialog)
*/
public CallPeerSipImpl findCallPeer(Dialog dialog)
{
Iterator<CallPeer> callPeers = this.getCallPeers();
Iterator<CallPeerSipImpl> callPeers = this.getCallPeers();
if (logger.isTraceEnabled())
{
@ -248,8 +253,7 @@ public CallPeerSipImpl findCallPeer(Dialog dialog)
while (callPeers.hasNext())
{
CallPeerSipImpl cp =
(CallPeerSipImpl) callPeers.next();
CallPeerSipImpl cp = callPeers.next();
if (cp.getDialog() == dialog)
{
@ -566,4 +570,108 @@ public static void logAndFailCallPeer(String message,
logger.error(message, throwable);
peer.setState(CallPeerState.FAILED, message);
}
/**
* Modifies the local media setup of all peers in the call to reflect the
* requested setting for the streaming of the local video and then passes
* the setting to the participating <tt>CallPeerSipImpl</tt> instances.
*
* @param allowed <tt>true</tt> if local video transmission is allowed and
* <tt>false</tt> otherwise.
*
* @throws OperationFailedException if video initialization fails.
*/
public void setLocalVideoAllowed(boolean allowed)
throws OperationFailedException
{
this.isLocalVideoAllowed = allowed;
/*
* Record the setting locally and notify all peers.
*/
Iterator<CallPeerSipImpl> peers = getCallPeers();
while (peers.hasNext())
{
CallPeerSipImpl peer = peers.next();
peer.setLocalVideoAllowed(allowed);
}
}
/**
* Determines whether the streaming of local video in this <tt>Call</tt>
* is currently allowed. The setting does not reflect the availability of
* actual video capture devices, it just expresses the local policy (or
* desire of the user) to have the local video streamed in the case the
* system is actually able to do so.
*
* @return <tt>true</tt> if the streaming of local video for this
* <tt>Call</tt> is allowed; otherwise, <tt>false</tt>
*/
public boolean isLocalVideoAllowed()
{
return isLocalVideoAllowed;
}
/**
* Determines whether we are currently streaming video toward at least one
* of the peers in this call.
*
* @return <tt>true</tt> if we are currently streaming video toward at least
* one of the peers in this call and <tt>false</tt> otherwise.
*/
public boolean isLocalVideoStreaming()
{
Iterator<CallPeerSipImpl> peers = getCallPeers();
while (peers.hasNext())
{
CallPeerSipImpl peer = peers.next();
if (peer.isLocalVideoStreaming())
return true;
}
return false;
}
/**
* Registers a <tt>listener</tt> with all <tt>CallPeer</tt> currently
* participating with the call so that it would be notified of changes in
* video related properties (e.g. <tt>LOCAL_VIDEO_STREAMING</tt>).
*
* @param listener the <tt>PropertyChangeListener</tt> to be notified
* when the properties associated with member <tt>CallPeer</tt>s change
* their values.
*/
public void addVideoPropertyChangeListener(
PropertyChangeListener listener)
{
Iterator<CallPeerSipImpl> peers = getCallPeers();
while (peers.hasNext())
{
CallPeerSipImpl peer = peers.next();
peer.addVideoPropertyChangeListener(listener);
}
}
/**
* Removes <tt>listener</tt> from all <tt>CallPeer</tt>s currently
* participating with the call so that it won't receive furher notifications
* on changes in video related properties (e.g.
* <tt>LOCAL_VIDEO_STREAMING</tt>).
*
* @param listener the <tt>PropertyChangeListener</tt> to unregister from
* member <tt>CallPeer</tt>s change their values.
*/
public void removeVideoPropertyChangeListener(
PropertyChangeListener listener)
{
Iterator<CallPeerSipImpl> peers = getCallPeers();
while (peers.hasNext())
{
CallPeerSipImpl peer = peers.next();
peer.removeVideoPropertyChangeListener(listener);
}
}
}

@ -9,6 +9,7 @@
import gov.nist.javax.sip.header.HeaderFactoryImpl; // disambiguates Contact
import gov.nist.javax.sip.header.extensions.*;
import java.net.*;
import java.text.*;
import java.util.*;
@ -237,82 +238,7 @@ private void putOnHold(CallPeer peer, boolean on)
throws OperationFailedException
{
CallPeerSipImpl sipPeer = (CallPeerSipImpl) peer;
CallSession callSession = sipPeer.getMediaCallSession();
try
{
sendInviteRequest(sipPeer, callSession.createSdpDescriptionForHold(
sipPeer.getSdpDescription(), on));
}
catch (MediaException ex)
{
ProtocolProviderServiceSipImpl.throwOperationFailedException(
"Failed to create SDP offer to hold.",
OperationFailedException.INTERNAL_ERROR, ex, logger);
}
/*
* Putting on hold isn't a negotiation (i.e. the issuing side takes the
* decision and executes it) so we're muting now regardless of the
* desire of the peer to accept the offer.
*/
callSession.putOnHold(on, true);
CallPeerState state = sipPeer.getState();
if (CallPeerState.ON_HOLD_LOCALLY.equals(state))
{
if (!on)
sipPeer.setState(CallPeerState.CONNECTED);
}
else if (CallPeerState.ON_HOLD_MUTUALLY.equals(state))
{
if (!on)
sipPeer.setState(CallPeerState.ON_HOLD_REMOTELY);
}
else if (CallPeerState.ON_HOLD_REMOTELY.equals(state))
{
if (on)
sipPeer.setState(CallPeerState.ON_HOLD_MUTUALLY);
}
else if (on)
{
sipPeer.setState(CallPeerState.ON_HOLD_LOCALLY);
}
}
/**
* Sends an invite request with a specific SDP offer (description) within
* the current <tt>Dialog</tt> with a specific call peer.
*
* @param sipPeer the SIP-specific call peer to send the to within the
* current <tt>Dialog</tt> @param sdpOffer the description of the SDP offer
* to be made to the specified call peer with the sent invite
* @param sdpOffer the offer that we'd like to use for the newly created
* INVITE request.
*
* @throws OperationFailedException if sending the request fails for some
* reason.
*/
void sendInviteRequest(CallPeerSipImpl sipPeer, String sdpOffer)
throws OperationFailedException
{
Dialog dialog = sipPeer.getDialog();
Request invite = messageFactory.createRequest(dialog, Request.INVITE);
try
{
invite.setContent(sdpOffer, protocolProvider.getHeaderFactory()
.createContentTypeHeader("application", "sdp"));
}
catch (ParseException ex)
{
ProtocolProviderServiceSipImpl.throwOperationFailedException(
"Failed to parse SDP offer for the new invite.",
OperationFailedException.INTERNAL_ERROR, ex, logger);
}
protocolProvider.sendInDialogRequest(
sipPeer.getJainSipProvider(), invite, dialog);
sipPeer.putOnHold(on);
}
/**
@ -1518,7 +1444,7 @@ public synchronized void shutdown()
{
CallSipImpl call = activeCalls.next();
Iterator<CallPeer> callPeers = call.getCallPeers();
Iterator<? extends CallPeer> callPeers = call.getCallPeers();
// go through all call peers and say bye to every one.
while (callPeers.hasNext())
@ -1661,10 +1587,12 @@ public void transfer(CallPeer transferee, CallPeer transferTarget)
}
try
{
sipURI.setHeader(ReplacesHeader.NAME, replacesHeader.encodeBody());
sipURI.setHeader(ReplacesHeader.NAME,
URLEncoder.encode(replacesHeader.encodeBody(), "UTF-8"));
}
catch (ParseException ex)
catch (Exception ex)
{
//ParseException or UnsupportedEncodingException
ProtocolProviderServiceSipImpl.throwOperationFailedException(
"Failed to set Replaces header " + replacesHeader
+ " to SipURI " + sipURI,

@ -15,17 +15,17 @@
import net.java.sip.communicator.util.*;
/**
* Implements <code>OperationSetVideoTelephony</code> in order to give access to
* Implements <tt>OperationSetVideoTelephony</tt> in order to give access to
* video-specific functionality in the SIP protocol implementation such as
* visual <code>Component</code>s displaying video and listening to dynamic
* availability of such <code>Component</code>s. Because the video in the SIP
* protocol implementation is provided by the <code>CallSession</code>, this
* <code>OperationSetVideoTelephony</code> just delegates to the
* <code>CallSession</code> while hiding the <code>CallSession</code> as the
* visual <tt>Component</tt>s displaying video and listening to dynamic
* availability of such <tt>Component</tt>s. Because the video in the SIP
* protocol implementation is provided by the <tt>CallSession</tt>, this
* <tt>OperationSetVideoTelephony</tt> just delegates to the
* <tt>CallSession</tt> while hiding the <tt>CallSession</tt> as the
* provider of the video and pretending this
* <code>OperationSetVideoTelephony</code> is the provider because other
* <tt>OperationSetVideoTelephony</tt> is the provider because other
* implementation may not provider their video through the
* <code>CallSession</code>.
* <tt>CallSession</tt>.
*
* @author Lubomir Marinov
*/
@ -39,11 +39,11 @@ public class OperationSetVideoTelephonySipImpl
private final OperationSetBasicTelephonySipImpl basicTelephony;
/**
* Initializes a new <code>OperationSetVideoTelephonySipImpl</code> instance
* Initializes a new <tt>OperationSetVideoTelephonySipImpl</tt> instance
* which builds upon the telephony-related functionality of a specific
* <code>OperationSetBasicTelephonySipImpl</code>.
* <tt>OperationSetBasicTelephonySipImpl</tt>.
*
* @param basicTelephony the <code>OperationSetBasicTelephonySipImpl</code>
* @param basicTelephony the <tt>OperationSetBasicTelephonySipImpl</tt>
* the new extension should build upon
*/
public OperationSetVideoTelephonySipImpl(
@ -52,36 +52,46 @@ public OperationSetVideoTelephonySipImpl(
this.basicTelephony = basicTelephony;
}
/*
/**
* Delegates to the CallSession of the Call of the specified CallPeer
* because the video is provided by the CallSession in the SIP protocol
* implementation. Because other OperationSetVideoTelephony implementations
* may not provide their video through the CallSession, this implementation
* promotes itself as the provider of the video by replacing the CallSession
* in the VideoEvents it fires.
*
* @param peer the <tt>CallPeer</tt> that we will be registering
* <tt>listener</tt> with.
* @param listener the <tt>VideoListener</tt> that we'd like to register.
*/
public void addVideoListener(CallPeer peer,
VideoListener listener)
public void addVideoListener(CallPeer peer, VideoListener listener)
{
if (listener == null)
throw new NullPointerException("listener");
((CallSipImpl) peer.getCall()).getMediaCallSession()
.addVideoListener(
new InternalVideoListener(this, peer, listener));
((CallPeerSipImpl) peer).getMediaCallSession()
.addVideoListener(new InternalVideoListener(this, peer, listener));
}
/*
/**
* Implements OperationSetVideoTelephony#createLocalVisualComponent(
* CallPeer, VideoListener). Delegates to CallSession#createLocalVisualComponent(
* VideoListener) of the Call of the specified CallPeer because the
* CallSession manages the visual components which represent local video.
* CallPeer, VideoListener). Delegates to
* CallSession#createLocalVisualComponent(VideoListener) of the Call of the
* specified CallPeer because the CallSession manages the visual components
* which represent local video.
*
* @param peer the <tt>CallPeer</tt> that we are sending our local video to.
* @param listener the <tt>VideoListener</tt> where we'd like to retrieve
* the <tt>Component</tt> containing the local video.
*
* @return the <tt>Component</tt> containing the local video.
*
* @throws OperationFailedException if we fail extracting the local video.
*/
public Component createLocalVisualComponent(CallPeer peer,
VideoListener listener) throws OperationFailedException
{
CallSession callSession =
((CallSipImpl) peer.getCall()).getMediaCallSession();
CallSession callSession =((CallPeerSipImpl) peer).getMediaCallSession();
if (callSession != null)
{
@ -92,213 +102,206 @@ public Component createLocalVisualComponent(CallPeer peer,
catch (MediaException ex)
{
throw new OperationFailedException(
"Failed to create visual Component for local video (capture).",
OperationFailedException.INTERNAL_ERROR, ex);
"Failed to create visual Component for local "
+"video (capture).",
OperationFailedException.INTERNAL_ERROR, ex);
}
}
return null;
}
/*
/**
* Implements OperationSetVideoTelephony#disposeLocalVisualComponent(
* CallPeer, Component). Delegates to CallSession#disposeLocalVisualComponent(
* Component) of the Call of the specified CallPeer because the
* CallSession manages the visual components which represent local video.
*
* @param peer the <tt>CallPeer</tt> whose local video component we'd like
* to dispose of.
* @param component the <tt>Component</tt> that we'll be disposing of.
*/
public void disposeLocalVisualComponent(CallPeer peer,
Component component)
public void disposeLocalVisualComponent(CallPeer peer, Component component)
{
CallSession callSession =
((CallSipImpl) peer.getCall()).getMediaCallSession();
CallSession callSession =((CallPeerSipImpl) peer).getMediaCallSession();
if (callSession != null)
callSession.disposeLocalVisualComponent(component);
}
/*
/**
* Delegates to the CallSession of the Call of the specified CallPeer
* because the video is provided by the CallSession in the SIP protocol
* implementation.
*
* @param peer the peer whose visual <tt>Component</tt>s we'd like to
* retrieve.
*
* @return all visual <tt>Component</tt>s for the specified <tt>peer</tt>.
*/
public Component[] getVisualComponents(CallPeer peer)
{
CallSession callSession =
((CallSipImpl) peer.getCall()).getMediaCallSession();
CallSession callSession =((CallPeerSipImpl)peer).getMediaCallSession();
return (callSession != null) ? callSession.getVisualComponents()
: new Component[0];
}
/*
/**
* Delegates to the CallSession of the Call of the specified CallPeer
* because the video is provided by the CallSession in the SIP protocol
* implementation. Because other OperationSetVideoTelephony implementations
* may not provide their video through the CallSession, this implementation
* promotes itself as the provider of the video by replacing the CallSession
* in the VideoEvents it fires.
*
* @param peer the <tt>CallPeer</tt> that we'd like to unregister our
* <tt>VideoListener</tt> from.
* @param listener the <tt>VideoListener</tt> that we'd like to unregister.
*/
public void removeVideoListener(CallPeer peer,
VideoListener listener)
public void removeVideoListener(CallPeer peer, VideoListener listener)
{
if (listener != null)
{
((CallSipImpl) peer.getCall()).getMediaCallSession()
((CallPeerSipImpl) peer).getMediaCallSession()
.removeVideoListener(
new InternalVideoListener(this, peer, listener));
}
}
/*
/**
* Implements OperationSetVideoTelephony#setLocalVideoAllowed(Call,
* boolean). Modifies the local media setup to reflect the requested setting
* for the streaming of the local video and then re-invites all
* CallPeers to re-negotiate the modified media setup.
*
* @param call the call where we'd like to allow sending local video.
* @param allowed <tt>true</tt> if local video transmission is allowed and
* <tt>false</tt> otherwise.
*
* @throws OperationFailedException if video initialization fails.
*/
public void setLocalVideoAllowed(Call call, boolean allowed)
throws OperationFailedException
{
/*
* Modify the local media setup to reflect the requested setting for the
* streaming of the local video.
*/
CallSipImpl sipCall = (CallSipImpl) call;
CallSession callSession = sipCall.getMediaCallSession();
try
{
callSession.setLocalVideoAllowed(allowed);
}
catch (MediaException ex)
{
throw new OperationFailedException(
"Failed to allow/disallow the streaming of local video.",
OperationFailedException.INTERNAL_ERROR, ex);
}
/*
* Once the local state has been modified, re-invite all
* CallPeers to re-negotiate the modified media setup.
*/
Iterator<CallPeer> peers = call.getCallPeers();
while (peers.hasNext())
{
CallPeerSipImpl peer
= (CallPeerSipImpl) peers.next();
String sdpOffer = null;
try
{
sdpOffer
= callSession.createSdpOffer(
peer.getSdpDescription());
}
catch (MediaException ex)
{
throw new OperationFailedException(
"Failed to create re-invite offer for peer "
+ peer,
OperationFailedException.INTERNAL_ERROR,
ex);
}
basicTelephony.sendInviteRequest(peer, sdpOffer);
}
((CallSipImpl)call).setLocalVideoAllowed(allowed);
}
/*
* Implements OperationSetVideoTelephony#isLocalVideoAllowed(Call).
* Delegates to CallSession#isLocalVideoAllowed() of the specified Call.
/**
* Determines whether the streaming of local video in a specific
* <tt>Call</tt> is currently allowed. The setting does not reflect
* the availability of actual video capture devices, it just expresses the
* desire of the user to have the local video streamed in the case the
* system is actually able to do so.
*
* @param call the <tt>Call</tt> whose video transmission properties we are
* interested in.
*
* @return <tt>true</tt> if the streaming of local video for the specified
* <tt>Call</tt> is allowed; otherwise, <tt>false</tt>
*/
public boolean isLocalVideoAllowed(Call call)
{
return ((CallSipImpl) call).getMediaCallSession().isLocalVideoAllowed();
return ((CallSipImpl) call).isLocalVideoAllowed();
}
/*
* Implements OperationSetVideoTelephony#isLocalVideoStreaming(Call).
* Delegates to CallSession#isLocalVideoStreaming() of the specified Call.
/**
* Determines whether a specific <tt>Call</tt> is currently streaming the
* local video (to a remote destination).
*
* @param call the <tt>Call</tt> whose video transmission we are interested
* in.
*
* @return <tt>true</tt> if the specified <tt>Call</tt> is currently
* streaming the local video (to a remote destination); otherwise,
* <tt>false</tt>
*/
public boolean isLocalVideoStreaming(Call call)
{
return ((CallSipImpl) call)
.getMediaCallSession().isLocalVideoStreaming();
return ((CallSipImpl) call).isLocalVideoStreaming();
}
/*
* Implements OperationSetVideoTelephony#addPropertyChangeListener(Call,
* PropertyChangeListener). Delegates to CallSession#addPropertyChangeListener(
* PropertyChangeListener) of the specified Call because CallSession
* contains the properties associated with a Call.
/**
* Adds a specific <tt>PropertyChangeListener</tt> to the list of
* listeners which get notified when the properties (e.g.
* {@link #LOCAL_VIDEO_STREAMING}) associated with a specific
* <tt>Call</tt> change their values.
*
* @param call the <tt>Call</tt> to start listening to the changes of
* the property values of
* @param listener the <tt>PropertyChangeListener</tt> to be notified
* when the properties associated with the specified <tt>Call</tt> change
* their values
*/
public void addPropertyChangeListener(
Call call, PropertyChangeListener listener)
public void addPropertyChangeListener(Call call,
PropertyChangeListener listener)
{
((CallSipImpl) call)
.getMediaCallSession().addPropertyChangeListener(listener);
((CallSipImpl) call).addVideoPropertyChangeListener(listener);
}
/*
* Implements OperationSetVideoTelephony#removePropertyChangeListener(Call,
* PropertyChangeListener). Delegates to CallSession#removePropertyChangeListener(
* PropertyChangeListener) of the specified Call because CallSession
* contains the properties associated with a Call.
/**
* Removes a specific <tt>PropertyChangeListener</tt> from the list of
* listeners which get notified when the properties (e.g.
* {@link #LOCAL_VIDEO_STREAMING}) associated with a specific
* <tt>Call</tt> change their values.
*
* @param call the <tt>Call</tt> to stop listening to the changes of the
* property values of
* @param listener the <tt>PropertyChangeListener</tt> to no longer be
* notified when the properties associated with the specified <tt>Call</tt>
* change their values
*/
public void removePropertyChangeListener(
Call call, PropertyChangeListener listener)
public void removePropertyChangeListener(Call call,
PropertyChangeListener listener)
{
((CallSipImpl) call)
.getMediaCallSession().removePropertyChangeListener(listener);
((CallSipImpl) call).removeVideoPropertyChangeListener(listener);
}
/**
* Represents a <code>VideoListener</code> which forwards notifications to a
* specific delegate <code>VideoListener</code> and hides the original
* <code>VideoEvent</code> sender from it by pretending the sender is a
* specific <code>OperationSetVideoTelephony</code>. It's necessary in order
* to hide from the <code>VideoListener</code>s the fact that the video of
* the SIP protocol implementation is managed by <code>CallSession</code>.
* Represents a <tt>VideoListener</tt> which forwards notifications to a
* specific delegate <tt>VideoListener</tt> and hides the original
* <tt>VideoEvent</tt> sender from it by pretending the sender is a
* specific <tt>OperationSetVideoTelephony</tt>. It's necessary in order
* to hide from the <tt>VideoListener</tt>s the fact that the video of
* the SIP protocol implementation is managed by <tt>CallSession</tt>.
*/
private static class InternalVideoListener
implements VideoListener
{
/**
* The <code>VideoListener</code> this implementation hides the original
* <code>VideoEvent</code> source from.
* The <tt>VideoListener</tt> this implementation hides the original
* <tt>VideoEvent</tt> source from.
*/
private final VideoListener delegate;
/**
* The <code>CallPeer</code> whose videos {@link #delegate} is
* The <tt>CallPeer</tt> whose videos {@link #delegate} is
* interested in.
*/
private final CallPeer peer;
/**
* The <code>OperationSetVideoTelephony</code> which is to be presented
* as the source of the <code>VideoEvents</code> forwarded to
* The <tt>OperationSetVideoTelephony</tt> which is to be presented
* as the source of the <tt>VideoEvents</tt> forwarded to
* {@link #delegate}.
*/
private final OperationSetVideoTelephony telephony;
/**
* Initializes a new <code>InternalVideoListener</code> which is to
* impersonate the sources of <code>VideoEvents</code> with a specific
* <code>OperationSetVideoTelephony</code> for a specific
* <code>VideoListener</code> interested in the videos of a specific
* <code>CallPeer</code>.
* Initializes a new <tt>InternalVideoListener</tt> which is to
* impersonate the sources of <tt>VideoEvents</tt> with a specific
* <tt>OperationSetVideoTelephony</tt> for a specific
* <tt>VideoListener</tt> interested in the videos of a specific
* <tt>CallPeer</tt>.
*
* @param telephony the <code>OperationSetVideoTelephony</code> which is
* to be stated as the source of the <code>VideoEvent</code>
* sent to the specified delegate <code>VideoListener</code>
* @param peer the <code>CallPeer</code> whose videos the
* specified delegate <code>VideoListener</code> is
* interested in
* @param delegate the <code>VideoListener</code> which shouldn't know
* that the videos in the SIP protocol implementation is
* managed by the CallSession and not by the specified
* <code>telephony</code>
* @param telephony the <tt>OperationSetVideoTelephony</tt> which is
* to be stated as the source of the <tt>VideoEvent</tt> sent to the
* specified delegate <tt>VideoListener</tt>
* @param peer the <tt>CallPeer</tt> whose videos the specified delegate
* <tt>VideoListener</tt> is interested in
* @param delegate the <tt>VideoListener</tt> which shouldn't know
* that the videos in the SIP protocol implementation is managed by the
* <tt>CallSession</tt> and not by the specified <tt>telephony</tt>
*/
public InternalVideoListener(OperationSetVideoTelephony telephony,
CallPeer peer, VideoListener delegate)
@ -311,10 +314,16 @@ public InternalVideoListener(OperationSetVideoTelephony telephony,
this.delegate = delegate;
}
/*
* Two InternalVideoListeners are equal if they impersonate the sources
* of VideoEvents with equal OperationSetVideoTelephonies for equal
* delegate VideoListeners added to equal CallPeer-s.
/**
* Compares two InternalVideoListeners and determines they are equal
* if they impersonate the sources of VideoEvents with equal
* OperationSetVideoTelephonies for equal delegate VideoListeners added
* to equal CallPeer-s.
*
* @param other the object that we'd be compared to.
*
* @return true if the underlying peer, telephony operation set and
* delegate are equal to those of the <tt>other</tt> instance.
*/
public boolean equals(Object other)
{
@ -330,17 +339,26 @@ public boolean equals(Object other)
&& otherListener.delegate.equals(delegate);
}
/**
* Returns a hashcode based on the hash codes of the wrapped telephony
* operation set and <tt>VideoListener</tt> delegate.
*
* @return a hashcode based on the hash codes of the wrapped telephony
* operation set and <tt>VideoListener</tt> delegate.
*/
public int hashCode()
{
return (telephony.hashCode() << 16) + (delegate.hashCode() >> 16);
}
/*
/**
* Upon receiving a VideoEvent, sends to delegate a new VideoEvent of
* the same type and with the same visual Component but with the source
* of the event being set to #telephony. Thus the fact that the
* CallSession is the original source is hidden from the clients of
* OperationSetVideoTelephony.
*
* @param event the <tt>VideoEvent</tt> containing the visual component
*/
public void videoAdded(VideoEvent event)
{
@ -348,12 +366,15 @@ public void videoAdded(VideoEvent event)
.getVisualComponent(), event.getOrigin()));
}
/*
/**
* Upon receiving a VideoEvent, sends to delegate a new VideoEvent of
* the same type and with the same visual Component but with the source
* of the event being set to #telephony. Thus the fact that the
* CallSession is the original source is hidden from the clients of
* OperationSetVideoTelephony.
*
* @param event the <tt>VideoEvent</tt> containing video details and
* the event component.
*/
public void videoRemoved(VideoEvent event)
{

@ -10,6 +10,7 @@
import gov.nist.javax.sip.header.extensions.*;
import gov.nist.javax.sip.message.*;
import java.net.URLDecoder; //disamgibuates javax.sip.address.URI
import java.text.*;
import java.util.*;
@ -840,9 +841,9 @@ public Request createInviteRequest( Address toAddress,
* </p>
*
* @param cause the SIP <tt>Message</tt> from which the information is
* to be copied
* to be copied
* @param effect the SIP <tt>Message</tt> into which the information is
* to be copied
* to be copied
*/
private void reflectCauseOnEffect(javax.sip.message.Message cause,
javax.sip.message.Message effect)
@ -902,12 +903,13 @@ private Header stripReplacesHeader( Address address )
try
{
replacesHeader =
protocolProvider.getHeaderFactory().createHeader(
ReplacesHeader.NAME, replacesHeaderValue);
replacesHeader = protocolProvider.getHeaderFactory()
.createHeader(ReplacesHeader.NAME,
URLDecoder.decode(replacesHeaderValue, "UTF-8"));
}
catch (ParseException ex)
catch (Exception ex)
{
//ParseException, EncodingNotSupportedException.
throw new OperationFailedException(
"Failed to create ReplacesHeader from "
+ replacesHeaderValue,

@ -612,7 +612,7 @@ private void hangupCall(Call call)
OperationSetBasicTelephony.class);
logger.info("Max Message Length Reached, Mailbox is"
+" disconnecting the call");
Iterator<CallPeer> callPeers = call.getCallPeers();
Iterator<? extends CallPeer> callPeers = call.getCallPeers();
while(callPeers.hasNext())
{

@ -22,6 +22,9 @@
*/
public abstract class Call
{
/**
* Our class logger.
*/
private static final Logger logger = Logger.getLogger(Call.class);
/**
@ -123,7 +126,7 @@ public int hashCode()
* Returns an iterator over all call peers.
* @return an Iterator over all peers currently involved in the call.
*/
public abstract Iterator<CallPeer> getCallPeers();
public abstract Iterator<? extends CallPeer> getCallPeers();
/**
* Returns the number of peers currently associated with this call.

@ -13,9 +13,9 @@
import net.java.sip.communicator.util.*;
/**
* Represents an <code>OperationSet</code> giving access to video-specific
* functionality in telephony such as visual <code>Component</code>s displaying
* video and listening to dynamic availability of such <code>Component</code>s.
* Represents an <tt>OperationSet</tt> giving access to video-specific
* functionality in telephony such as visual <tt>Component</tt>s displaying
* video and listening to dynamic availability of such <tt>Component</tt>s.
*
* @author Lubomir Marinov
*/
@ -24,157 +24,160 @@ public interface OperationSetVideoTelephony
{
/**
* Adds a specific <code>VideoListener</code> to this telephony in order to
* receive notifications when visual/video <code>Component</code>s are being
* added and removed for a specific <code>CallPeer</code>.
* Adds a specific <tt>VideoListener</tt> to this telephony in order to
* receive notifications when visual/video <tt>Component</tt>s are being
* added and removed for a specific <tt>CallPeer</tt>.
*
* @param peer the <code>CallPeer</code> whose video the
* specified listener is to be notified about
* @param listener the <code>VideoListener</code> to be notified when
* visual/video <code>Component</code>s are being added or
* removed for <code>peer</code>
* @param peer the <tt>CallPeer</tt> whose video the specified listener
* is to be notified about
* @param listener the <tt>VideoListener</tt> to be notified when
* visual/video <tt>Component</tt>s are being added or removed for
* <tt>peer</tt>
*/
public void addVideoListener( CallPeer peer, VideoListener listener);
/**
* Creates a visual <code>Component</code> which depicts the local video
* being streamed to a specific <code>CallPeer</code>. The returned
* visual <code>Component</code> should be disposed when it is no longer
* required through {@link #disposeLocalVisualComponent(CallPeer, Component) disposeLocalVisualComponent}.
* Creates a visual <tt>Component</tt> which depicts the local video
* being streamed to a specific <tt>CallPeer</tt>. The returned
* visual <tt>Component</tt> should be disposed when it is no longer
* required through {@link #disposeLocalVisualComponent(CallPeer,
* Component) disposeLocalVisualComponent}.
*
* @param peer the <code>CallPeer</code> to whom the local
* video which is to be depicted by the returned visual
* <code>Component</code> is being streamed
* @param listener if not <tt>null</tt>, a <code>VideoListener</code> to
* track the progress of the creation in case this telephony
* chooses to perform it asynchronously and to not return the
* created visual <code>Component</code> immediately/as the
* result of this method call
* @return a visual <code>Component</code> which depicts the local video
* being streamed to the specified <code>CallPeer</code> if
* this telephony chooses to carry out the creation synchronously;
* <tt>null</tt> if this telephony chooses to create the requested
* visual <code>Component</code> asynchronously.
* @param peer the <tt>CallPeer</tt> to whom the local video which is to be
* depicted by the returned visual <tt>Component</tt> is being streamed
* @param listener if not <tt>null</tt>, a <tt>VideoListener</tt> to track
* the progress of the creation in case this telephony chooses to perform it
* asynchronously and to not return the created visual <tt>Component</tt>
* immediately/as the result of this method call
*
* @return a visual <tt>Component</tt> which depicts the local video being
* streamed to the specified <tt>CallPeer</tt> if this telephony chooses to
* carry out the creation synchronously; <tt>null</tt> if this telephony
* chooses to create the requested visual <tt>Component</tt> asynchronously.
*
* @throws OperationFailedException if creating the component fails for
* whatever reason.
*/
public Component createLocalVisualComponent(
CallPeer peer, VideoListener listener)
public Component createLocalVisualComponent(CallPeer peer,
VideoListener listener)
throws OperationFailedException;
/**
* Disposes of a visual <code>Component</code> depicting the local video for
* a specific <code>CallPeer</code> (previously obtained through
* {@link #createLocalVisualComponent(CallPeer, VideoListener) createLocalVisualComponent}).
* Disposes of a visual <tt>Component</tt> depicting the local video for
* a specific <tt>CallPeer</tt> (previously obtained through
* {@link #createLocalVisualComponent(CallPeer, VideoListener)
* createLocalVisualComponent}).
* The disposal may include, but is not limited to, releasing the
* <code>Player</code> which provides the <code>component</code> and renders
* <tt>Player</tt> which provides the <tt>component</tt> and renders
* the local video into it, disconnecting from the video capture device.
*
* @param peer the <code>CallPeer</code> for whom the visual
* <code>Component</code> depicts the local video
* @param component the visual <code>Component</code> depicting the local
* video to be disposed
* @param peer the <tt>CallPeer</tt> for whom the visual <tt>Component</tt>
* depicts the local video
* @param component the visual <tt>Component</tt> depicting the local video
* to be disposed
*/
public void disposeLocalVisualComponent(
CallPeer peer, Component component);
public void disposeLocalVisualComponent(CallPeer peer, Component component);
/**
* Gets the visual/video <code>Component</code>s available in this telephony
* for a specific <code>CallPeer</code>.
* Gets the visual/video <tt>Component</tt>s available in this telephony
* for a specific <tt>CallPeer</tt>.
*
* @param peer the <code>CallPeer</code> whose videos are to
* be retrieved
* @return an array of the visual <code>Component</code>s available in this
* telephony for the specified <code>peer</code>
* @param peer the <tt>CallPeer</tt> whose videos are to be retrieved
*
* @return an array of the visual <tt>Component</tt>s available in this
* telephony for the specified <tt>peer</tt>
*/
public Component[] getVisualComponents(CallPeer peer);
/**
* Removes a specific <code>VideoListener</code> from this telephony in
* Removes a specific <tt>VideoListener</tt> from this telephony in
* order to no longer have it receive notifications when visual/video
* <code>Component</code>s are being added and removed for a specific
* <code>CallPeer</code>.
* <tt>Component</tt>s are being added and removed for a specific
* <tt>CallPeer</tt>.
*
* @param peer the <code>CallPeer</code> whose video the
* specified listener is to no longer be notified about
* @param listener the <code>VideoListener</code> to no longer be notified
* when visual/video <code>Component</code>s are being added or
* removed for <code>peer</code>
* @param peer the <tt>CallPeer</tt> whose video the specified listener is
* to no longer be notified about
* @param listener the <tt>VideoListener</tt> to no longer be notified
* when visual/video <tt>Component</tt>s are being added or removed for
* <tt>peer</tt>
*/
public void removeVideoListener(
CallPeer peer, VideoListener listener);
public void removeVideoListener(CallPeer peer, VideoListener listener);
/**
* Sets the indicator which determines whether the streaming of local video
* in a specific <code>Call</code> is allowed. The setting does not reflect
* in a specific <tt>Call</tt> is allowed. The setting does not reflect
* the availability of actual video capture devices, it just expresses the
* desire of the user to have the local video streamed in the case the
* system is actually able to do so.
*
* @param call the <code>Call</code> to allow/disallow the streaming of
* local video for
* @param call the <tt>Call</tt> to allow/disallow the streaming of local
* video for
* @param allowed <tt>true</tt> to allow the streaming of local video for
* the specified <code>Call</code>; <tt>false</tt> to disallow it
* the specified <tt>Call</tt>; <tt>false</tt> to disallow it
*
* @throws OperationFailedException if initializing local video fails.
*/
public void setLocalVideoAllowed(Call call, boolean allowed)
throws OperationFailedException;
/**
* Gets the indicator which determines whether the streaming of local video
* in a specific <code>Call</code> is allowed. The setting does not reflect
* in a specific <tt>Call</tt> is allowed. The setting does not reflect
* the availability of actual video capture devices, it just expresses the
* desire of the user to have the local video streamed in the case the
* system is actually able to do so.
*
* @param call the <code>Call</code> to get the indicator of
* @param call the <tt>Call</tt> to get the indicator of
* @return <tt>true</tt> if the streaming of local video for the specified
* <code>Call</code> is allowed; otherwise, <tt>false</tt>
* <tt>Call</tt> is allowed; otherwise, <tt>false</tt>
*/
public boolean isLocalVideoAllowed(Call call);
/**
* The property which indicates whether a specific <code>Call</code> is
* The property which indicates whether a specific <tt>Call</tt> is
* currently streaming the local video (to a remote destination).
*/
public static final String LOCAL_VIDEO_STREAMING
= CallSession.LOCAL_VIDEO_STREAMING;
/**
* Gets the indicator which determines whether a specific <code>Call</code>
* Gets the indicator which determines whether a specific <tt>Call</tt>
* is currently streaming the local video (to a remote destination).
*
* @param call the <code>Call</code> to get the indicator of
* @return <tt>true</tt> if the specified <code>Call</code> is currently
* streaming the local video (to a remote destination); otherwise,
* <tt>false</tt>
* @param call the <tt>Call</tt> to get the indicator of
* @return <tt>true</tt> if the specified <tt>Call</tt> is currently
* streaming the local video (to a remote destination); otherwise,
* <tt>false</tt>
*/
public boolean isLocalVideoStreaming(Call call);
/**
* Adds a specific <code>PropertyChangeListener</code> to the list of
* Adds a specific <tt>PropertyChangeListener</tt> to the list of
* listeners which get notified when the properties (e.g.
* {@link #LOCAL_VIDEO_STREAMING}) associated with a specific
* <code>Call</code> change their values.
* <tt>Call</tt> change their values.
*
* @param call the <code>Call</code> to start listening to the changes of
* the property values of
* @param listener the <code>PropertyChangeListener</code> to be notified
* when the properties associated with the specified
* <code>Call</code> change their values
* @param call the <tt>Call</tt> to start listening to the changes of
* the property values of
* @param listener the <tt>PropertyChangeListener</tt> to be notified
* when the properties associated with the specified <tt>Call</tt> change
* their values
*/
public void addPropertyChangeListener(
Call call, PropertyChangeListener listener);
public void addPropertyChangeListener(Call call,
PropertyChangeListener listener);
/**
* Removes a specific <code>PropertyChangeListener</code> from the list of
* Removes a specific <tt>PropertyChangeListener</tt> from the list of
* listeners which get notified when the properties (e.g.
* {@link #LOCAL_VIDEO_STREAMING}) associated with a specific
* <code>Call</code> change their values.
* <tt>Call</tt> change their values.
*
* @param call the <code>Call</code> to stop listening to the changes of the
* property values of
* @param listener the <code>PropertyChangeListener</code> to no longer be
* notified when the properties associated with the specified
* <code>Call</code> change their values
* @param call the <tt>Call</tt> to stop listening to the changes of the
* property values of
* @param listener the <tt>PropertyChangeListener</tt> to no longer be
* notified when the properties associated with the specified <tt>Call</tt>
* change their values
*/
public void removePropertyChangeListener(
Call call, PropertyChangeListener listener);
public void removePropertyChangeListener(Call call,
PropertyChangeListener listener);
}

@ -12,7 +12,7 @@
* A "ConfigurationChange" event gets fired whenever a configuration property
* changes. Depending on whether the property was constrained or not, the
* propertyChange or vetoableChange methods get called.
*
*
* @author Emil Ivov
*/
public interface PropertyChangeListener
@ -20,9 +20,9 @@ public interface PropertyChangeListener
{
/**
* This method gets called when a bound property is changed.
*
*
* @param evt A PropertyChangeEvent object describing the event source and
* the property that has changed.
* the property that has changed.
*/
void propertyChange(PropertyChangeEvent evt);
}

Loading…
Cancel
Save