Check if we're the focus of the conference and adjust the user interface accordingly.

cusax-fix
Yana Stamcheva 16 years ago
parent 47930e6b59
commit b518e93f84

@ -521,8 +521,8 @@ public void conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent) {}
*/
private boolean isConference()
{
// If we have more than one peer, we're in a conference call.
if (call.getCallPeerCount() > 1)
// If we're the focus of the conference.
if (call.isConferenceFocus())
return true;
// If one of our peers is a conference focus, we're in a

@ -86,7 +86,8 @@ public ConferenceCallPanel(CallDialog callDialog, Call c)
mainPanel.setLayout(new GridBagLayout());
this.addLocalCallPeer();
if (call.isConferenceFocus())
this.addLocalCallPeer();
Iterator<? extends CallPeer> iterator = this.call.getCallPeers();
while (iterator.hasNext())
@ -145,6 +146,7 @@ public void addCallPeerPanel(CallPeer peer)
if (peer.isConferenceFocus())
{
peerRenderer = new ConferenceFocusPanel(callDialog, peer);
peer.addConferenceMembersSoundLevelListener(
(ConferenceFocusPanel) peerRenderer);
peer.addCallPeerConferenceListener(

@ -159,4 +159,18 @@ public void peerImageChanged(CallPeerChangeEvent evt)
public void peerTransportAddressChanged(CallPeerChangeEvent evt)
{}
/**
* Gets the indicator which determines whether the local peer represented by
* this <tt>Call</tt> is acting as a conference focus and thus should send
* the &quot;isfocus&quot; parameter in the Contact headers of its outgoing
* SIP signaling.
*
* @return <tt>true</tt> if the local peer represented by this <tt>Call</tt>
* is acting as a conference focus; otherwise, <tt>false</tt>
*/
public boolean isConferenceFocus()
{
return true;
}
}

@ -255,4 +255,18 @@ public CallSession getMediaCallSession()
{
return this.mediaCallSession;
}
/**
* Gets the indicator which determines whether the local peer represented by
* this <tt>Call</tt> is acting as a conference focus and thus should send
* the &quot;isfocus&quot; parameter in the Contact headers of its outgoing
* SIP signaling.
*
* @return <tt>true</tt> if the local peer represented by this <tt>Call</tt>
* is acting as a conference focus; otherwise, <tt>false</tt>
*/
public boolean isConferenceFocus()
{
return false;
}
}

@ -133,4 +133,17 @@ public void peerTransportAddressChanged(CallPeerChangeEvent
{
}
/**
* Gets the indicator which determines whether the local peer represented by
* this <tt>Call</tt> is acting as a conference focus and thus should send
* the &quot;isfocus&quot; parameter in the Contact headers of its outgoing
* SIP signaling.
*
* @return <tt>true</tt> if the local peer represented by this <tt>Call</tt>
* is acting as a conference focus; otherwise, <tt>false</tt>
*/
public boolean isConferenceFocus()
{
return false;
}
}

@ -582,7 +582,7 @@ public void removeVideoPropertyChangeListener(
* @return <tt>true</tt> if the local peer represented by this <tt>Call</tt>
* is acting as a conference focus; otherwise, <tt>false</tt>
*/
boolean isConferenceFocus()
public boolean isConferenceFocus()
{
return conferenceFocus;
}

@ -196,7 +196,8 @@ protected void fireCallPeerEvent(CallPeer sourceCallPeer,
Iterator<CallChangeListener> listeners;
synchronized(callListeners)
{
listeners = new ArrayList<CallChangeListener>(callListeners).iterator();
listeners
= new ArrayList<CallChangeListener>(callListeners).iterator();
}
while(listeners.hasNext())
@ -248,7 +249,8 @@ protected void fireCallChangeEvent( String type,
Iterator<CallChangeListener> listeners;
synchronized(callListeners)
{
listeners = new ArrayList<CallChangeListener>(callListeners).iterator();
listeners
= new ArrayList<CallChangeListener>(callListeners).iterator();
}
while(listeners.hasNext())
@ -306,7 +308,19 @@ public boolean isDefaultEncrypted()
*
* @return include the ZRTP attribute to SIP/SDP
*/
public boolean isSipZrtpAttribute() {
public boolean isSipZrtpAttribute()
{
return sipZrtpAttribute;
}
/**
* Gets the indicator which determines whether the local peer represented by
* this <tt>Call</tt> is acting as a conference focus and thus should send
* the &quot;isfocus&quot; parameter in the Contact headers of its outgoing
* SIP signaling.
*
* @return <tt>true</tt> if the local peer represented by this <tt>Call</tt>
* is acting as a conference focus; otherwise, <tt>false</tt>
*/
public abstract boolean isConferenceFocus();
}

Loading…
Cancel
Save