mirror of https://github.com/sipwise/jitsi.git
parent
acdf5b7bcb
commit
d9439982f5
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* 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.contactlist;
|
||||||
|
|
||||||
|
import org.osgi.framework.*;
|
||||||
|
import java.util.*;
|
||||||
|
import net.java.sip.communicator.service.contactlist.*;
|
||||||
|
import net.java.sip.communicator.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Emil Ivov
|
||||||
|
*/
|
||||||
|
public class Activator
|
||||||
|
implements BundleActivator
|
||||||
|
{
|
||||||
|
private static final Logger logger =
|
||||||
|
Logger.getLogger(Activator.class);
|
||||||
|
|
||||||
|
ServiceRegistration mclServiceRegistration = null;
|
||||||
|
/**
|
||||||
|
* Called when this bundle is started.
|
||||||
|
*
|
||||||
|
* @param context The execution context of the bundle being started.
|
||||||
|
* @throws Exception If
|
||||||
|
*/
|
||||||
|
public void start(BundleContext context) throws Exception
|
||||||
|
{
|
||||||
|
logger.debug("Service Impl: " + getClass().getName() + " [ STARTED ]");
|
||||||
|
Hashtable hashtable = new Hashtable();
|
||||||
|
|
||||||
|
MetaContactListServiceImpl mclServiceImpl =
|
||||||
|
new MetaContactListServiceImpl();
|
||||||
|
|
||||||
|
//reg the icq account man.
|
||||||
|
mclServiceRegistration = context.registerService(
|
||||||
|
MetaContactListService.class.getName(),
|
||||||
|
mclServiceImpl,
|
||||||
|
hashtable);
|
||||||
|
|
||||||
|
logger.debug("Service Impl: " + getClass().getName() + " [REGISTERED]");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when this bundle is stopped so the Framework can perform the
|
||||||
|
* bundle-specific activities necessary to stop the bundle.
|
||||||
|
*
|
||||||
|
* @param context The execution context of the bundle being stopped.
|
||||||
|
* @throws Exception If this method throws an exception, the bundle is
|
||||||
|
* still marked as stopped, and the Framework will remove the bundle's
|
||||||
|
* listeners, unregister all services registered by the bundle, and
|
||||||
|
* release all services used by the bundle.
|
||||||
|
*/
|
||||||
|
public void stop(BundleContext context) throws Exception
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
Bundle-Activator: net.java.sip.communicator.impl.contactlist.Activator
|
||||||
|
Bundle-Name: MetaContactList
|
||||||
|
Bundle-Description: An implementation of the MetaContactList service.
|
||||||
|
Bundle-Vendor: sip-communicator.org
|
||||||
|
Bundle-Version: 0.0.1
|
||||||
|
Export-Package: net.jata.sip.communicator.service.contactlist
|
||||||
|
Import-Package: org.osgi.framework,
|
||||||
|
net.java.sip.communicator.util,
|
||||||
|
net.java.sip.communicator.service.configuration,
|
||||||
|
net.java.sip.communicator.service.configuration.event,
|
||||||
|
net.java.sip.communicator.service.protocol,
|
||||||
|
net.java.sip.communicator.service.protocol.event
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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.slick.contactlist;
|
||||||
|
|
||||||
|
import junit.framework.*;
|
||||||
|
import org.osgi.framework.*;
|
||||||
|
import net.java.sip.communicator.util.*;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Emil Ivov
|
||||||
|
*/
|
||||||
|
public class MetaContactListServiceLick
|
||||||
|
extends TestSuite
|
||||||
|
implements BundleActivator
|
||||||
|
{
|
||||||
|
private static final Logger logger =
|
||||||
|
Logger.getLogger(MetaContactListServiceLick.class);
|
||||||
|
/**
|
||||||
|
* The bundle context that we get upon activation.
|
||||||
|
*/
|
||||||
|
protected static BundleContext bundleContext = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void start(BundleContext context) throws Exception
|
||||||
|
{
|
||||||
|
this.bundleContext = context;
|
||||||
|
|
||||||
|
setName("MetaContactListServiceLick");
|
||||||
|
Hashtable properties = new Hashtable();
|
||||||
|
properties.put("service.pid", getName());
|
||||||
|
|
||||||
|
addTestSuite(TestMetaContactList.class);
|
||||||
|
|
||||||
|
|
||||||
|
bundleContext.registerService(getClass().getName(), this, properties);
|
||||||
|
logger.debug("Service " + getClass().getName() + " [REGISTERED]");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void stop(BundleContext context) throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package net.java.sip.communicator.slick.contactlist;
|
||||||
|
|
||||||
|
import junit.framework.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test basic meta contact list functionality such as filling in the contact
|
||||||
|
* list from existing protocol provider implementations and others.
|
||||||
|
* @author Emil Ivov
|
||||||
|
*/
|
||||||
|
public class TestMetaContactList
|
||||||
|
extends TestCase
|
||||||
|
{
|
||||||
|
public TestMetaContactList(String name)
|
||||||
|
{
|
||||||
|
super(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setUp() throws Exception
|
||||||
|
{
|
||||||
|
super.setUp();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void tearDown() throws Exception
|
||||||
|
{
|
||||||
|
super.tearDown();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testContactListRetrieving()
|
||||||
|
{
|
||||||
|
System.out.println("-= DUPE =-");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
Bundle-Activator: net.java.sip.communicator.slick.contactlist.MetaContactListServiceLick
|
||||||
|
Bundle-Name: MetaContactListServiceLick
|
||||||
|
Bundle-Description: An SLI compatibility kit for the MetaContactList service.
|
||||||
|
Bundle-Vendor: sip-communicator.org
|
||||||
|
Bundle-Version: 0.0.1
|
||||||
|
Import-Package: net.jata.sip.communicator.service.contactlist,
|
||||||
|
org.osgi.framework,
|
||||||
|
junit.framework,
|
||||||
|
net.java.sip.communicator.util,
|
||||||
|
net.java.sip.communicator.service.configuration,
|
||||||
|
net.java.sip.communicator.service.configuration.event,
|
||||||
|
net.java.sip.communicator.service.protocol,
|
||||||
|
net.java.sip.communicator.service.protocol.event
|
||||||
Loading…
Reference in new issue