Update ice4j.jar that now supports UPnP candidates harvesting. Note that UPnP is not enabled by default for the moment (it can be enabled in the advanced tab of your Jabber account).

cusax-fix
Sebastien Vincent 15 years ago
parent eb143572d3
commit 56a96fbf7c

@ -1222,6 +1222,7 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/netaddr"
prefix="net/java/sip/communicator/impl/netaddr"/>
<zipfileset src="${lib.noinst}/ice4j.jar" prefix=""/>
<zipfileset src="${lib.noinst}/weupnp-0.1.2-SNAPSHOT.jar" prefix=""/>
</jar>
</target>

@ -66,5 +66,6 @@
<classpathentry kind="lib" path="lib/installer-exclude/jnsapi.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/mac_widgets-0.9.5.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/forms-1.2.1.jar"/>
<classpathentry kind="lib" path="lib/installer-exclude/weupnp-0.1.2-SNAPSHOT.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -123,7 +123,7 @@
<compilation-unit>
<package-root>src</package-root>
<classpath
mode="compile">lib/felix.jar:lib/jdic-all.jar:lib/bundle/junit.jar:lib/bundle/log4j.jar:lib/bundle/commons-logging.jar:lib/installer-exclude/concurrent.jar:lib/installer-exclude/dict4j.jar:lib/installer-exclude/dnsjava.jar:lib/installer-exclude/jain-sip-api.jar:lib/installer-exclude/jain-sip-ri.jar:lib/installer-exclude/jain-sdp.jar:lib/installer-exclude/jcalendar-1.3.2.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/jdom.jar:lib/installer-exclude/jmf.jar:lib/installer-exclude/jml-1.0b5.jar:lib/installer-exclude/joscar-client.jar:lib/installer-exclude/joscar-common.jar:lib/installer-exclude/joscar-protocol.jar:lib/installer-exclude/jsocks-klea.jar:lib/installer-exclude/jspeex.jar:lib/installer-exclude/junit.jar:lib/installer-exclude/log4j-1.2.8.jar:lib/installer-exclude/nist-sdp-1.0.jar:lib/installer-exclude/rome-0.9.jar:lib/installer-exclude/smack.jar:lib/installer-exclude/smackx.jar:lib/installer-exclude/ymsg_network_v0_67.jar:lib/installer-exclude/fmj.jar:lib/installer-exclude/jna.jar:lib/installer-exclude/lti-civil-no_s_w_t.jar:lib/installer-exclude/swing-worker-1.2.jar:lib/os-specific/linux/installer-exclude/jmf.jar:lib/os-specific/linux/jdic_stub.jar:lib/os-specific/mac/OrangeExtensions.jar:lib/os-specific/mac/growl4j.jar:lib/os-specific/mac/jdic_stub.jar:lib/os-specific/mac/installer-exclude/jmf.jar:lib/os-specific/mac/installer-exclude/dock.jar:lib/os-specific/windows/jdic_stub.jar:lib/os-specific/windows/installer-exclude/jmf.jar:lib/os-specific/windows/installer-exclude/sound.jar:lib/installer-exclude/aclibico-2.1.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/pircbot.jar:lib/os-specific/solaris/jdic_stub.jar:lib/os-specific/solaris/installer-exclude/jmf.jar:lib/installer-exclude/jsch-0.1.36.jar:lib/installer-exclude/apache-ant-1.7.0.jar:lib/installer-exclude/izpack-shortcut-link.jar:lib/installer-exclude/jfontchooser-1.0.5.jar:lib/installer-exclude/laf-widget.jar:lib/installer-exclude/transparency.jar:lib/installer-exclude/zrtp4j-light.jar:lib/installer-exclude/lcrypto-jdk16-143.jar:lib/installer-exclude/otr4j.jar:lib/installer-exclude/profiler4j-1.0-beta3-SC.jar:lib/installer-exclude/httpcore-4.0.1.jar:lib/installer-exclude/httpclient-4.0.1.jar:lib/installer-exclude/json-20090723.jar:lib/installer-exclude/ice4j.jar:lib/installer-exclude/dhcp4java-1.00.jar:lib/installer-exclude/jmdns.jar:lib/installer-exclude/jmyspell-core.jar:lib/installer-exclude/jnsapi.jar:lib/installer-exclude/mac_widgets-0.9.5.jar:lib/installer-exclude/forms-1.2.1.jar</classpath>
mode="compile">lib/felix.jar:lib/jdic-all.jar:lib/bundle/junit.jar:lib/bundle/log4j.jar:lib/bundle/commons-logging.jar:lib/installer-exclude/concurrent.jar:lib/installer-exclude/dict4j.jar:lib/installer-exclude/dnsjava.jar:lib/installer-exclude/jain-sip-api.jar:lib/installer-exclude/jain-sip-ri.jar:lib/installer-exclude/jain-sdp.jar:lib/installer-exclude/jcalendar-1.3.2.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/jdom.jar:lib/installer-exclude/jmf.jar:lib/installer-exclude/jml-1.0b5.jar:lib/installer-exclude/joscar-client.jar:lib/installer-exclude/joscar-common.jar:lib/installer-exclude/joscar-protocol.jar:lib/installer-exclude/jsocks-klea.jar:lib/installer-exclude/jspeex.jar:lib/installer-exclude/junit.jar:lib/installer-exclude/log4j-1.2.8.jar:lib/installer-exclude/nist-sdp-1.0.jar:lib/installer-exclude/rome-0.9.jar:lib/installer-exclude/smack.jar:lib/installer-exclude/smackx.jar:lib/installer-exclude/ymsg_network_v0_67.jar:lib/installer-exclude/fmj.jar:lib/installer-exclude/jna.jar:lib/installer-exclude/lti-civil-no_s_w_t.jar:lib/installer-exclude/swing-worker-1.2.jar:lib/os-specific/linux/installer-exclude/jmf.jar:lib/os-specific/linux/jdic_stub.jar:lib/os-specific/mac/OrangeExtensions.jar:lib/os-specific/mac/growl4j.jar:lib/os-specific/mac/jdic_stub.jar:lib/os-specific/mac/installer-exclude/jmf.jar:lib/os-specific/mac/installer-exclude/dock.jar:lib/os-specific/windows/jdic_stub.jar:lib/os-specific/windows/installer-exclude/jmf.jar:lib/os-specific/windows/installer-exclude/sound.jar:lib/installer-exclude/aclibico-2.1.jar:lib/installer-exclude/jdic_misc.jar:lib/installer-exclude/pircbot.jar:lib/os-specific/solaris/jdic_stub.jar:lib/os-specific/solaris/installer-exclude/jmf.jar:lib/installer-exclude/jsch-0.1.36.jar:lib/installer-exclude/apache-ant-1.7.0.jar:lib/installer-exclude/izpack-shortcut-link.jar:lib/installer-exclude/jfontchooser-1.0.5.jar:lib/installer-exclude/laf-widget.jar:lib/installer-exclude/transparency.jar:lib/installer-exclude/zrtp4j-light.jar:lib/installer-exclude/lcrypto-jdk16-143.jar:lib/installer-exclude/otr4j.jar:lib/installer-exclude/profiler4j-1.0-beta3-SC.jar:lib/installer-exclude/httpcore-4.0.1.jar:lib/installer-exclude/httpclient-4.0.1.jar:lib/installer-exclude/json-20090723.jar:lib/installer-exclude/ice4j.jar:lib/installer-exclude/dhcp4java-1.00.jar:lib/installer-exclude/jmdns.jar:lib/installer-exclude/jmyspell-core.jar:lib/installer-exclude/jnsapi.jar:lib/installer-exclude/mac_widgets-0.9.5.jar:lib/installer-exclude/forms-1.2.1.jar:lib/installer-exclude/weupnp-0.1.2-SNAPSHOT.jar</classpath>
<built-to>classes</built-to>
<source-level>1.5</source-level>
</compilation-unit>

