nsIAbManager
| IID: | 39cf5303-73ab-4f28-9ea5-fd38e86893b3 |
| Inherits From: | nsISupports |
nsIAbManager is an interface to the main address book mananger via the contract id "@mozilla.org/abmanager;1"
It contains the main functions to create and delete address books as well as some helper functions.
Properties
readonly nsILocalFile userProfileDirectory
Returns the user profile directory. NOTE: this should not be used as it may go away soon.
Methods
void addAddressBookListener ( nsIAbListener listener , abListenerNotifyFlagValue notifyFlags )
void deleteAddressBook ( ACString URI )
nsIAbCard escapedVCardToAbCard ( char* escapedVCardStr )
void exportAddressBook ( nsIDOMWindow parentWin , nsIAbDirectory directory )
PRBool mailListNameExists ( PRUnichar* name )
ACString newAddressBook ( AString dirName , ACString URI , PRUint32 type )
void notifyDirectoryDeleted ( nsIAbDirectory parentDirectory , nsISupports directory )
void notifyDirectoryItemAdded ( nsIAbDirectory parentDirectory , nsISupports item )
void notifyDirectoryItemDeleted ( nsIAbDirectory parentDirectory , 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. See nsIAbListener for possible values.
void deleteAddressBook ( ACString URI )
Deletes an address book.
- Arguments:
- URI: The URI for the address book. This is specific to each type of address book.
nsIAbCard escapedVCardToAbCard ( char* escapedVCardStr )
Translates an escaped vcard string into a nsIAbCard.
- Arguments:
- escapedVCardStr: The string containing the vcard.
- Returns:
- A card containing the translated vcard data.
void exportAddressBook ( nsIDOMWindow parentWin , nsIAbDirectory directory )
Exports an address book, it will provide a dialog to the user for the location to save the file to and will then save the address book to media.
- Arguments:
- parentWin: Parent Window for the file save dialog to use.
- directory: The directory to export.
PRBool mailListNameExists ( PRUnichar* name )
Finds out if the mailing list name exists in any *mork/MDB* based address book
- Arguments:
- name: The name of the list to try and find.
- Returns:
- True if the name exists.
ACString newAddressBook ( AString dirName , ACString URI , PRUint32 type )
Creates a new address book.
- Arguments:
- dirName: The description of the address book.
- URI: The URI for the address book. This is specific to each type of address book.
- type: The type of the address book (see nsDirPrefs.h)
void notifyDirectoryDeleted ( nsIAbDirectory parentDirectory , nsISupports directory )
Call to notify the registered listeners when a directory is removed.
- Arguments:
- parentDirectory: The parent directory of the directory that has been removed.
- directory: The directory that has been removed.
void notifyDirectoryItemAdded ( nsIAbDirectory parentDirectory , nsISupports item )
Call to notify the registered listeners when a directory item is added.
- Arguments:
- parentDirectory: The parent directory of the item that has been added.
- item: The item that has been added.
void notifyDirectoryItemDeleted ( nsIAbDirectory parentDirectory , nsISupports item )
Call to notify the registered listeners when a directory item is removed.
- Arguments:
- parentDirectory: The parent directory of the item that has been removed.
- item: The item that has been removed.
void notifyItemPropertyChanged ( nsISupports item , char* property , PRUnichar* oldValue , PRUnichar* newValue )
Call to notify the registered listeners when a property on an item has changed.
- Arguments:
- item: The items that has changed (e.g. an nsIAbDirectory)
- property: The property that has changed (e.g. DirName)
- oldValue: The old value of the property.
- newValue: The new value of the property.
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.
