mirror of https://github.com/sipwise/jitsi.git
Renames CallParticipant to CallPeer so that it would better reflect our new Call architecture that also includes conferencing and ConferenceMembers
parent
2cd08f0a85
commit
4884f5a92b
@ -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);
|
||||
}
|
||||
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
Loading…
Reference in new issue