Binary file not shown.

@ -715,6 +715,7 @@ plugin.jabberaccregwizz.RELAY_SUPPORT=Support relay
plugin.jabberaccregwizz.ADD_JINGLE_NODE=Add Jingle Node
plugin.jabberaccregwizz.JID_ADDRESS=JID Address
plugin.jabberaccregwizz.ADDITIONAL_JINGLE_NODES=Additional Jingle Nodes
plugin.jabberaccregwizz.USE_UPNP=Use UPnP
# mailbox
plugin.mailbox.OUTGOING=Outgoing Message:

@ -21,12 +21,25 @@
public class NetaddrActivator
implements BundleActivator
{
/**
* The logger for this class.
*/
private static Logger logger =
Logger.getLogger(NetworkAddressManagerServiceImpl.class);
/**
* The OSGi bundle context.
*/
private static BundleContext bundleContext = null;
/**
* The network address manager implementation.
*/
private NetworkAddressManagerServiceImpl networkAMS = null;
/**
* The configuration service.
*/
private static ConfigurationService configurationService = null;
/**

@ -9,6 +9,8 @@ Import-Package: net.java.sip.communicator.service.configuration,
net.java.sip.communicator.util,
org.osgi.framework,
org.ice4j.stack,
org.xml.sax,
org.xml.sax.helpers,
javax.crypto,
javax.crypto.spec
Export-Package: net.java.sip.communicator.service.netaddr,

@ -208,6 +208,16 @@ private Agent createIceAgent()
}
}
if(accID.isUPNPEnabled())
{
UPNPHarvester harvester = new UPNPHarvester();
if(harvester != null)
{
agent.addCandidateHarvester(harvester);
}
}
return agent;
}

@ -169,4 +169,17 @@ public boolean isJingleNodesRelayEnabled()
ProtocolProviderFactory.IS_USE_JINGLE_NODES,
true);
}
/**
* Determines whether this account's provider uses UPnP (if available).
*
* @return <tt>true</tt> if this provider would use UPnP (if available),
* <tt>false</tt> otherwise
*/
public boolean isUPNPEnabled()
{
return getAccountPropertyBoolean(
ProtocolProviderFactory.IS_USE_UPNP,
false);
}
}

