Class Index | File Index

Classes


Class com.gContactSync.GAddressBook


Extends com.gContactSync.AddressBook.

Defined in: GAddressBook.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
com.gContactSync.GAddressBook(aDirectory, aNoPrefs)
An extension of AddressBook that adds functionality specific to gContactSync.
Fields borrowed from class com.gContactSync.AddressBook:
mContacts, mContactsUpdate, mURI
Method Summary
Method Attributes Method Name and Description
 
getAllLists(skipGetCards)
Returns an an object containing GMailList objects whose attribute name is the name of the mail list.
 
Fetches all of this directory's preferences.
 
newListObj(aList, aParentDirectory, aNew)
Returns a new GMailList object given the same parameters as the GMailList constructor.
 
Updates the LastModifiedDate of every contact in this address book so it gets updated during the next sync.
 
'Resets' this address book making it appear to be brand new and never synchronized.
 
savePref(aName, aValue)
Save the value of a given preference for this address book.
 
setLastSyncDate(aLastSync)
Sets the last time this address book was synchronized, in milliseconds since the epoch.
Methods borrowed from class com.gContactSync.AddressBook:
addContact, addList, checkDirectory, checkList, deleteAB, deleteContacts, equals, getAllContacts, getDirType, getListByNickName, getName, getPrefId, getStringPref, hasContact, isDirectoryValid, newContact, setName, setPrefId, setStringPref, updateContact
Class Detail
com.gContactSync.GAddressBook(aDirectory, aNoPrefs)
An extension of AddressBook that adds functionality specific to gContactSync.
Parameters:
aDirectory
{nsIAbDirectory} The actual directory.
aNoPrefs
{boolean} Set this to true to skip fetching the preferences.
Method Detail
{object} getAllLists(skipGetCards)
Returns an an object containing GMailList objects whose attribute name is the name of the mail list.
Parameters:
skipGetCards
{boolean} True to skip getting the cards of each list.
Returns:
{object} An object containing GMailList objects.

getPrefs()
Fetches all of this directory's preferences. If the directory does not have any given preferences this function will use the global preference's value, if any.

{GMailList} newListObj(aList, aParentDirectory, aNew)
Returns a new GMailList object given the same parameters as the GMailList constructor. See the GMailList constructor for the most recent comments.
Parameters:
aList
{Ci.nsIAbDirectory} The actual nsIAbDirectory representation of a mailing list.
aParentDirectory
{GAddressBook} The parent directory (as an AddressBook object) containing this mailing list.
aNew
{boolean} Set as true for new mailing lists where no attempt should be made to fetch the contacts contained in the list.
Returns:
{GMailList} A new GMailList.

replaceToServer()
Updates the LastModifiedDate of every contact in this address book so it gets updated during the next sync.

{boolean} reset()
'Resets' this address book making it appear to be brand new and never synchronized. The username is NOT erased. This includes: - Creating a backup - Deleting all mailing lists - Deleting all contacts - Setting primary to true - Setting the last sync date to 0
Returns:
{boolean} True if the AB was reset, false otherwise.

savePref(aName, aValue)
Save the value of a given preference for this address book.
Parameters:
aName
{string} The name of the preference to set.
aValue
{string} The value to set the preference to.

setLastSyncDate(aLastSync)
Sets the last time this address book was synchronized, in milliseconds since the epoch.
Parameters:
aLastSync
{integer} The last sync time.

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