aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2010-06-14 12:36:51 +0000
committerDamian Minkov <damencho@jitsi.org>2010-06-14 12:36:51 +0000
commitbf4d3f5ef66c3f17585953eb3b56084a0cdff14d (patch)
treeb70b20ea20054398004ea9be8982b52d678685b2 /src
parent161e8625ef60f656708ce96411503cb8ad96a305 (diff)
downloadjitsi-bf4d3f5ef66c3f17585953eb3b56084a0cdff14d.zip
jitsi-bf4d3f5ef66c3f17585953eb3b56084a0cdff14d.tar.gz
jitsi-bf4d3f5ef66c3f17585953eb3b56084a0cdff14d.tar.bz2
Remove unused code, muting individual call peers.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallManager.java36
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java59
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java20
-rw-r--r--src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java21
-rw-r--r--src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java15
5 files changed, 1 insertions, 150 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
index 71d99e3..e4afa5b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
@@ -321,16 +321,6 @@ public class CallManager
}
/**
- * Mutes the given <tt>callPeer</tt>.
- * @param callPeer the peer to mute
- * @param isMute indicates the action (disable or enable mute)
- */
- public static void mute(CallPeer callPeer, boolean isMute)
- {
- new MuteCallPeerThread(callPeer, isMute).start();
- }
-
- /**
* Transfers the given <tt>peer</tt> to the given <tt>target</tt>.
* @param peer the <tt>CallPeer</tt> to transfer
* @param target the <tt>CallPeer</tt> target to transfer to
@@ -924,32 +914,6 @@ public class CallManager
}
/**
- * Mutes the given <tt>CallPeer</tt>.
- */
- private static class MuteCallPeerThread
- extends Thread
- {
- private final CallPeer callPeer;
-
- private final boolean isMute;
-
- public MuteCallPeerThread(CallPeer callPeer, boolean isMute)
- {
- this.callPeer = callPeer;
- this.isMute = isMute;
- }
-
- public void run()
- {
- OperationSetBasicTelephony telephony =
- callPeer.getProtocolProvider()
- .getOperationSet(OperationSetBasicTelephony.class);
-
- telephony.setMute(callPeer, isMute);
- }
- }
-
- /**
* Stops all telephony related sounds.
*/
private static void stopAllSounds()
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java
index 92fe133..89776fd 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/CallPeerMenu.java
@@ -28,8 +28,7 @@ import net.java.sip.communicator.util.swing.*;
*/
public class CallPeerMenu
extends SIPCommMenu
- implements CallPeerListener,
- PropertyChangeListener
+ implements CallPeerListener
{
private final CallPeer callPeer;
@@ -45,8 +44,6 @@ public class CallPeerMenu
private final String unmuteText = GuiActivator.getResources()
.getI18NString("service.gui.UNMUTE");
- private final JMenuItem muteMenuItem = new JMenuItem(muteText);
-
/**
* Creates a <tt>CallPeerActionMenuBar</tt> by specifying the associated
* <tt>callPeer</tt>.
@@ -86,12 +83,6 @@ public class CallPeerMenu
// changes. We'll be using these notifications in order to update the
// hold menu item state.
peer.addCallPeerListener(this);
-
- /* Disable per peer muting
- initMuteMenuItem();
- this.add(muteMenuItem);
- peer.addPropertyChangeListener(this);
- */
}
/**
@@ -119,30 +110,6 @@ public class CallPeerMenu
}
/**
- * Initializes the mute menu item.
- */
- private void initMuteMenuItem()
- {
- muteMenuItem.addActionListener(
- new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- if (muteMenuItem.getText().equals(muteText))
- {
- CallManager.mute(callPeer, true);
- muteMenuItem.setText(unmuteText);
- }
- else
- {
- CallManager.mute(callPeer, false);
- muteMenuItem.setText(muteText);
- }
- }
- });
- }
-
- /**
* Implements <tt>{@link CallPeerListener#peerStateChanged
* (CallPeerChangeEvent)}</tt>
* in order to update the "Put on/off hold" menu item to fit the current
@@ -174,28 +141,4 @@ public class CallPeerMenu
public void peerImageChanged(CallPeerChangeEvent evt) {}
public void peerTransportAddressChanged(CallPeerChangeEvent evt) {}
-
- /**
- * Implements <tt>
- * {@link PropertyChangeListener#propertyChange(PropertyChangeEvent)}</tt>
- * in order to update the "Mute/Unmute" menu item to fit the current state
- * of the mute property for this call peer.
- *
- * @param evt the <tt>PropertyChangeEvent</tt> that notified us of the
- * property change
- */
- public void propertyChange(PropertyChangeEvent evt)
- {
- String propertyName = evt.getPropertyName();
-
- if (propertyName.equals(CallPeer.MUTE_PROPERTY_NAME))
- {
- boolean isMute = (Boolean) evt.getNewValue();
-
- if (isMute)
- muteMenuItem.setText(unmuteText);
- else
- muteMenuItem.setText(muteText);
- }
- }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java
index d78ef6c..1ca3f0e 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetBasicTelephonySipImpl.java
@@ -1514,26 +1514,6 @@ public class OperationSetBasicTelephonySipImpl
}
/**
- * Sets the mute state of the audio stream being sent to a specific
- * <tt>CallPeer</tt>.
- * <p>
- * The implementation sends silence through the audio stream.
- * </p>
- *
- * @param peer the <tt>CallPeer</tt> who receives the audio stream to have
- * its mute state set
- * @param mute <tt>true</tt> to mute the audio stream being sent to
- * <tt>peer</tt>; otherwise, <tt>false</tt>
- */
- @Override
- public void setMute(CallPeer peer, boolean mute)
- {
- CallPeerSipImpl sipPeer = (CallPeerSipImpl) peer;
-
- sipPeer.setMute(mute);
- }
-
- /**
* Sets the mute state of the <tt>Call</tt>.
* <p>
* Muting audio streams sent from the call is implementation specific
diff --git a/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java
index 683c8a4..fbd7278 100644
--- a/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java
+++ b/src/net/java/sip/communicator/service/protocol/AbstractOperationSetBasicTelephony.java
@@ -103,27 +103,6 @@ public abstract class AbstractOperationSetBasicTelephony
}
/**
- * Sets the mute state of the audio stream being sent to a specific
- * <tt>CallPeer</tt>.
- * <p>
- * The default implementation does nothing.
- * </p>
- *
- * @param peer the <tt>CallPeer</tt> who receives the audio
- * stream to have its mute state set
- * @param mute <tt>true</tt> to mute the audio stream being sent to
- * <tt>peer</tt>; otherwise, <tt>false</tt>
- */
- public void setMute(CallPeer peer, boolean mute)
- {
- /*
- * While throwing UnsupportedOperationException may be a possible
- * approach, putOnHold/putOffHold just do nothing when not supported so
- * this implementation takes inspiration from them.
- */
- }
-
- /**
* Sets the mute state of the <tt>Call</tt>.
* <p>
* Muting audio streams sent from the call is implementation specific
diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java b/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java
index 911a455..9a7540a 100644
--- a/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java
+++ b/src/net/java/sip/communicator/service/protocol/OperationSetBasicTelephony.java
@@ -136,21 +136,6 @@ public interface OperationSetBasicTelephony
public Iterator<? extends Call> getActiveCalls();
/**
- * Sets the mute state of the audio stream being sent to a specific
- * <tt>CallPeer</tt>.
- * <p>
- * Muting an audio stream is implementation specific and one of the possible
- * approaches to it is sending silence.
- * </p>
- *
- * @param peer the <tt>CallPeer</tt> who receives the audio
- * stream to have its mute state set
- * @param mute <tt>true</tt> to mute the audio stream being sent to
- * <tt>peer</tt>; otherwise, <tt>false</tt>
- */
- public void setMute(CallPeer peer, boolean mute);
-
- /**
* Sets the mute state of the <tt>Call</tt>.
* <p>
* Muting audio streams sent from the call is implementation specific