@ -199,6 +199,8 @@ public void commitPage()
for (JingleNodeDescriptor descriptor : jingleNodes)
registration.addJingleNodes(descriptor);
registration.setUseUPNP(iceConfigPanel.isUseUPNP());
nextPageIdentifier = SUMMARY_PAGE_IDENTIFIER;
this.isCommitted = true;
@ -316,6 +318,16 @@ public void loadAccount(ProtocolProviderService protocolProvider)
iceConfigPanel.setAutoDiscoverStun(isUseAutoDiscoverStun);
String useDefaultStun
= accountProperties.get(
ProtocolProviderFactory.USE_DEFAULT_STUN_SERVER);
boolean isUseDefaultStun = Boolean.parseBoolean(
(useDefaultStun != null &&
useDefaultStun.length() != 0) ?
useDefaultStun : "true");
iceConfigPanel.setUseDefaultStunServer(isUseDefaultStun);
for (int i = 0; i < StunServerDescriptor.MAX_STUN_SERVER_COUNT; i ++)
{
StunServerDescriptor stunServer
@ -363,6 +375,13 @@ public void loadAccount(ProtocolProviderService protocolProvider)
iceConfigPanel.addJingleNodes(jn);
}
String useUPNP =
accountProperties.get(ProtocolProviderFactory.IS_USE_UPNP);
boolean isUseUPNP = Boolean.parseBoolean(
(useUPNP != null && useUPNP.length() != 0) ? useUPNP : "false");
iceConfigPanel.setUseUPNP(isUseUPNP);
this.isServerOverridden
= accountID.getAccountPropertyBoolean(
ProtocolProviderFactory.IS_SERVER_OVERRIDDEN,

@ -77,6 +77,12 @@ public class IceConfigPanel
private final JCheckBox jnAutoDiscoverBox = new SIPCommCheckBox(
Resources.getString("plugin.jabberaccregwizz.AUTO_DISCOVER_JN"));
/**
* The check box allowing the user to choose to use JingleNodes.
*/
private final JCheckBox upnpBox = new SIPCommCheckBox(
Resources.getString("plugin.jabberaccregwizz.USE_UPNP"));
/**
* The table model for our additional stun servers table.
*/
@ -110,8 +116,11 @@ public IceConfigPanel()
jnBox.setSelected(true);
jnAutoDiscoverBox.setSelected(true);
//upnpBox.setSelected(true);
JPanel checkBoxPanel = new TransparentPanel(new GridLayout(0, 1));
checkBoxPanel.add(iceBox);
checkBoxPanel.add(upnpBox);
checkBoxPanel.add(autoDiscoverBox);
checkBoxPanel.add(defaultStunBox);
@ -1251,4 +1260,25 @@ protected void modifyJingleNodes(JingleNodeDescriptor jingleNode)
}
}
}
/**
* Indicates if UPnP should be used for this account.
* @return <tt>true</tt> if UPnP should be used for this account, otherwise
* returns <tt>false</tt>
*/
protected boolean isUseUPNP()
{
return iceBox.isSelected();
}
/**
* Sets the <tt>useUPNP</tt> property.
* @param isUseUPNP <tt>true</tt> to indicate that UPNP should be used for
* this account, <tt>false</tt> - otherwise.
*/
protected void setUseUPNP(boolean isUseUPNP)
{
upnpBox.setSelected(isUseUPNP);
}
}

