SyncData¶
-
class
SyncData(accountID)¶ There is only one SyncData instance per account which contains all relevant information regarding an ongoing sync.
-
SyncData.accountData¶ Getter for the
AccountData()instance of the account being currently synced.
-
SyncData.currentFolderData¶ Getter for the
FolderData()instance of the folder being currently synced. Can benullif no folder is being synced.
-
SyncData.eventLogInfo¶ Getter for an
EventLogInfo()instance with all the information regarding this SyncData instance.
-
SyncData.getSyncState()¶ Gets the current syncstate and its timestamp of the ongoing sync. The returned Object has the following attributes:
state: the current syncstatetimestamp: its timestamp
Returns: Object – The syncstate and its timestamp.
-
SyncData.progressData¶ Getter for the
ProgressData()instance of the ongoing sync.
-
SyncData.setSyncState(state)¶ Sets the syncstate of the ongoing sync, to provide feedback to the user. The selected state can trigger special UI features, if it starts with one of the following prefixes:
send.,eval.,prepare.: The status message in the UI will be appended with the current progress stored in theProgressData()associated with this SyncData instance. SeeSyncData.progressData().send.: The status message in the UI will be appended by a timeout countdown with the timeout being defined byBase.getConnectionTimeout().
Arguments: - state (string) – A short syncstate identifier. The actual message to be displayed in the UI will be looked up in the string bundle of the provider associated with this SyncData instance (
Base.getStringBundleUrl()) by looking forsyncstate.<state>. The lookup is done viagetString(), so the same fallback rules apply.
-