nsIAddrBookSession

IID:90533607-7205-473f-b688-ffb50eeb5d57
Inherits From:nsISupports

This interface is implemented by the following components:


Constants

An address book, mailing list or card is added.
abListenerNotifyFlagValue added = 1
A mailing list or card is removed from an address book.
abListenerNotifyFlagValue directoryItemRemoved = 2
An address book is removed
abListenerNotifyFlagValue directoryRemoved = 4
An address book, mailing list or card is changed.
abListenerNotifyFlagValue changed = 8
All of the above notifications are to be received.
abListenerNotifyFlagValue all = -1

Properties

readonly nsILocalFile userProfileDirectory


Methods

void addAddressBookListener ( nsIAbListener listener , abListenerNotifyFlagValue notifyFlags ) PRUnichar* generateNameFromCard ( nsIAbCard card , PRInt32 generateFormat ) PRUnichar* generatePhoneticNameFromCard ( nsIAbCard card , PRBool lastNameFirst ) void notifyDirectoryDeleted ( nsIAbDirectory directory , nsISupports item ) void notifyDirectoryItemAdded ( nsIAbDirectory directory , nsISupports item ) void notifyDirectoryItemDeleted ( nsIAbDirectory directory , nsISupports item ) void notifyItemPropertyChanged ( nsISupports item , char* property , PRUnichar* oldValue , PRUnichar* newValue ) void removeAddressBookListener ( nsIAbListener listener )

void addAddressBookListener ( nsIAbListener listener , abListenerNotifyFlagValue notifyFlags )

Adds a nsIAbListener to receive notifications of address book updates according to the specified notifyFlags.

Arguments:
listener: The listener that is to receive updates.
notifyFlags: A bitwise-or of abListenerNotifyFlagValue items specifying which notifications to receive.

PRUnichar* generateNameFromCard ( nsIAbCard card , PRInt32 generateFormat )

Generate the name from the card, using the firstName and lastName and the displayName

Format follows the "mail.addr_book.lastnamefirst" pref values

0 = generated name is displayName 1 = lastFirst, formatted following lastFirstFormat (see addressBook.properties) 2 = firstLast, formatted following firstLastFormat (see addressBook.properties)

We allow the caller to cache the pref value, so we don't have to go to prefs every time.

Arguments:
card
generateFormat

PRUnichar* generatePhoneticNameFromCard ( nsIAbCard card , PRBool lastNameFirst )

Generate the phonetic name from the card, using the firstName and lastName

Arguments:
card
lastNameFirst

void notifyDirectoryDeleted ( nsIAbDirectory directory , nsISupports item )

When a directory is deleted

Arguments:
directory
item

void notifyDirectoryItemAdded ( nsIAbDirectory directory , nsISupports item )

Arguments:
directory
item

void notifyDirectoryItemDeleted ( nsIAbDirectory directory , nsISupports item )

When a card is deleted

Arguments:
directory
item

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

Arguments:
item
property
oldValue
newValue

void removeAddressBookListener ( nsIAbListener listener )

Removes a nsIAbListener from receive notifications of address book updates.

Arguments:
listener: The listener that is to no longer receive updates.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com