Avaya Client Services API Reference (OS X)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

Instance Methods | List of all members
CSDownloadService Class Reference

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...

## Detailed Description

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.

## Method Documentation

- (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.

Parameters

  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.

Returns
  DownloadWatcher object for monitoring download requests.

- (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.

Parameters

  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.

Returns
  DownloadWatcher object for monitoring download requests.

- (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.

Parameters

  downloadServiceConfiguration | Server configuration that will be used for this request.
  sourceURL | URL of the source file.
  handler | The completion handler for this operation.

Returns
  DownloadWatcher object for monitoring download requests.

- (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.

Parameters

  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.

Returns
  DownloadWatcher object for monitoring download requests.

- (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.

Parameters

  downloadServiceConfiguration | Server configuration that will be used for this request.
  sourceURL | URL of the source file.
  handler | The completion handler for this operation.

Returns
  DownloadWatcher object for monitoring download requests.

- (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.

Parameters

  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.

Returns
  DownloadWatcher object for monitoring download requests.

The documentation for this class was generated from the following file:

- CSDownloadService.h