Public Member Functions | Public Attributes

nsIAbListener Interface Reference

nsIAbListener More...

import "nsIAbListener.idl";

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.

Public Attributes

const abListenerNotifyFlagValue itemAdded = 0x1
 These flags are used when registering the listener with nsIAbManager to specify when to receive notifications of address book updates.
const abListenerNotifyFlagValue directoryItemRemoved = 0x2
 A mailing list or card is removed from an address book.
const abListenerNotifyFlagValue directoryRemoved = 0x4
 An address book is removed.
const abListenerNotifyFlagValue itemChanged = 0x8
 An address book, mailing list or card is changed.
const abListenerNotifyFlagValue all = 0xFFFFFFFF
 All of the above notifications are to be received.

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 nsIAbManager.


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:
parentDir The parent of the item being added.
item The 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:
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 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:
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.

Member Data Documentation

All of the above notifications are to be received.

A mailing list or card is removed from an address book.

An address book is removed.

These flags are used when registering the listener with nsIAbManager to specify when to receive notifications of address book updates.

An address book, mailing list or card is added.

An address book, mailing list or card is changed.


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