FileDocCategorySizeDatePackage
ContactListListener.javaAPI DocAndroid 1.5 API5704Wed May 06 22:42:46 BST 2009com.android.im.engine

ContactListListener

public interface ContactListListener
Interfaces that allows the implementing classes to listen to contact list relative events. Listeners are registered with ContactListManager.

Fields Summary
public static final int
LIST_CREATED
public static final int
LIST_DELETED
public static final int
LIST_LOADED
public static final int
LIST_RENAMED
public static final int
LIST_CONTACT_ADDED
public static final int
LIST_CONTACT_REMOVED
public static final int
CONTACT_BLOCKED
public static final int
CONTACT_UNBLOCKED
public static final int
ERROR_CREATING_LIST
public static final int
ERROR_DELETING_LIST
public static final int
ERROR_RENAMING_LIST
public static final int
ERROR_LOADING_LIST
public static final int
ERROR_LOADING_BLOCK_LIST
public static final int
ERROR_RETRIEVING_PRESENCE
public static final int
ERROR_ADDING_CONTACT
public static final int
ERROR_REMOVING_CONTACT
public static final int
ERROR_BLOCKING_CONTACT
public static final int
ERROR_UNBLOCKING_CONTACT
Constructors Summary
Methods Summary
public voidonAllContactListsLoaded()
Called when all the contact lists (including the block list) and contacts have been loaded from the server.

public voidonContactChange(int type, ContactList list, Contact contact)
Called when:
  • a contact list has been created, deleted, renamed or loaded, or
  • a contact has been added to or removed from a list, or
  • a contact has been blocked or unblocked

param
type one of the following values:
  • {@link #LIST_CREATED} list: the newly created list; contact: null
  • {@link #LIST_DELETED} list: the delete list; contact: null
  • {@link #LIST_LOADED} list: the newly loaded list; contact: null
  • {@link #LIST_RENAMED} list: the list renamed; contact: null
  • {@link #LIST_CONTACT_ADDED} list: the list to which the contact is added, contact: the added contact
  • {@link #LIST_CONTACT_REMOVED} list: the list from which the contact is removed, contact: the removed contact
  • {@link #CONTACT_BLOCKED} list: null, contact: the blocked contact
  • {@link #CONTACT_UNBLOCKED} list: null, contact: the unblocked contact
param
list
param
contact

public voidonContactError(int errorType, ImErrorInfo error, java.lang.String listName, Contact contact)

param
errorType one of the following values:
  • {@link #ERROR_CREATING_LIST} listName: the name of the list to be created; contact: null
  • {@link #ERROR_DELETING_LIST} listName: the name of the list to be deleted; contact: null
  • {@link #ERROR_LOADING_LIST} listName: the name of the list to be loaded, or null if the error occurred while fetching the list of contact lists; contact: null
  • {@link #ERROR_RENAMING_LIST} listName: the original name of the list to be renamed; contact: null
  • {@link #ERROR_LOADING_BLOCK_LIST} list: null; contact: null
  • {@link #ERROR_RETRIEVING_PRESENCE}
    • when retrieving presence for a list: listName: the name of the list, or null, depending on the implementation; contact: null
    • when retrieving presence for a contact: listName: the name of the list that the contact belongs to, or null, depending on the implementation; contact: the contact
  • {@link #ERROR_ADDING_CONTACT} listName: the name of the list to which the contact was to be added; contact: the contact to add
  • {@link #ERROR_REMOVING_CONTACT} listName: the name of the list from which the contact was to be removed; contact: the contact to remove
  • {@link #ERROR_BLOCKING_CONTACT} list: null; contact: the contact to block
  • {@link #ERROR_UNBLOCKING_CONTACT} list: null; contact: the contact to be unblocked
param
error
param
listName
param
contact

public voidonContactsPresenceUpdate(Contact[] contacts)
Called when received one or more contacts' updated presence information from the server.

param
contacts one or more contacts that have updated presence information.