Avaya Client Services API Reference (iOS)

- Main Page
- Classes
- Files
- Related Pages

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

Instance Methods | Properties | List of all members
CSMessagingAttachment Class Reference

Attachment class is representing a message optional parameter. More...

`#import <CSMessagingAttachment.h>`

Inherits NSObject.

## Instance Methods
(NSString *) | - consume
| Returns the location of the attachment so that it can be opened by the application. More...
(void) | - setName:completionHandler:
| Sets the attachment name. More...
(void) | - setIsThumbnail:completionHandler:
| Sets the thumbnail property. More...
(void) | - setIsGeneratedContent:completionHandler:
| Sets the generatedContent property. More...
(void) | - setLocation:completionHandler:
| Sets the attachment location. More...
(void) | - setMimeType:completionHandler:
| Sets the attachment MIME type. More...
(CSMessagingAsynchDataRetrieval *) | - download:completionHandler:
| Starts the download of the attachment asynchronously. More...

## Properties
id< CSMessagingAttachmentDelegate > | delegate
| The delegate responsible for handling messaging attachment events. More...
NSString * | attachmentId
| The unique ID of the attachment. More...
NSString * | messageId
| The ID of the message that the attachment is associated with. More...
NSString * | name
| The name of attachment. More...
NSString * | mimeType
| The MIME type of attachment. More...
BOOL | thumbnail
| A Boolean value indicating whether the attachment is a thumbnail. More...
NSUInteger | duration
| Duration of video or audio attachment represented in seconds. More...
CSLimitsSizeType | size
| The size of the attachment in bytes. More...
NSString * | location
| The location of the attachment. More...
CSMessagingAttachmentStatus | status
| The status of the attachment. More...
BOOL | generatedContent
| Indicates whether the attachment was generated by client application or provided by user. More...
NSString * | locationForConsumption
| Returns the location of the attachment so that it can be opened by the application. More...
CSCapability * | updateNameCapability
| A CSCapability object that indicates if the attachment's name property can be changed. More...
CSCapability * | updateIsThumbnailCapability
| A CSCapability object that indicates if the attachment's thumbnail property can be changed. More...
CSCapability * | updateIsGeneratedContentCapability
| A CSCapability object that indicates if the attachment's "generated content" property can be changed. More...
CSCapability * | updateLocationCapability
| A CSCapability object that indicates if the attachment's location property can be changed. More...
CSCapability * | updateMimeTypeCapability
| A CSCapability object that indicates if the attachment's MIME type property can be changed. More...
CSCapability * | downloadCapability
| A CSCapability object that indicates if the attachment can be downloaded. More...
CSCapability * | consumeCapability
| A CSCapability object that indicates if the attachment can be consumed. More...
CSCapability * | removeCapability
| Returns a CSCapability object that indicates if the attachment can be removed. More...

## Detailed Description

Attachment class is representing a message optional parameter.

It can contain any file uploaded by sending participant.

If user is sending a picture, the client application is responsible for creating a thumbnail picture and setting proper object parameters. In the case of any other attachment type, a preview is not needed. An attachment can be removed, if parent message hasn't been sent yet.

## Method Documentation

- (NSString *) consume |  |  |

Returns the location of the attachment so that it can be opened by the application.

This method has the additional effect of changing the status of the attachment to Opened.

Returns
  Location of attachment or nil if location is not avaliable.

- (CSMessagingAsynchDataRetrieval *) download: |  | (NSString *) | path
completionHandler: |  | (CSMessagingCompletionHandler) | handler

Starts the download of the attachment asynchronously.

Parameters

  path | path to download attachment.
  handler | The completion handler for this operation.

Returns
  A CSMessagingAsynchDataRetrieval object.

See also
  downloadCapability

- (void) setIsGeneratedContent: |  | (BOOL) | isGeneratedContent
completionHandler: |  | (CSMessagingCompletionHandler) | handler

Sets the generatedContent property.

Parameters

  isGeneratedContent | new value of isGeneratedContent property.
  handler | The completion handler for this operation.

- (void) setIsThumbnail: |  | (BOOL) | isThumbnail
completionHandler: |  | (CSMessagingCompletionHandler) | handler

Sets the thumbnail property.

Parameters

  isThumbnail | new value of isThumbnail property.
  handler | The completion handler for this operation.

