nsIAbDirectory
| IID: | 55acf262-81e3-4ffe-bfd1-8b328adb49b4 |
| Inherits From: | nsISupports |
This interface is implemented by the following components:
Constants
| PRInt32 | opRead | = 1 |
| PRInt32 | opWrite | = 2 |
| PRInt32 | opSearch | = 4 |
Properties
nsISupportsArray addressLists
readonly nsISimpleEnumerator childCards
Get the cards associated with the directory. This will return the cards associated with the mailing lists too.
readonly nsISimpleEnumerator childNodes
AString description
Description of the mailing list. This attribute is only really used when the nsIAbDirectory represents a mailing list.
AString dirName
The description of the directory. If this directory is not a mailing list, then setting this attribute will send round a "DirName" update via nsIAddrBookSession.
ACString dirPrefId
The id of the directory used in prefs e.g. "ldap_2.servers.pab" Setting this will cause directoryPrefs to be updated.
readonly PRInt32 dirType
readonly ACString fileName
PRBool isMailList
readonly PRBool isRemote
Directory is local (example, mork based) or remote (example, LDAP)
readonly PRBool isSecure
Directory is secure (as in LDAP over SSL)
PRUint32 lastModifiedDate
AString listNickName
Nick Name of the mailing list. This attribute is only really used when the nsIAbDirectory represents a mailing list.
readonly PRInt32 operations
readonly PRInt32 position
readonly ACString propertiesChromeURI
The chrome URI to use for bringing up a dialog to edit this directory. When opening the dialog, use a JS argument of {selectedDirectory: thisdir} where thisdir is this directory that you just got the chrome URI from.
readonly PRBool searchDuringLocalAutocomplete
Directory should be searched when doing local autocomplete
readonly PRBool supportsMailingLists
Does this directory support mailing lists? Note that in the case this directory is a mailing list and nested mailing lists are not supported, this will return false rather than true which the parent directory might.
readonly ACString URI
Methods
nsIAbCard addCard ( nsIAbCard card )
void addMailList ( nsIAbDirectory list )
void copyMailList ( nsIAbDirectory srcList )
void createDirectoryByURI ( AString displayName , ACString URI )
ACString createNewDirectory ( AString dirName , ACString URI , PRUint32 type )
void deleteCards ( nsIArray cards )
void deleteDirectory ( nsIAbDirectory directory )
void dropCard ( nsIAbCard card , PRBool needToCopyCard )
void editMailListToDatabase ( nsIAbCard listCard )
PRBool getBoolValue ( char* name , PRBool defaultValue )
PRInt32 getIntValue ( char* name , PRInt32 defaultValue )
AUTF8String getLocalizedStringValue ( char* name , AUTF8String defaultValue )
ACString getStringValue ( char* name , ACString defaultValue )
PRBool hasCard ( nsIAbCard cards )
PRBool hasDirectory ( nsIAbDirectory dir )
void modifyCard ( nsIAbCard modifiedCard )
void setBoolValue ( char* name , PRBool value )
void setIntValue ( char* name , PRInt32 value )
void setStringValue ( char* name , ACString value )
nsIAbCard addCard ( nsIAbCard card )
Adds a card to the database. card may be an abstract card.
- Arguments:
- card
- Returns:
- nsIAbMDBCard) that can be used for some extra functions.
void addMailList ( nsIAbDirectory list )
Creates a new mailing list in the directory. Currently only supported for top-level directories.
- Arguments:
- list: The new mailing list to add.
ACString createNewDirectory ( AString dirName , ACString URI , PRUint32 type )
- Arguments:
- dirName
- URI
- type
void deleteCards ( nsIArray cards )
Deletes the array of cards from the database.
- Arguments:
- cards: The cards to delete from the database.
void dropCard ( nsIAbCard card , PRBool needToCopyCard )
- Arguments:
- card
- needToCopyCard
void editMailListToDatabase ( nsIAbCard listCard )
Edits an existing mailing list (specified as listCard) into its parent directory. You should call this function on the resource with the same uri as the listCard.
- Arguments:
- listCard: A nsIAbCard version of the mailing list with the new values.
PRInt32 getIntValue ( char* name , PRInt32 defaultValue )
Helper functions to get different types of pref, but return a default value if a pref value was not obtained.
- Arguments:
- name: The name of the pref within the branch dirPrefId to get a value from.
- defaultValue: The default value to return if getting the pref fails or the pref is not present.
- Returns:
- The value of the pref or the default value.
AUTF8String getLocalizedStringValue ( char* name , AUTF8String defaultValue )
- Arguments:
- name
- defaultValue
PRBool hasCard ( nsIAbCard cards )
- Arguments:
- cards
void modifyCard ( nsIAbCard modifiedCard )
Modifies a card in the database to match that supplied.
- Arguments:
- modifiedCard
void setIntValue ( char* name , PRInt32 value )
Helper functions to set different types of pref values.
- Arguments:
- name: The name of the pref within the branch dirPrefId to get a value from.
- value: The value to set the pref to.
References
This interface is the type of the following properties:
This interface is passed as an argument to the following methods:
nsIAbDirFactory.deleteDirectory, nsIAbDirectory.addMailList, nsIAbDirectory.copyMailList, nsIAbDirectory.deleteDirectory, nsIAbDirectory.hasDirectory, nsIAbDirectoryQuery.doQuery, nsIAbMDBDirectory.addMailListToDirectory, nsIAbManager.exportAddressBook, nsIAbManager.notifyDirectoryDeleted, nsIAbManager.notifyDirectoryItemAdded, nsIAbManager.notifyDirectoryItemDeleted, nsIAddrDBListener.onListEntryChange, nsIAddrDatabase.containsMailList, nsIAddrDatabase.createMailListAndAddToDB, nsIAddrDatabase.createNewListCardAndAddToDB, nsIAddrDatabase.deleteCardFromMailList, nsIAddrDatabase.deleteMailList, nsIAddrDatabase.editMailList, nsIAddrDatabase.enumerateCards, nsIAddrDatabase.enumerateListAddresses, nsIAddrDatabase.getCardFromAttribute, nsIAddrDatabase.getMailingListsFromDB
This interface is returned from the following methods:
nsIAbMDBDirectory.addDirectory
Reference documentation is generated from Mozilla's source.