@ -120,6 +120,11 @@ public class JabberAccountRegistration
private List<JingleNodeDescriptor> additionalJingleNodes
= new ArrayList<JingleNodeDescriptor>();
/**
* Indicates if UPnP should be used.
*/
private boolean isUseUPNP = false;
/**
* Returns the password of the jabber registration account.
* @return the password of the jabber registration account.
@ -404,7 +409,7 @@ public boolean isAutoDiscoverJingleNodes()
}
/**
* Sets the <tt>useJingleNodes/tt> property.
* Sets the <tt>useJingleNodes</tt> property.
*
* @param isUseJingleNodes <tt>true</tt> to indicate that Jingle Nodes
* should be used for this account, <tt>false</tt> - otherwise.
@ -457,4 +462,24 @@ public List<JingleNodeDescriptor> getAdditionalJingleNodes()
{
return additionalJingleNodes;
}
/**
* Indicates if UPnP should be used for this account.
* @return <tt>true</tt> if UPnP should be used for this account, otherwise
* returns <tt>false</tt>
*/
public boolean isUseUPNP()
{
return isUseUPNP;
}
/**
* Sets the <tt>useUPNP</tt> property.
* @param isUseUPNP <tt>true</tt> to indicate that UPnP should be used for
* this account, <tt>false</tt> - otherwise.
*/
public void setUseUPNP(boolean isUseUPNP)
{
this.isUseUPNP = isUseUPNP;
}
}

@ -312,6 +312,9 @@ public ProtocolProviderService installAccount(
JingleNodeDescriptor.JN_PREFIX + serverIndex);
}
accountProperties.put(ProtocolProviderFactory.IS_USE_UPNP,
String.valueOf(registration.isUseUPNP()));
if (isModification)
{
providerFactory.modifyAccount( protocolProvider,

@ -324,6 +324,11 @@ public abstract class ProtocolProviderFactory
public static final String AUTO_DISCOVER_JINGLE_NODES
= "AUTO_DISCOVER_JINGLE_NODES";
/**
* Indicates if UPnP should be used with ICE.
*/
public static final String IS_USE_UPNP = "UPNP_ENABLED";
/**
* Address used to reach voicemail box, by services able to
* subscribe for voicemail new messages notifications.

Loading…
Cancel
Save