Public Member Functions | Public Attributes

nsIAbManager Interface Reference

nsIAbManager is an interface to the main address book mananger via the contract id "@mozilla.org/abmanager;1" More...

import "nsIAbManager.idl";

Collaboration diagram for nsIAbManager:

List of all members.

Public Member Functions

nsIAbDirectory getDirectory (in ACString aURI)
 Returns the directory that represents the supplied URI.
ACString newAddressBook (in AString aDirName, in ACString aURI, in unsigned long aType,[optional] in ACString aPrefName)
 Creates a new address book.
void deleteAddressBook (in ACString aURI)
 Deletes an address book.
void exportAddressBook (in nsIDOMWindow aParentWin, in nsIAbDirectory aDirectory)
 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.
void addAddressBookListener (in nsIAbListener aListener, in abListenerNotifyFlagValue aNotifyFlags)
 Adds a nsIAbListener to receive notifications of address book updates according to the specified notifyFlags.
void removeAddressBookListener (in nsIAbListener aListener)
 Removes a nsIAbListener from receive notifications of address book updates.
void notifyItemPropertyChanged (in nsISupports aItem, in string aProperty, in wstring aOldValue, in wstring aNewValue)
 Call to notify the registered listeners when a property on an item has changed.
void notifyDirectoryItemAdded (in nsIAbDirectory aParentDirectory, in nsISupports aItem)
 Call to notify the registered listeners when a directory item is added.
void notifyDirectoryItemDeleted (in nsIAbDirectory aParentDirectory, in nsISupports aItem)
 Call to notify the registered listeners when a directory item is removed.
void notifyDirectoryDeleted (in nsIAbDirectory aParentDirectory, in nsISupports aDirectory)
 Call to notify the registered listeners when a directory is removed.
boolean mailListNameExists (in wstring name)
 Finds out if the mailing list name exists in any *mork/MDB* based address book.
nsIAbCard escapedVCardToAbCard (in string escapedVCardStr)
 Translates an escaped vcard string into a nsIAbCard.

Public Attributes

readonly attribute
nsISimpleEnumerator 
directories
 Returns an enumerator containing all the top-level directories (non-recursive).
readonly attribute nsILocalFile userProfileDirectory
 Returns the user profile directory.

Detailed Description

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.


Member Function Documentation

void nsIAbManager::addAddressBookListener ( in nsIAbListener  aListener,
in abListenerNotifyFlagValue  aNotifyFlags 
)

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

Parameters:
aListener The listener that is to receive updates.
aNotifyFlags A bitwise-or of abListenerNotifyFlagValue items specifying which notifications to receive. See nsIAbListener for possible values.
void nsIAbManager::deleteAddressBook ( in ACString  aURI  ) 

Deletes an address book.

Parameters:
aURI The URI for the address book. This is specific to each type of address book.
nsIAbCard nsIAbManager::escapedVCardToAbCard ( in string  escapedVCardStr  ) 

Translates an escaped vcard string into a nsIAbCard.

Parameters:
escapedVCardStr The string containing the vcard.
Returns:
A card containing the translated vcard data.
void nsIAbManager::exportAddressBook ( in nsIDOMWindow  aParentWin,
in nsIAbDirectory  aDirectory 
)

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.

Parameters:
aParentWin Parent Window for the file save dialog to use.
aDirectory The directory to export.
nsIAbDirectory nsIAbManager::getDirectory ( in ACString  aURI  ) 

Returns the directory that represents the supplied URI.

Parameters:
aURI The URI of the address book to find.
Returns:
The found address book.
boolean nsIAbManager::mailListNameExists ( in wstring  name  ) 

Finds out if the mailing list name exists in any *mork/MDB* based address book.

Parameters:
aName The name of the list to try and find.
Returns:
True if the name exists.
ACString nsIAbManager::newAddressBook ( in AString  aDirName,
in ACString  aURI,
in unsigned long  aType,
[optional] in ACString  aPrefName 
)

Creates a new address book.

Parameters:
aDirName The description of the address book.
aURI The URI for the address book. This is specific to each type of address book.
aType The type of the address book (see nsDirPrefs.h)
aPrefName Overrides the default of ldap_2.servers.<aDirName> (note that the caller must ensure its uniqueness).
void nsIAbManager::notifyDirectoryDeleted ( in nsIAbDirectory  aParentDirectory,
in nsISupports  aDirectory 
)

Call to notify the registered listeners when a directory is removed.

Parameters:
aParentDirectory The parent directory of the directory that has been removed.
aDirectory The directory that has been removed.
void nsIAbManager::notifyDirectoryItemAdded ( in nsIAbDirectory  aParentDirectory,
in nsISupports  aItem 
)

Call to notify the registered listeners when a directory item is added.

Parameters:
aParentDirectory The parent directory of the item that has been added.
aItem The item that has been added.
void nsIAbManager::notifyDirectoryItemDeleted ( in nsIAbDirectory  aParentDirectory,
in nsISupports  aItem 
)

Call to notify the registered listeners when a directory item is removed.

Parameters:
aParentDirectory The parent directory of the item that has been removed.
aItem The item that has been removed.
void nsIAbManager::notifyItemPropertyChanged ( in nsISupports  aItem,
in string  aProperty,
in wstring  aOldValue,
in wstring  aNewValue 
)

Call to notify the registered listeners when a property on an item has changed.

Parameters:
aItem The items that has changed (e.g. an nsIAbDirectory)
aProperty The property that has changed (e.g. DirName)
aOldValue The old value of the property.
aNewValue The new value of the property.
void nsIAbManager::removeAddressBookListener ( in nsIAbListener  aListener  ) 

Removes a nsIAbListener from receive notifications of address book updates.

Parameters:
aListener The listener that is to no longer receive updates.

Member Data Documentation

Returns an enumerator containing all the top-level directories (non-recursive).

Returns the user profile directory.

NOTE: this should not be used as it may go away soon.


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