Class Index | File Index

Classes


Class com.gContactSync.GAbManager


Extends com.gContactSync.AbManager.

Defined in: GAbManager.js.

Class Summary
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 contacts.
Field Summary
Field Attributes Field Name and Description
<static>  
com.gContactSync.GAbManager.mABs
Stores GAddressBook objects keyed by preference ID *AND* URI
Method Summary
Method Attributes Method Name and Description
<static>  
com.gContactSync.GAbManager.backupAB(aAb, aPrefix, aSuffix)
Backs up the given address book.
<static>  
com.gContactSync.GAbManager.getAllAddressBooks(aDirType)
Returns an object filled with GAddressBook objects keyed by URI.
<static>  
com.gContactSync.GAbManager.getGAb(aDirectory, aNoPrefs)
Returns a GAddressBook object for the given nsIAbDirectory.
<static>  
com.gContactSync.GAbManager.getGAbByURI(aURI)
Returns a GAddressBook object for the given URI.
<static>  
com.gContactSync.GAbManager.getSyncedAddressBooks(aMakeArray)
Returns an object filled with GAddressBook objects.
<static>  
com.gContactSync.GAbManager.resetAllSyncedABs(showConfirm)
Resets all synchronized address books in the following ways: - Deletes all mailing lists - Deletes all contacts - Sets the last sync date to 0.
Class Detail
com.gContactSync.GAbManager()
An object that can obtain address books by the name or URI, find the synced address books, and edit contacts.
Field Detail
<static> com.gContactSync.GAbManager.mABs
Stores GAddressBook objects keyed by preference ID *AND* URI
Method Detail
<static> {boolean} com.gContactSync.GAbManager.backupAB(aAb, aPrefix, aSuffix)
Backs up the given address book. This consists of copying the Mork Address Book (MAB) file into the gContactSync directory. The backup is prefixed with the value of aPrefix (if not blank) followed by the original name of the file and ended with the value of aSuffix. NOTE: If a file already exists with the
Parameters:
aAb
{GAddressBook} The address book to backup.
aPrefix
aSuffix
Returns:
{boolean} True if the AB was successfully backed up

<static> {object} com.gContactSync.GAbManager.getAllAddressBooks(aDirType)
Returns an object filled with GAddressBook objects keyed by URI.
Parameters:
aDirType
{int} The type of directory (2 is the usual Mork AB)
Returns:
{object} An object filled with GAddressBook objects keyed by URI.

<static> com.gContactSync.GAbManager.getGAb(aDirectory, aNoPrefs)
Returns a GAddressBook object for the given nsIAbDirectory. If a GAddressBook for the directory's URI or pref branch has already been returned and is still stored, it is returned and no new object is created.
Parameters:
aDirectory
aNoPrefs

<static> com.gContactSync.GAbManager.getGAbByURI(aURI)
Returns a GAddressBook object for the given URI. If a GAddressBook for the URI or directory's pref branch has already been returned and is still stored, it is returned and no new object is created.
Parameters:
aURI

<static> com.gContactSync.GAbManager.getSyncedAddressBooks(aMakeArray)
Returns an object filled with GAddressBook objects. The properties are the names of those address books.
Parameters:
aMakeArray
{boolean} If this parameter evaluates as true then the returned object will be an array.
Returns:
If aMakeArray then the returned object is an array of objects. Each object has a 'username' property with the username of this synced AB and an 'ab' property with a GAddressBook object. If !aMakeArray then the returned object is keyed by username and the value of that property is an array of GAddressBook objects.

<static> com.gContactSync.GAbManager.resetAllSyncedABs(showConfirm)
Resets all synchronized address books in the following ways: - Deletes all mailing lists - Deletes all contacts - Sets the last sync date to 0. See AddressBook.reset for more details. It asks the user to restart Thunderbird when finished.
Parameters:
showConfirm
{boolean} Show a confirmation dialog first and quit if the user presses Cancel.

Documentation generated by JsDoc Toolkit 2.1.0 on Fri May 06 2011 09:24:18 GMT-0400 (EDT)