|
|
|
|
@ -8,9 +8,11 @@
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
import net.java.sip.communicator.service.protocol.*;
|
|
|
|
|
import net.java.sip.communicator.util.*;
|
|
|
|
|
|
|
|
|
|
import org.jivesoftware.smack.util.*;
|
|
|
|
|
import org.osgi.framework.*;
|
|
|
|
|
import net.java.sip.communicator.service.protocol.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The Jabber implementation of the ProtocolProviderFactory.
|
|
|
|
|
@ -19,6 +21,9 @@
|
|
|
|
|
public class ProtocolProviderFactoryJabberImpl
|
|
|
|
|
extends ProtocolProviderFactory
|
|
|
|
|
{
|
|
|
|
|
private Logger logger = Logger.getLogger(
|
|
|
|
|
ProtocolProviderFactoryJabberImpl.class);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The table that we store our accounts in.
|
|
|
|
|
*/
|
|
|
|
|
@ -179,6 +184,21 @@ public AccountID loadAccount( Map accountProperties)
|
|
|
|
|
*/
|
|
|
|
|
public boolean uninstallAccount(AccountID accountID)
|
|
|
|
|
{
|
|
|
|
|
//unregister the protocol provider
|
|
|
|
|
ServiceReference serRef = getProviderForAccount(accountID);
|
|
|
|
|
|
|
|
|
|
ProtocolProviderService protocolProvider
|
|
|
|
|
= (ProtocolProviderService) JabberActivator.getBundleContext()
|
|
|
|
|
.getService(serRef);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
protocolProvider.unregister();
|
|
|
|
|
}
|
|
|
|
|
catch (OperationFailedException e) {
|
|
|
|
|
logger.error("Failed to unregister protocol provider for account : "
|
|
|
|
|
+ accountID + " caused by : " + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ServiceRegistration registration
|
|
|
|
|
= (ServiceRegistration)registeredAccounts.remove(accountID);
|
|
|
|
|
|
|
|
|
|
|