Adds XMPP GUI configuration the ability to disable Jingle (audio and video calls with XMPP).

cusax-fix
Vincent Lucas 13 years ago
parent cac9618f9b
commit 07595ca31c

@ -238,7 +238,7 @@ but only <BR> hide it. If you wish to exit the application choose File/Quit.</DI
service.gui.HISTORY=&History
service.gui.HISTORY_CONTACT=History - {0}
service.gui.HOUR=Hour
service.gui.ICE=ICE configuration
service.gui.ICE=ICE
service.gui.IDENTIFIER=Identifier
service.gui.IGNORE=&Ignore
service.gui.INSERT_SMILEY=Insert smiley
@ -980,6 +980,7 @@ plugin.jabberaccregwizz.AUDIO=Audio
plugin.jabberaccregwizz.VIDEO=Video
plugin.jabberaccregwizz.RESET=Reset
plugin.jabberaccregwizz.RESET_DESCRIPTION=Reset to the global settings
plugin.jabberaccregwizz.DISABLE_JINGLE=Disable Jingle (audio and video calls with XMPP).
# mailbox
plugin.mailbox.OUTGOING=Outgoing Message:

@ -1471,6 +1471,7 @@ protected void initialize(String screenname,
// call
supportedFeatures.clear();
this.clearRegistrationStateChangeListener();
this.clearSupportedOperationSet();
synchronized(providerCreationLock)
{

@ -96,6 +96,11 @@ public class JabberAccountRegistration
*/
private String domainBypassCaps = null;
/**
* Is jingle disabled for this account.
*/
private boolean disableJingle = false;
/**
* The port.
*/
@ -341,6 +346,16 @@ public String getTelephonyDomainBypassCaps()
return domainBypassCaps;
}
/**
* Gets if Jingle is disabled for this account.
*
* @return True if jingle is disabled for this account. False otherwise.
*/
public boolean isJingleDisabled()
{
return this.disableJingle;
}
/**
* The address of the server we will use for this account
* @return String
@ -445,6 +460,16 @@ public void setTelephonyDomainBypassCaps(String text)
this.domainBypassCaps = text;
}
/**
* Sets if Jingle is disabled for this account.
*
* @param True if jingle is disabled for this account. False otherwise.
*/
public void setDisableJingle(boolean disabled)
{
this.disableJingle = disabled;
}
/**
* Sets the server
*

@ -349,6 +349,8 @@ public boolean commitPage(JabberAccountRegistration registration)
registration.setAllowNonSecure(connectionPanel.isAllowNonSecure());
registration.setDisableJingle(
telephonyConfigPanel.isJingleDisabled());
registration.setTelephonyDomainBypassCaps(
telephonyConfigPanel.getTelephonyDomainBypassCaps());
registration.setOverridePhoneSufix(
@ -551,6 +553,10 @@ public void loadAccount(AccountID accountID)
connectionPanel.setServerOverridden(isServerOverriden);
boolean disabledJingle = Boolean.parseBoolean(accountProperties.get(
ProtocolProviderFactory.IS_CALLING_DISABLED_FOR_ACCOUNT));
telephonyConfigPanel.setDisableJingle(disabledJingle);
String telephonyDomain = accountProperties.get("OVERRIDE_PHONE_SUFFIX");
telephonyConfigPanel.setTelephonyDomain(telephonyDomain);

@ -345,6 +345,10 @@ protected ProtocolProviderService installAccount(
registration.getOverridePhoneSuffix());
}
accountProperties.put(
ProtocolProviderFactory.IS_CALLING_DISABLED_FOR_ACCOUNT,
Boolean.toString(registration.isJingleDisabled()));
accountProperties.put("BYPASS_GTALK_CAPABILITIES",
String.valueOf(registration.getBypassGtalkCaps()));

@ -25,6 +25,12 @@ public class TelephonyConfigPanel
*/
private static final long serialVersionUID = 0L;
/**
* The check box to enable/disable Jingle (audio and video calls with XMPP).
*/
private final JCheckBox disableJingle = new SIPCommCheckBox(
Resources.getString("plugin.jabberaccregwizz.DISABLE_JINGLE"));
/**
* Text field for domain name.
*/
@ -76,6 +82,8 @@ public TelephonyConfigPanel()
lblPanel.add(gtalkCallLbl);
valPanel.add(domainField);
valPanel.add(domainBypassCapsField);
telPanel.add(disableJingle, BorderLayout.NORTH);
telPanel.add(lblPanel, BorderLayout.WEST);
telPanel.add(valPanel, BorderLayout.CENTER);
@ -84,6 +92,26 @@ public TelephonyConfigPanel()
add(mainPanel, BorderLayout.NORTH);
}
/**
* Returns if Jingle is disabled.
*
* @return True if Jingle is disabled. False otherwise.
*/
public boolean isJingleDisabled()
{
return disableJingle.isSelected();
}
/**
* Disables or enables Jingle.
*
* @param disabled True to disable Jingle. False otherwise.
*/
public void setDisableJingle(boolean disabled)
{
disableJingle.setSelected(disabled);
}
/**
* Returns telephony domain.
*

@ -95,6 +95,15 @@ protected <T extends OperationSet> void removeSupportedOperationSet(
supportedOperationSets.remove(opsetClass.getName());
}
/**
* Removes all <tt>OperationSet</tt> implementation from the set of
* supported <tt>OperationSet</tt>s for this instance.
*/
protected void clearSupportedOperationSet()
{
supportedOperationSets.clear();
}
/**
* Creates a RegistrationStateChange event corresponding to the specified
* old and new states and notifies all currently registered listeners.

Loading…
Cancel
Save