diff options
author | Yana Stamcheva <yana@jitsi.org> | 2010-09-07 15:30:40 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2010-09-07 15:30:40 +0000 |
commit | 7746c91783b490f5ca07d3b06a6d336ae1152253 (patch) | |
tree | ffd125368411c2ba3d2ebd80d0722a51bfef3d55 /src/net/java/sip/communicator/impl/replacement/metacafe/MetacafeActivator.java | |
parent | 42fbfc39645660bf0ee18c718a9d6e9423e6f5e4 (diff) | |
download | jitsi-7746c91783b490f5ca07d3b06a6d336ae1152253.zip jitsi-7746c91783b490f5ca07d3b06a6d336ae1152253.tar.gz jitsi-7746c91783b490f5ca07d3b06a6d336ae1152253.tar.bz2 |
Support for video and photo previews in chat window provided by Purvesh Sahoo as part of its GSoC project.
Diffstat (limited to 'src/net/java/sip/communicator/impl/replacement/metacafe/MetacafeActivator.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/replacement/metacafe/MetacafeActivator.java | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/replacement/metacafe/MetacafeActivator.java b/src/net/java/sip/communicator/impl/replacement/metacafe/MetacafeActivator.java new file mode 100644 index 0000000..b00f1c0 --- /dev/null +++ b/src/net/java/sip/communicator/impl/replacement/metacafe/MetacafeActivator.java @@ -0,0 +1,70 @@ +/* + * 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.impl.replacement.metacafe; + +import java.util.*; + +import net.java.sip.communicator.service.replacement.*; +import net.java.sip.communicator.util.*; + +import org.osgi.framework.*; + +/** + * Activator for the Metacafe source bundle. + * + * @author Purvesh Sahoo + */ +public class MetacafeActivator + implements BundleActivator +{ + /** + * The <tt>Logger</tt> used by the <tt>MetacafeActivator</tt> class. + */ + private static final Logger logger = + Logger.getLogger(MetacafeActivator.class); + + /** + * The metacafe service registration. + */ + private ServiceRegistration metacafeServReg = null; + + /** + * The source implementation reference. + */ + private static ReplacementService metacafeSource = null; + + /** + * Starts the Metacafe replacement source bundle + * + * @param context the <tt>BundleContext</tt> as provided from the OSGi + * framework + * @throws Exception if anything goes wrong + */ + public void start(BundleContext context) throws Exception + { + Hashtable<String, String> hashtable = new Hashtable<String, String>(); + hashtable.put(ReplacementService.SOURCE_NAME, "METACAFE"); + metacafeSource = new ReplacementServiceMetacafeImpl(); + + metacafeServReg = + context.registerService(ReplacementService.class.getName(), + metacafeSource, hashtable); + + logger.info("Metacafe source implementation [STARTED]."); + } + + /** + * Unregisters the Metacafe replacement service. + * + * @param context BundleContext + * @throws Exception if anything goes wrong + */ + public void stop(BundleContext context) throws Exception + { + metacafeServReg.unregister(); + logger.info("Metacafe source implementation [STOPPED]."); + } +}
\ No newline at end of file |