OfflineODataDelegate
@available(swift, deprecated: 5.1, message: "New functions for obtaining progress information for open, download, upload, and sendStore are available using OfflineODataProviderDelegate.")
public protocol OfflineODataDelegate
A delegate used to get progress updates while an OfflineODataProvider is
opening, downloading, file downloading, uploading, and sending the store to server,
to get state change notifications, and to get information about requests that fail
during an upload.
-
Called every time there is an update while the
OfflineODataProvideris performing a download.Generally the SAPOfflineOData framework and mobile services communicate through a sequence of proprietary commands while performing a download. This is the typical communication when performing a download to retrieve the delta from the backend. This function updates the progress of that communication.
During the download processing, mobile services MAY decide to send a new offline store in its entirety via a file download. For progress on the file transfer itself see
offlineODataProvider(_:didUpdateFileDownloadProgress:).Declaration
Swift
func offlineODataProvider(_ provider: OfflineODataProvider, didUpdateDownloadProgress progress: OfflineODataProgress)Parameters
providerThe
OfflineODataProviderwhose download progress has been updated.progressThe progress update.
-
Called every time there is an update while downloading an offline store via a file download.
A new offline store is always received via a file download the first time the
OfflineODataProvideris opened. On subsequent downloads (OfflineODataProvider.download(completionHandler:)) a new offline store will be sent via a file download if a change to the metadata is detected or if a delta link expired.Declaration
Swift
func offlineODataProvider(_ provider: OfflineODataProvider, didUpdateFileDownloadProgress progress: OfflineODataFileDownloadProgress)Parameters
providerThe
OfflineODataProviderwhose file download progress has been updated.progressThe progress update.
-
Called every time there is an update while the provider is uploading.
Declaration
Swift
func offlineODataProvider(_ provider: OfflineODataProvider, didUpdateUploadProgress progress: OfflineODataProgress)Parameters
providerThe
OfflineODataProviderwhose upload progress has been updated.progressThe progress update.
-
Called once for each request that fails against the OData backend during an upload.
Note that the upload operation will report a successful result even if some requests have failed against the OData backend.
Declaration
Swift
func offlineODataProvider(_ provider: OfflineODataProvider, requestDidFail request: OfflineODataFailedRequest)Parameters
providerThe
OfflineODataProviderthat was performing the upload.requestInformation about the failed request.
-
Called whenever the store state changes.
Declaration
Swift
func offlineODataProvider(_ provider: OfflineODataProvider, stateDidChange newState: OfflineODataStoreState)Parameters
providerThe
OfflineODataProviderwhose state has changed.newStateThe new state.
-
offlineODataProvider(_:Default implementationdidUpdateSendStoreProgress: ) Called every time there is an update while the provider is sending the offline store to server.
Default Implementation
Called every time there is an update while the provider is sending the offline store to server.
Declaration
Swift
func offlineODataProvider(_ provider: OfflineODataProvider, didUpdateSendStoreProgress progress: OfflineODataSendStoreProgress)Parameters
providerThe
OfflineODataProviderwhose send store progress has been updated.progressThe progress update.