Class Index | File Index

Classes


Class com.gContactSync.Sync


Defined in: Sync.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Synchronizes a Thunderbird Address Book with Google Contacts.
Field Summary
Field Attributes Field Name and Description
<static>  
com.gContactSync.Sync.mAddressBooks
Synchronized address book
<static>  
com.gContactSync.Sync.mBackup
Temporarily set to true when a backup is necessary for this account
<static>  
com.gContactSync.Sync.mContactsToAdd
New contacts to add to Google
<static>  
com.gContactSync.Sync.mContactsToDelete
Google contacts that should be deleted
<static>  
com.gContactSync.Sync.mContactsToUpdate
Contacts to update
<static>  
com.gContactSync.Sync.mContactsUrl
override for the contact feed URL.
<static>  
com.gContactSync.Sync.mCurrentAb
The current address book being synchronized
<static>  
com.gContactSync.Sync.mCurrentAuthToken
The current authentication token
<static>  
com.gContactSync.Sync.mCurrentSummary
Summary data from the current sync
<static>  
com.gContactSync.Sync.mCurrentUsername
The current username
<static>  
com.gContactSync.Sync.mFirstBackup
Temporarily set to true when the first backup is necessary
<static>  
com.gContactSync.Sync.mGroups
used to store groups for the account being synchronized
<static>  
com.gContactSync.Sync.mGroupsToAdd
Groups to add
<static>  
com.gContactSync.Sync.mGroupsToAddURI
Groups to add (URIs)
<static>  
com.gContactSync.Sync.mGroupsToDelete
Groups to delete
<static>  
com.gContactSync.Sync.mGroupsToUpdate
Groups to update
<static>  
com.gContactSync.Sync.mIndex
The index of the AB being synced
<static>  
com.gContactSync.Sync.mLists
stores the mail lists in the directory being synchronized
<static>  
com.gContactSync.Sync.mManualSync
This should be set to true if the sync was run manually
<static>  
com.gContactSync.Sync.mNewPhotoURI
The URI of a photo to be added to the newly created Google contact
<static>  
com.gContactSync.Sync.mOverallSummary
Summary data from the entire synchronization
<static>  
com.gContactSync.Sync.mSyncScheduled
True if a synchronization is scheduled
Method Summary
Method Attributes Method Name and Description
<static>  
com.gContactSync.Sync.addGroups()
The first part of adding a group involves creating the XML representation of the mail list and then calling com.gContactSync.Sync.addGroups2() upon successful creation of a group.
<static>  
com.gContactSync.Sync.addGroups2(aResponse)
The second part of adding a group involves updating the list from which this group was created so the two can be matched during the next sync.
<static>  
com.gContactSync.Sync.begin(aManualSync)
Performs the first steps of the sync process.
<static>  
com.gContactSync.Sync.deleteGroups()
Deletes all of the groups in mGroupsToDelete one at a time to avoid timing issues.
<static>  
com.gContactSync.Sync.finish(aError, aStartOver)
Completes the synchronization process by writing the finish time to a file, writing the sync details to a different file, scheduling another sync, and writes the completion status to the status bar.
<static>  
com.gContactSync.Sync.getContacts()
Sends an HTTP Request to Google for a feed of all the user's contacts.
<static>  
com.gContactSync.Sync.getGroups()
Sends an HTTP Request to Google for a feed of all of the user's groups.
<static>  
com.gContactSync.Sync.mOfflineFunction(httpReq)
Commands to execute when offline during an HTTP Request
<static>  
com.gContactSync.Sync.processAddQueue()
Adds all cards to Google included in the mContactsToAdd array one at a time to avoid timing conflicts.
<static>  
com.gContactSync.Sync.processDeleteQueue()
Deletes all contacts from Google included in the mContactsToDelete array one at a time to avoid timing conflicts.
<static>  
com.gContactSync.Sync.processUpdateQueue()
Updates all cards to Google included in the mContactsToUpdate array one at a time to avoid timing conflicts.
<static>  
com.gContactSync.Sync.requestDeletePermission(The, The)
Shows a confirmation dialog asking the user to give gContactSync permission to delete the specified number of contacts from Google and Thunderbird.
<static>  
com.gContactSync.Sync.schedule(aDelay)
Schedules another sync after the given delay if one is not already scheduled, there isn't a sync currently running, if the delay is greater than 0, and finally if the auto sync pref is set to true.
<static>  
com.gContactSync.Sync.sync2(aAtom)
Does the actual synchronization of contacts and modifies the AB as it goes.
<static>  
com.gContactSync.Sync.syncGroups(aAtom)
Syncs all contact groups with mailing lists.
<static>  
com.gContactSync.Sync.syncNextUser()
Synchronizes the next address book in com.gContactSync.Sync.mAddressBooks.
<static>  
com.gContactSync.Sync.updateGroups()
Updates all groups in mGroupsToUpdate one at a time to avoid timing issues and calls com.gContactSync.Sync.getContacts() when finished.
Class Detail
com.gContactSync.Sync()
Synchronizes a Thunderbird Address Book with Google Contacts.
Field Detail
<static> com.gContactSync.Sync.mAddressBooks
Synchronized address book

<static> com.gContactSync.Sync.mBackup
Temporarily set to true when a backup is necessary for this account

<static> com.gContactSync.Sync.mContactsToAdd
New contacts to add to Google

<static> com.gContactSync.Sync.mContactsToDelete
Google contacts that should be deleted

<static> com.gContactSync.Sync.mContactsToUpdate
Contacts to update

