|
|
|
|
@ -14,6 +14,7 @@
|
|
|
|
|
import net.java.sip.communicator.service.protocol.*;
|
|
|
|
|
import net.java.sip.communicator.service.protocol.event.*;
|
|
|
|
|
import net.java.sip.communicator.util.*;
|
|
|
|
|
import net.java.sip.communicator.util.xml.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* An implementation of the MetaContactListService that would connect to
|
|
|
|
|
@ -133,7 +134,7 @@ public void start(BundleContext bc)
|
|
|
|
|
}
|
|
|
|
|
catch (Exception exc)
|
|
|
|
|
{
|
|
|
|
|
logger.error("Failed loading the stored contact list.");
|
|
|
|
|
logger.error("Failed loading the stored contact list.", exc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// start listening for newly register or removed protocol providers
|
|
|
|
|
@ -1257,8 +1258,16 @@ private void handleProviderAdded(
|
|
|
|
|
{
|
|
|
|
|
//load contacts, stored in the local contact list and corresponding to
|
|
|
|
|
//this provider.
|
|
|
|
|
storageManager.extractContactsForAccount(
|
|
|
|
|
provider.getAccountID().getAccountUID());
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
storageManager.extractContactsForAccount(
|
|
|
|
|
provider.getAccountID().getAccountUID());
|
|
|
|
|
}
|
|
|
|
|
catch (XMLException exc)
|
|
|
|
|
{
|
|
|
|
|
logger.error("Failed to load contacts for account "
|
|
|
|
|
+ provider.getAccountID().getAccountUID(), exc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
synchronizeOpSetWithLocalContactList(opSetPersPresence);
|
|
|
|
|
@ -1653,6 +1662,16 @@ public void subscriptionFailed(SubscriptionEvent evt)
|
|
|
|
|
logger.trace("Subscription failed: " + evt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Events delivered through this method are ignored as they are of no
|
|
|
|
|
* interest to this implementation of the meta contact list service.
|
|
|
|
|
* @param evt the SubscriptionEvent containing the source contact
|
|
|
|
|
*/
|
|
|
|
|
public void subscriptionResolved(SubscriptionEvent evt)
|
|
|
|
|
{
|
|
|
|
|
//who cares?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Locates the <tt>MetaContact</tt> corresponding to the contact
|
|
|
|
|
* that has been removed and updates it. If the removed proto contact
|
|
|
|
|
@ -1753,6 +1772,11 @@ private MetaContactGroup handleGroupCreatedEvent(
|
|
|
|
|
return newMetaGroup;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds the source group and its child contacts to the meta contact
|
|
|
|
|
* list.
|
|
|
|
|
* @param evt the ServerStoredGroupEvent containing the source group.
|
|
|
|
|
*/
|
|
|
|
|
public void groupCreated(ServerStoredGroupEvent evt)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
@ -1785,6 +1809,16 @@ public void groupCreated(ServerStoredGroupEvent evt)
|
|
|
|
|
, MetaContactGroupEvent.META_CONTACT_GROUP_ADDED);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Dummy implementation.
|
|
|
|
|
* <p>
|
|
|
|
|
* @param evt a ServerStoredGroupEvent containing the source group.
|
|
|
|
|
*/
|
|
|
|
|
public void groupResolved(ServerStoredGroupEvent evt)
|
|
|
|
|
{
|
|
|
|
|
//we couldn't care less :)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Updates the local contact list by removing the meta contact group
|
|
|
|
|
* corresponding to the group indicated by the delivered <tt>evt</tt>
|
|
|
|
|
@ -2267,6 +2301,13 @@ public void groupRemoved(ServerStoredGroupEvent evt)
|
|
|
|
|
public void groupNameChanged(ServerStoredGroupEvent evt)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Evens delivered through this method are ignored
|
|
|
|
|
* @param evt param ignored
|
|
|
|
|
*/
|
|
|
|
|
public void groupResolved(ServerStoredGroupEvent evt)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Block the execution of the current thread until either a group
|
|
|
|
|
* created event is received or milis miliseconds pass.
|
|
|
|
|
@ -2357,6 +2398,14 @@ public void subscriptionFailed(SubscriptionEvent evt)
|
|
|
|
|
public void subscriptionMoved(SubscriptionMovedEvent evt)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Events delivered through this method are ignored
|
|
|
|
|
* @param evt param ignored
|
|
|
|
|
*/
|
|
|
|
|
public void subscriptionResolved(SubscriptionEvent evt)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Block the execution of the current thread until either a contact
|
|
|
|
|
* created event is received or milis miliseconds pass.
|
|
|
|
|
|