@@ -0,0 +1,3953 @@
+/*%0A * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.%0A *%0A * Distributable under LGPL license.%0A * See terms of license at gnu.org.%0A */%0Apackage net.java.sip.communicator.impl.version;%0A%0Aimport org.osgi.framework.*;%0Aimport net.java.sip.communicator.service.configuration.*;%0Aimport net.java.sip.communicator.util.*;%0Aimport java.util.*;%0Aimport net.java.sip.communicator.service.version.*;%0A%0A/**%0A * The entry point to the Version Service Implementation. We register the%0A * VersionServiceImpl instance on the OSGi BUS.%0A *%0A * @author Emil Ivov%0A */%0Apublic class VersionActivator%0A    implements BundleActivator%0A%7B%0A    private Logger logger = Logger.getLogger(VersionActivator.class.getName());%0A%0A    private        ServiceRegistration  versionServReg   = null;%0A    private static BundleContext        bundleContext         = null;%0A    private static ConfigurationService configurationService  = null;%0A%0A    /**%0A     * Called when this bundle is started so the Framework can perform the%0A     * bundle-specific activities necessary to start this bundle.%0A     *%0A     * @param context The execution context of the bundle being started.%0A     * @throws Exception If this method throws an exception, this bundle is%0A     *   marked as stopped and the Framework will remove this bundle's%0A     *   listeners, unregister all services registered by this bundle, and%0A     *   release all services used by this bundle.%0A     */%0A    public void start(BundleContext context) throws Exception%0A    %7B%0A        logger.debug(%22Started.%22);%0A        this.bundleContext = context;%0A        Hashtable hashtable = new Hashtable();%0A%0A        VersionServiceImpl versionServiceImpl = new VersionServiceImpl();%0A%0A        //reg the icq account man.%0A        versionServReg =  context.registerService(%0A                    VersionService.class.getName(),%0A                    versionServiceImpl,%0A                    hashtable);%0A        logger.debug(%22SIP Protocol Provider Factory ... %5BREGISTERED%5D%22);%0A        logger.debug(%22SIP Communicator Version: sip-communicator-%22%0A                     + VersionImpl.currentVersion().toString());%0A%0A        //register properties for those that would like to use them%0A        getConfigurationService().setProperty(%0A            %22sip-communicator.version%22%0A            , VersionImpl.currentVersion().toString()%0A            , true);%0A    %7D%0A%0A    /**%0A     * Returns a reference to a ConfigurationService implementation currently%0A     * registered in the bundle context or null if no such implementation was%0A     * found.%0A     *%0A     * @return a currently valid implementation of the ConfigurationService.%0A     */%0A    public static ConfigurationService getConfigurationService()%0A    %7B%0A        if(configurationService == null)%0A        %7B%0A            ServiceReference confReference%0A                = bundleContext.getServiceReference(%0A                    ConfigurationService.class.getName());%0A            configurationService%0A                = (ConfigurationService) bundleContext.getService(confReference);%0A        %7D%0A        return configurationService;%0A    %7D%0A%0A    /**%0A     * Returns a reference to the bundle context that we were started with.%0A     * @return a reference to the BundleContext instance that we were started%0A     * witn.%0A     */%0A    public static BundleContext getBundleContext()%0A    %7B%0A        return bundleContext;%0A    %7D%0A%0A    /**%0A     * Called when this bundle is stopped so the Framework can perform the%0A     * bundle-specific activities necessary to stop the bundle.%0A     *%0A     * @param context The execution context of the bundle being stopped.%0A     * @throws Exception If this method throws an exception, the bundle is%0A     *   still marked as stopped, and the Framework will remove the bundle's%0A     *   listeners, unregister all services registered by the bundle, and%0A     *   release all services used by the bundle.%0A     */%0A    public void stop(BundleContext context) throws Exception%0A    %7B%0A        versionServReg.unregister();%0A    %7D%0A%7D%0A

Add an activator for the version implementation package.