Class com.gContactSync.AbManager
Defined in: AbManager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
An object that can obtain address books by the name or URI, find the synced
address books, and edit cards.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
com.gContactSync.AbManager.mBasicAttributes
attributes that can be set by getCardValue and setCardValue
|
<static> |
com.gContactSync.AbManager.mBug413260
True if the changes started in Bug 413260 have been applied
|
<static> |
com.gContactSync.AbManager.mVersion
The version of Thunderbird
|
Method Attributes | Method Name and Description |
---|---|
<static> |
com.gContactSync.AbManager.cardHasEmailAddress(aCard, aAddresses)
Returns true if the card has at least one e-mail address identical to one
in aAddresses.
|
<static> |
com.gContactSync.AbManager.checkCard(aCard, aMethodName)
Checks the validity of a card and throws an error if the card is invalid.
|
<static> |
com.gContactSync.AbManager.deleteAB(aURI)
Deletes the Address Book with the given URI.
|
<static> |
com.gContactSync.AbManager.getAbByName(aDirName, aDontMakeAb)
Returns the Address Book if it can be found.
|
<static> |
com.gContactSync.AbManager.getAbByURI(aURI)
Returns the address book with the given URI, if found.
|
<static> |
com.gContactSync.AbManager.getCardEmailAddresses(aCard)
Returns an object with a property for each of the e-mail addresses of this
card as recognized by gContactSync (PrimaryEmail, SecondEmail, ThirdEmail,
and FourthEmail)
|
<static> |
com.gContactSync.AbManager.getCardValue(aCard, aAttrName)
Returns the value of the specifiec property in the given card, or throws an
error if it is not present or blank.
|
<static> |
com.gContactSync.AbManager.getMDBCardValue(aCard, aAttrName)
Returns the requested value of an MDB card's attribute.
|
<static> |
com.gContactSync.AbManager.isDirectoryValid(aDirectory)
Checks the validity of a directory and returns false if it is invalid.
|
<static> |
com.gContactSync.AbManager.isRegularAttribute(aAttribute)
Returns true if the given attribute is able to be set/obtained through the
setCardValue and getCardValue functions of nsIAbCard.
|
<static> |
com.gContactSync.AbManager.setCardValue(aCard, aAttrName, aValue)
Sets the value of the specifiec property in the given card but does not
update the card in the database.
|
<static> |
com.gContactSync.AbManager.setMDBCardValue(aCard, aAttrName, aValue)
Sets the requested value of an MDB card's attribute.
|
Class Detail
com.gContactSync.AbManager()
An object that can obtain address books by the name or URI, find the synced
address books, and edit cards.
Field Detail
<static>
com.gContactSync.AbManager.mBasicAttributes
attributes that can be set by getCardValue and setCardValue
<static>
com.gContactSync.AbManager.mBug413260
True if the changes started in Bug 413260 have been applied
<static>
com.gContactSync.AbManager.mVersion
The version of Thunderbird
Method Detail
<static>
{boolean}
com.gContactSync.AbManager.cardHasEmailAddress(aCard, aAddresses)
Returns true if the card has at least one e-mail address identical to one
in aAddresses.
- Parameters:
- aCard
- {nsIAbCard} The card from which the e-mail addresses are obtained.
- aAddresses
- An object with the card's e-mail addresses as returned by AbManager.getCardEmailAddresses.
- Returns:
- {boolean} True if the card has at least one e-mail address in common with aAddresses.
<static>
com.gContactSync.AbManager.checkCard(aCard, aMethodName)
Checks the validity of a card and throws an error if the card is invalid.
- Parameters:
- aCard
- {nsIAbCard} An object that should be an instance of nsIAbCard
- aMethodName
- {string} The name of the method calling checkCard (used when throwing the error)
<static>
com.gContactSync.AbManager.deleteAB(aURI)
Deletes the Address Book with the given URI.
This does NOT provide any confirmation dialog.
Note: This will not work in Thunderbird 2 with mailing lists.
This will not allow deleting the PAB or CAB and will show a popup
if there is an attempt to delete one of those ABs.
- Parameters:
- aURI
- {string} The URI of the address book to delete.
<static>
{nsIAbDirectory}
com.gContactSync.AbManager.getAbByName(aDirName, aDontMakeAb)
Returns the Address Book if it can be found. If it cannot be found
it tries once to make it and return the newly made address book.
- Parameters:
- aDirName
- {string} The name of the address book
- aDontMakeAb
- {boolean} True if the address book shouldn't be created if not found.
- Returns:
- {nsIAbDirectory} The Address Book with the name given
<static>
{nsIAbDirectory}
com.gContactSync.AbManager.getAbByURI(aURI)
Returns the address book with the given URI, if found. Does not attempt
to make a new address book if not found and returns null.
- Parameters:
- aURI
- Returns:
- {nsIAbDirectory} The Address Book with the given URI
<static>
com.gContactSync.AbManager.getCardEmailAddresses(aCard)
Returns an object with a property for each of the e-mail addresses of this
card as recognized by gContactSync (PrimaryEmail, SecondEmail, ThirdEmail,
and FourthEmail)
- Parameters:
- aCard
- {nsIAbCard} The card from which the e-mail addresses are obtained.
- Returns:
- An object with the card's e-mail addresses.
<static>
com.gContactSync.AbManager.getCardValue(aCard, aAttrName)
Returns the value of the specifiec property in the given card, or throws an
error if it is not present or blank.
- Parameters:
- aCard
- {nsIAbCard} The card to get the value from.
- aAttrName
- {string} The name of the attribute to get.
<static>
{string}
com.gContactSync.AbManager.getMDBCardValue(aCard, aAttrName)
Returns the requested value of an MDB card's attribute. Performs a
QueryInterface if necessary.
- Parameters:
- aCard
- {nsIAbCard} The MDB card to get the value from.
- aAttrName
- {string} The name of the attribute whose value is returned.
- Returns:
- {string} The value of aCard's attribute aAttrName.
<static>
com.gContactSync.AbManager.isDirectoryValid(aDirectory)
Checks the validity of a directory and returns false if it is invalid.
- Parameters:
- aDirectory
- {nsIAbDirectory} The directory to check.
<static>
com.gContactSync.AbManager.isRegularAttribute(aAttribute)
Returns true if the given attribute is able to be set/obtained through the
setCardValue and getCardValue functions of nsIAbCard.
- Parameters:
- aAttribute
- The attribute to check.
- Returns:
- True if aAttribute is usable with set/getCardValue.
<static>
com.gContactSync.AbManager.setCardValue(aCard, aAttrName, aValue)
Sets the value of the specifiec property in the given card but does not
update the card in the database.
- Parameters:
- aCard
- {nsIAbCard} The card to get the value from.
- aAttrName
- {string} The name of the attribute to set.
- aValue
- {string} The value to set for the attribute.
<static>
{boolean}
com.gContactSync.AbManager.setMDBCardValue(aCard, aAttrName, aValue)
Sets the requested value of an MDB card's attribute. Performs a
QueryInterface if necessary.
- Parameters:
- aCard
- {nsIAbCard} The MDB card to set the value for.
- aAttrName
- {string} The name of the attribute whose value is set.
- aValue
- {string} The value to set for aAttrName.
- Returns:
- {boolean} True if the attribute was set to the given value.