- (void) setLocation: |  | (NSString *) | location
completionHandler: |  | (CSMessagingCompletionHandler) | handler

Sets the attachment location.

Parameters

  location | attachment location.
  handler | The completion handler for this operation.

- (void) setMimeType: |  | (NSString *) | mimeType
completionHandler: |  | (CSMessagingCompletionHandler) | handler

Sets the attachment MIME type.

Parameters

  mimeType | attachment MIME type.
  handler | The completion handler for this operation.

- (void) setName: |  | (NSString *) | name
completionHandler: |  | (CSMessagingCompletionHandler) | handler

Sets the attachment name.

Parameters

  name | attachment name.
  handler | The completion handler for this operation.

## Property Documentation

- (NSString*) attachmentId
| readnonatomicassign

The unique ID of the attachment.

- (CSCapability*) consumeCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment can be consumed.

This capability is Allowed when the attachment is in either the downloaded or consumed state.

See also
  - download:completionHandler:

- (id<CSMessagingAttachmentDelegate>) delegate
| readwritenonatomicweak

The delegate responsible for handling messaging attachment events.

- (CSCapability*) downloadCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment can be downloaded.

This capability is Allowed when all of the following conditions are true:

- The messaging service is online (has an active connection to the server).
- The attachment is in the "ready to download" state.

See also
  - download:completionHandler:

- (NSUInteger) duration
| readnonatomicassign

Duration of video or audio attachment represented in seconds.

- (BOOL) generatedContent
| readnonatomicassign

Indicates whether the attachment was generated by client application or provided by user.

See also
  - setIsGeneratedContent:completionHandler:
  updateIsGeneratedContentCapability

- (NSString*) location
| readnonatomicassign

The location of the attachment.

See also
  - setLocation:completionHandler:
  updateLocationCapability

- (NSString*) locationForConsumption
| readnonatomicassign

Returns the location of the attachment so that it can be opened by the application.

This property has the additional effect of changing the status of the attachment to Opened.

Returns
  Location of attachment or nil if location is not avaliable.

Deprecated:
  THIS SELECTOR WILL BE REMOVED IN RELEASE VERSION 3.3. Use the consume method instead.

- (NSString*) messageId
| readnonatomicassign

The ID of the message that the attachment is associated with.

See also
  CSMessage::messageId

- (NSString*) mimeType
| readnonatomicassign

The MIME type of attachment.

See also
  - setMimeType:completionHandler:
  updateMimeTypeCapability

- (NSString*) name
| readnonatomicassign

The name of attachment.

See also
  - setName:completionHandler:
  updateNameCapability

- (CSCapability*) removeCapability
| readnonatomicassign

Returns a CSCapability object that indicates if the attachment can be removed.

This capability is Allowed when the attachment is in a draft or error state.

See also
  - removeAttachment:completionHandler: (CSMessage)

- (CSLimitsSizeType) size
| readnonatomicassign

The size of the attachment in bytes.

- (CSMessagingAttachmentStatus) status
| readnonatomicassign

The status of the attachment.

- (BOOL) thumbnail
| readnonatomicassign

A Boolean value indicating whether the attachment is a thumbnail.

See also
  - setIsThumbnail:completionHandler:
  updateIsThumbnailCapability

- (CSCapability*) updateIsGeneratedContentCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment's "generated content" property can be changed.

This capability is Allowed when the attachment is in a draft or error state.

See also
  - setIsGeneratedContent:completionHandler:

- (CSCapability*) updateIsThumbnailCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment's thumbnail property can be changed.

This capability is Allowed when the Attachment is in a draft or error state.

See also
  - setIsThumbnail:completionHandler:

- (CSCapability*) updateLocationCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment's location property can be changed.

This capability is Allowed when the attachment is in a draft or error state.

See also
  - setLocation:completionHandler:

- (CSCapability*) updateMimeTypeCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment's MIME type property can be changed.

This capability is Allowed when the attachment is in a draft or error state.

See also
  - setMimeType:completionHandler:

- (CSCapability*) updateNameCapability
| readnonatomicassign

A CSCapability object that indicates if the attachment's name property can be changed.

This capability is Allowed when the Attachment is in a draft or error state.

See also
  - setName:completionHandler:

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

- CSMessagingAttachment.h