Avaya Client Services API Reference (iOS)
|
The DownloadService object provides a set of APIs that allow app to download any files through a URL securely including auto configure setting file, trust cert file, custom logo file, etc. More...
#import <CSDownloadService.h>
Inherits NSObject.
Instance Methods | |
(CSDownloadWatcher *) | - retrieveDataFromUrlWithConfiguration:sourceURL:completionHandler: |
Retrieve arbitrary binary data from URL. More... | |
(CSDownloadWatcher *) | - retrieveDataFromUrlWithConfiguration:sourceURL:optionalParameters:completionHandler: |
Retrieve arbitrary binary data from URL. More... | |
(CSDownloadWatcher *) | - retrieveTextFromUrlWithConfiguration:sourceURL:completionHandler: |
Retrieve text data from URL. More... | |
(CSDownloadWatcher *) | - retrieveTextFromUrlWithConfiguration:sourceURL:optionalParameters:completionHandler: |
Retrieve text data from URL. More... | |
(CSDownloadWatcher *) | - downloadFileFromUrlWithConfiguration:sourceURL:destinationDirectory:completionHandler: |
Retrieve FileHandle for downloaded data from URL. More... | |
(CSDownloadWatcher *) | - downloadFileFromUrlWithConfiguration:sourceURL:destinationDirectory:optionalParameters:completionHandler: |
Retrieve FileHandle for downloaded data from URL. More... | |
The DownloadService object provides a set of APIs that allow app to download any files through a URL securely including auto configure setting file, trust cert file, custom logo file, etc.
- (CSDownloadWatcher *) downloadFileFromUrlWithConfiguration: | (CSDownloadServiceConfiguration *) | downloadServiceConfiguration | |
sourceURL: | (NSURL *) | sourceURL | |
destinationDirectory: | (NSString *) | destinationDirectory | |
completionHandler: | (void(^)(NSFileHandle *fileHandle, NSError *error)) | handler | |
Retrieve FileHandle for downloaded data from URL.
This function allows clients to download large files.
downloadServiceConfiguration | Server configuration that will be used for this request. |
destinationDirectory | The directory for storing downloaded data. |
sourceURL | URL of the source file. |
handler | The completion handler for this operation. |
- (CSDownloadWatcher *) downloadFileFromUrlWithConfiguration: | (CSDownloadServiceConfiguration *) | downloadServiceConfiguration | |
sourceURL: | (NSURL *) | sourceURL | |
destinationDirectory: | (NSString *) | destinationDirectory | |
optionalParameters: | (CSDownloadOptionalParameters *) | optionalParameters | |
completionHandler: | (CSDownloadFileFromUrlWithOptionalParametersCompletionHandler) | handler | |
Retrieve FileHandle for downloaded data from URL.
This function allows clients to download large files.
downloadServiceConfiguration | Server configuration that will be used for this request. |
destinationDirectory | The directory for storing downloaded data. |
sourceURL | URL of the source file. |
optionalParameters | Optional parameters to control download process. |
handler | The completion handler for this operation. The fileHandle may be null if either an error occurs or the file has not been modified as compared to its version identified by the E-Tag passed as part of the optional download parameters. |
- (CSDownloadWatcher *) retrieveDataFromUrlWithConfiguration: | (CSDownloadServiceConfiguration *) | downloadServiceConfiguration | |
sourceURL: | (NSURL *) | sourceURL | |
completionHandler: | (void(^)(NSData *binaryData, NSError *error)) | handler | |
Retrieve arbitrary binary data from URL.
The download limit is set to 5 MB. If a client needs to download files larger than 5 MB it should use downloadFileFromUrlWithConfiguration:sourceURL:destinationDirectory:completionHandler: Otherwise, a successful result is not guaranteed. The operation can fail with DownloadServiceError.Failed error.
downloadServiceConfiguration | Server configuration that will be used for this request. |
sourceURL | URL of the source file. |
handler | The completion handler for this operation. |
- (CSDownloadWatcher *) retrieveDataFromUrlWithConfiguration: | (CSDownloadServiceConfiguration *) | downloadServiceConfiguration | |
sourceURL: | (NSURL *) | sourceURL | |
optionalParameters: | (CSDownloadOptionalParameters *) | optionalParameters | |
completionHandler: | (CSRetrieveDataFromUrlWithOptionalParametersCompletionHandler) | handler | |
Retrieve arbitrary binary data from URL.
The download limit is set to 5 MB. If a client needs to download files larger than 5 MB it should use downloadFileFromUrlWithConfiguration:sourceURL:destinationDirectory:optionalParameters:completionHandler: Otherwise, a successful result is not guaranteed. The operation can fail with DownloadServiceError.Failed error.
downloadServiceConfiguration | Server configuration that will be used for this request. |
sourceURL | URL of the source file. |
optionalParameters | Optional parameters to control download process. |
handler | The completion handler for this operation. The binaryData may be null if either an error occurs or the file has not been modified as compared to its version identified by the E-Tag passed as part of the optional download parameters. |
- (CSDownloadWatcher *) retrieveTextFromUrlWithConfiguration: | (CSDownloadServiceConfiguration *) | downloadServiceConfiguration | |
sourceURL: | (NSURL *) | sourceURL | |
completionHandler: | (void(^)(NSString *textData, NSError *error)) | handler | |
Retrieve text data from URL.
The download limit is set to 5 MB. If a client needs to download files larger than 5 MB it should use downloadFileFromUrlWithConfiguration:sourceURL:destinationDirectory:completionHandler: Otherwise, a successful result is not guaranteed. The operation can fail with DownloadServiceError.Failed error. Use this method only for downloading text files(Content-Type prefix "text" or "message"). Otherwise the operation will fail with DownloadServiceError.InvalidContentType error.
downloadServiceConfiguration | Server configuration that will be used for this request. |
sourceURL | URL of the source file. |
handler | The completion handler for this operation. |
- (CSDownloadWatcher *) retrieveTextFromUrlWithConfiguration: | (CSDownloadServiceConfiguration *) | downloadServiceConfiguration | |
sourceURL: | (NSURL *) | sourceURL | |
optionalParameters: | (CSDownloadOptionalParameters *) | optionalParameters | |
completionHandler: | (CSRetrieveTextFromUrlWithOptionalParametersCompletionHandler) | handler | |
Retrieve text data from URL.
The download limit is set to 5 MB. If a client needs to download files larger than 5 MB it should use downloadFileFromUrlWithConfiguration:sourceURL:destinationDirectory:optionalParameters:completionHandler: Otherwise, a successful result is not guaranteed. The operation can fail with DownloadServiceError.Failed error. Use this method only for downloading text files(Content-Type prefix "text" or "message"). Otherwise the operation will fail with DownloadServiceError.InvalidContentType error.
downloadServiceConfiguration | Server configuration that will be used for this request. |
sourceURL | URL of the source file. |
optionalParameters | Optional parameters to control download process. |
handler | The completion handler for this operation. The textData may be null if either an error occurs or the file has not been modified as compared to its version identified by the E-Tag passed as part of the optional download parameters. |