Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIAbListener Interface Reference

nsIAbListener More...

import "nsIAbListener.idl";

Inheritance diagram for nsIAbListener:
Inheritance graph
[legend]
Collaboration diagram for nsIAbListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void onItemAdded (in nsISupports parentDir, in nsISupports item)
 Called when an address book item (book, card or list) is added.
void onItemRemoved (in nsISupports parentDir, in nsISupports item)
 Called when an address book, mailing list or card is removed.
void onItemPropertyChanged (in nsISupports item, in string property, in wstring oldValue, in wstring newValue)
 Called when an address book item is changed.

Detailed Description

nsIAbListener

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.

Definition at line 55 of file nsIAbListener.idl.


Member Function Documentation

void nsIAbListener::onItemAdded ( in nsISupports  parentDir,
in nsISupports  item 
)

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

Parameters:
parentDirThe parent of the item being added.
itemThe item being added to the database (a directory or card).
void nsIAbListener::onItemPropertyChanged ( in nsISupports  item,
in string  property,
in wstring  oldValue,
in wstring  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.

Parameters:
itemThe item being updated (a directory or a card).
propertyThe property of the item being changed.
oldValueThe old value of the item property being changed if it is known, null otherwise.
newValueThe new value of the item property being changed.
void nsIAbListener::onItemRemoved ( in nsISupports  parentDir,
in nsISupports  item 
)

Called when an address book, mailing list or card is removed.

This is partially configurable when setting up the listener via nsIAddrBookSession

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

The documentation for this interface was generated from the following file: