nsIAbListener

IID:8c5b1f3d-983a-4854-a0e2-3719dba1a920
Inherits From:nsISupports

Implement this interface to receive notifications of address book items being added, removed or changed with loaded address books.

Subscribe to events by using nsIAddrBookSession. See nsIAddrBookSession.idl for details of individual types of events that may be subscribed to.

This interface is implemented by the following components:


Methods

void onItemAdded ( nsISupports parentDir , nsISupports item ) void onItemPropertyChanged ( nsISupports item , char* property , PRUnichar* oldValue , PRUnichar* newValue ) void onItemRemoved ( nsISupports parentDir , nsISupports item )

void onItemAdded ( nsISupports parentDir , nsISupports item )

Called when an address book item (book, card or list) is added

Arguments:
parentDir: The parent of the item being added.
item: The item being added to the database (a directory or card).

void onItemPropertyChanged ( nsISupports item , char* property , PRUnichar* oldValue , PRUnichar* newValue )

Called when an address book item is changed. Note the current implementation means that property is either the literal string "DirName" or null, with oldValue and newValue being specified if the property is "DirName" otherwise they are null.

Arguments:
item: The item being updated (a directory or a card).
property: The property of the item being changed.
oldValue: The old value of the item property being changed if it is known, null otherwise.
newValue: The new value of the item property being changed.

void onItemRemoved ( nsISupports parentDir , nsISupports item )

Called when an address book, mailing list or card is removed. This is partially configurable when setting up the listener via nsIAddrBookSession

Arguments:
parentDir: The parent of the item being removed, this may be an empty directory in the case of a top level address book.
item: The item being removed from the database.

References

This interface is passed as an argument to the following methods:

nsIAddrBookSession.addAddressBookListener, nsIAddrBookSession.removeAddressBookListener

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com