Working on persistency of contact lists.

Added support for unresolved contacts and better account id flexibility
cusax-fix
Emil Ivov 20 years ago
parent e65d4d6839
commit ab30d3de19

@ -35,16 +35,31 @@ public class MockProvider
*/
private MockPersistentPresenceOperationSet mockPresOpSet = null;
/**
* The identifier of the account.
*/
private AccountID accountID = null;
/**
* Creates an instance of this mockprovider with a <tt>supportedOperationSet-s</tt>
* map set to contain a single persistent presence operation set.
*
* @param userName an almost ignorable string (any value is accepted) that
* should be used when constructing account id's
*/
public MockProvider()
public MockProvider(String userName)
{
accountID = new MockAccountID(userName);
mockPresOpSet = new MockPersistentPresenceOperationSet(this);
this.supportedOperationSets.put(
OperationSetPersistentPresence.class.getName(),
mockPresOpSet);
this.supportedOperationSets.put(
OperationSetPresence.class.getName(),
mockPresOpSet);
}
/**
@ -134,4 +149,14 @@ public void shutdown()
public void unregister()
{
}
/**
* Returns the AccountID that uniquely identifies the account represented by
* this instance of the ProtocolProviderService.
* @return the id of the account represented by this provider.
*/
public AccountID getAccountID()
{
return accountID;
}
}

Loading…
Cancel
Save