<static> com.gContactSync.Sync.mContactsUrl
override for the contact feed URL. Intended for syncing one group only

<static> com.gContactSync.Sync.mCurrentAb
The current address book being synchronized

<static> com.gContactSync.Sync.mCurrentAuthToken
The current authentication token

<static> com.gContactSync.Sync.mCurrentSummary
Summary data from the current sync

<static> com.gContactSync.Sync.mCurrentUsername
The current username

<static> com.gContactSync.Sync.mFirstBackup
Temporarily set to true when the first backup is necessary

<static> com.gContactSync.Sync.mGroups
used to store groups for the account being synchronized

<static> com.gContactSync.Sync.mGroupsToAdd
Groups to add

<static> com.gContactSync.Sync.mGroupsToAddURI
Groups to add (URIs)

<static> com.gContactSync.Sync.mGroupsToDelete
Groups to delete

<static> com.gContactSync.Sync.mGroupsToUpdate
Groups to update

<static> com.gContactSync.Sync.mIndex
The index of the AB being synced

<static> com.gContactSync.Sync.mLists
stores the mail lists in the directory being synchronized

<static> com.gContactSync.Sync.mManualSync
This should be set to true if the sync was run manually

<static> com.gContactSync.Sync.mNewPhotoURI
The URI of a photo to be added to the newly created Google contact

<static> com.gContactSync.Sync.mOverallSummary
Summary data from the entire synchronization

<static> com.gContactSync.Sync.mSyncScheduled
True if a synchronization is scheduled
Method Detail
<static> com.gContactSync.Sync.addGroups()
The first part of adding a group involves creating the XML representation of the mail list and then calling com.gContactSync.Sync.addGroups2() upon successful creation of a group.

<static> com.gContactSync.Sync.addGroups2(aResponse)
The second part of adding a group involves updating the list from which this group was created so the two can be matched during the next sync.
Parameters:
aResponse
{XMLHttpRequest} The HTTP request.

<static> com.gContactSync.Sync.begin(aManualSync)
Performs the first steps of the sync process.
Parameters:
aManualSync
{boolean} Set this to true if the sync was run manually.

<static> com.gContactSync.Sync.deleteGroups()
Deletes all of the groups in mGroupsToDelete one at a time to avoid timing issues. Calls com.gContactSync.Sync.addGroups() when finished.

<static> com.gContactSync.Sync.finish(aError, aStartOver)
Completes the synchronization process by writing the finish time to a file, writing the sync details to a different file, scheduling another sync, and writes the completion status to the status bar.
Parameters:
aError
{string} Optional. A string containing the error message.
aStartOver
{boolean} Also optional. True if the sync should be restarted.

<static> com.gContactSync.Sync.getContacts()
Sends an HTTP Request to Google for a feed of all the user's contacts. Calls com.gContactSync.Sync.sync with the response if successful or com.gContactSync.Sync.syncNextUser with the error.

<static> com.gContactSync.Sync.getGroups()
Sends an HTTP Request to Google for a feed of all of the user's groups. Calls com.gContactSync.Sync.begin() when there is a successful response on an error other than offline.

<static> com.gContactSync.Sync.mOfflineFunction(httpReq)
Commands to execute when offline during an HTTP Request
Parameters:
httpReq

<static> com.gContactSync.Sync.processAddQueue()
Adds all cards to Google included in the mContactsToAdd array one at a time to avoid timing conflicts. Calls com.gContactSync.Sync.processUpdateQueue() when finished.

<static> com.gContactSync.Sync.processDeleteQueue()
Deletes all contacts from Google included in the mContactsToDelete array one at a time to avoid timing conflicts. Calls com.gContactSync.Sync.processAddQueue() when finished.

<static> com.gContactSync.Sync.processUpdateQueue()
Updates all cards to Google included in the mContactsToUpdate array one at a time to avoid timing conflicts. Calls com.gContactSync.Sync.syncNextUser() when done.

<static> {boolean} com.gContactSync.Sync.requestDeletePermission(The, The)
Shows a confirmation dialog asking the user to give gContactSync permission to delete the specified number of contacts from Google and Thunderbird. If the user clicks Cancel then synchronization with the current address book is disabled.
Parameters:
{int} The
number of contacts about to be deleted from Thunderbird.
{int} The
number of contacts about to be deleted from Google.
Returns:
{boolean} True if the user clicked OK, false if Cancel.

<static> com.gContactSync.Sync.schedule(aDelay)
Schedules another sync after the given delay if one is not already scheduled, there isn't a sync currently running, if the delay is greater than 0, and finally if the auto sync pref is set to true.
Parameters:
aDelay
{integer} The duration of time to wait before synchronizing again.

<static> com.gContactSync.Sync.sync2(aAtom)
Does the actual synchronization of contacts and modifies the AB as it goes. Initializes arrays of Google contacts to add, remove, or update.
Parameters:
aAtom
{XML} The ATOM/XML feed of contacts.

<static> com.gContactSync.Sync.syncGroups(aAtom)
Syncs all contact groups with mailing lists.
Parameters:
aAtom
{XML} The ATOM/XML feed of Groups.

<static> com.gContactSync.Sync.syncNextUser()
Synchronizes the next address book in com.gContactSync.Sync.mAddressBooks. If all ABs were synchronized, then this continues with com.gContactSync.Sync.finish();

<static> com.gContactSync.Sync.updateGroups()
Updates all groups in mGroupsToUpdate one at a time to avoid timing issues and calls com.gContactSync.Sync.getContacts() when finished.

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