> void setupConfigure(T algo, ZrtpConfigure act
String id = ZrtpConfigureUtils.getPropertyID(algo);
- String savedConf = ZrtpConfigureActivator.configService.getString(id);
+ String savedConf = NeomediaActivator.getConfigurationService().getString(id);
if (savedConf == null)
savedConf = "";
diff --git a/src/net/java/sip/communicator/impl/neomedia/ZrtpControlImpl.java b/src/net/java/sip/communicator/impl/neomedia/ZrtpControlImpl.java
index f6cedd1eb..918d3ea86 100644
--- a/src/net/java/sip/communicator/impl/neomedia/ZrtpControlImpl.java
+++ b/src/net/java/sip/communicator/impl/neomedia/ZrtpControlImpl.java
@@ -123,7 +123,8 @@ public ZRTPTransformEngine getZrtpEngine()
if(zrtpEngine == null)
{
zrtpEngine = new ZRTPTransformEngine();
- zrtpEngine.initialize("GNUZRTP4J.zid", false);
+ ZrtpConfigure config = ZrtpConfigureUtils.getZrtpConfiguration();
+ zrtpEngine.initialize("GNUZRTP4J.zid", false, config);
}
return zrtpEngine;
@@ -159,8 +160,8 @@ public void start(boolean masterSession)
zrtpAutoStart = true;
securityEventManager.setDHSession(true);
- // we now that audio is considered as master for zrtp
- securityEventManager.setSessionType(
+ // we know that audio is considered as master for zrtp
+ securityEventManager.setSessionType(
SecurityEventManager.AUDIO_SESSION);
}
else
@@ -168,7 +169,7 @@ public void start(boolean masterSession)
// check whether video was not already started
// it may happen when using multistreams, audio has inited
// and started video
- // initially engins has value enableZrtp = false
+ // initially engine has value enableZrtp = false
zrtpAutoStart = zrtpEngine.isEnableZrtp();
securityEventManager.setSessionType(
SecurityEventManager.VIDEO_SESSION);
diff --git a/src/net/java/sip/communicator/impl/neomedia/neomedia.manifest.mf b/src/net/java/sip/communicator/impl/neomedia/neomedia.manifest.mf
index d3f627857..dac67e991 100644
--- a/src/net/java/sip/communicator/impl/neomedia/neomedia.manifest.mf
+++ b/src/net/java/sip/communicator/impl/neomedia/neomedia.manifest.mf
@@ -28,7 +28,6 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.util.swing,
- net.java.sip.communicator.plugin.zrtpconfigure,
quicktime,
quicktime.std.sg,
quicktime.qd,
diff --git a/src/net/java/sip/communicator/plugin/zrtpconfigure/ZrtpConfigureActivator.java b/src/net/java/sip/communicator/plugin/zrtpconfigure/ZrtpConfigureActivator.java
deleted file mode 100644
index 0a3d2ee74..000000000
--- a/src/net/java/sip/communicator/plugin/zrtpconfigure/ZrtpConfigureActivator.java
+++ /dev/null
@@ -1,153 +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.plugin.zrtpconfigure;
-
-import net.java.sip.communicator.service.configuration.*;
-import net.java.sip.communicator.service.gui.*;
-import net.java.sip.communicator.service.resources.ResourceManagementService;
-import net.java.sip.communicator.service.resources.ResourceManagementServiceUtils;
-
-import org.osgi.framework.*;
-
-/**
- * The BundleActivator for ZrtpConfigure.
- *
- * @author Werner Dittmann
- */
-public class ZrtpConfigureActivator
- implements BundleActivator
-{
- public static BundleContext bundleContext;
-
- /**
- * The {@link ResourceManagementService} of the {@link ZrtpConfigureActivator}.
- */
- public static ResourceManagementService resourceService;
-
- /**
- * The {@link UIService} of the {@link ZrtpConfigureActivator}.
- */
- private static UIService uiService;
-
- /**
- * The {@link ConfigurationService} of the {@link ZrtpConfigureActivator}.
- */
- protected static ConfigurationService configService;
-
- /**
- * Starts this bundle and adds the | ZrtpConfigurePanel.
- */
- public void start(BundleContext bc) throws Exception
- {
- bundleContext = bc;
-
- bundleContext
- .registerService(
- ConfigurationForm.class.getName(),
- new LazyConfigurationForm(
- "net.java.sip.communicator.plugin.zrtpconfigure.ZrtpConfigurePanel",
- getClass().getClassLoader(),
- "impl.media.security.zrtp.CONF_ICON",
- "impl.media.security.zrtp.TITLE",
- 1100),
- null);
-
- resourceService =
- ResourceManagementServiceUtils
- .getService(bundleContext);
- if (resourceService == null)
- return;
-
- ServiceReference refConfigService =
- bundleContext
- .getServiceReference(ConfigurationService.class.getName());
-
- if (refConfigService == null)
- return;
-
- configService =
- (ConfigurationService)bundleContext
- .getService(refConfigService);
-
- }
-
- /**
- * Stops this bundles.
- */
- public void stop(BundleContext arg0) throws Exception
- {
- resourceService = null;
- configService = null;
- uiService = null;
- }
-
- /**
- * Returns the UIService obtained from the bundle context.
- *
- * @return the UIService obtained from the bundle context
- */
- public static UIService getUIService()
- {
- if (uiService == null)
- {
- ServiceReference uiReference =
- bundleContext.getServiceReference(UIService.class.getName());
-
- uiService =
- (UIService) bundleContext
- .getService(uiReference);
- }
-
- return uiService;
- }
-
- /**
- * Returns the ConfigurationService obtained from the bundle
- * context.
- *
- * @return the ConfigurationService obtained from the bundle
- * context
- */
- public static ConfigurationService getConfigurationService()
- {
- if (configService == null)
- {
- ServiceReference configReference =
- bundleContext.getServiceReference(ConfigurationService.class
- .getName());
-
- configService =
- (ConfigurationService) bundleContext
- .getService(configReference);
- }
-
- return configService;
- }
-
- /**
- * Determines whether bundle is system or not. We consider system
- * bundles those that we have explicitly marked as such with the
- * System-Bundle manifest property or those that belong to the
- * Apache framework itself.
- *
- * @param bundle the bundle that we need to determine as system or not.
- * @return true if bundle is a system bundle and false
- * otherwise.
- */
- public static boolean isSystemBundle(Bundle bundle)
- {
- if (bundle.getBundleId() <= 1)
- {
- //this is one of the felix bundles
- return true;
- }
-
- Object sysBundleProp = bundle.getHeaders().get("System-Bundle");
-
- //ignore if this is a system bundle
- return (sysBundleProp != null && sysBundleProp.equals("yes"));
- }
-}
diff --git a/src/net/java/sip/communicator/plugin/zrtpconfigure/zrtp.manifest.mf b/src/net/java/sip/communicator/plugin/zrtpconfigure/zrtp.manifest.mf
deleted file mode 100755
index 47df2bccc..000000000
--- a/src/net/java/sip/communicator/plugin/zrtpconfigure/zrtp.manifest.mf
+++ /dev/null
@@ -1,29 +0,0 @@
-Bundle-Activator: net.java.sip.communicator.plugin.zrtpconfigure.ZrtpConfigureActivator
-Bundle-Name: ZRTP configuration plugin
-Bundle-Description: Provides ZRTP configuration functions.
-Bundle-Vendor: sip-communicator.org
-Bundle-Version: 0.0.1
-System-Bundle: yes
-Import-Package: org.osgi.framework,
- net.java.sip.communicator.service.configuration,
- net.java.sip.communicator.service.gui,
- net.java.sip.communicator.service.gui.event,
- net.java.sip.communicator.service.resources,
- net.java.sip.communicator.util,
- net.java.sip.communicator.util.swing,
- javax.swing,
- javax.swing.event,
- javax.swing.table,
- javax.swing.text,
- javax.swing.text.html,
- javax.accessibility,
- javax.swing.plaf,
- javax.swing.plaf.metal,
- javax.swing.plaf.basic,
- javax.imageio,
- javax.swing.filechooser,
- javax.swing.tree,
- javax.swing.undo,
- javax.swing.border,
- gnu.java.zrtp
-Export-Package: net.java.sip.communicator.plugin.zrtpconfigure
|