<AGSAttachmentManagerDelegate> Protocol Reference


Description

A protocol that must be adopted by any class wishing to be notified when operations performed by AGSAttachmentManager are completed. An instance of the class must then be set as the delegate of AGSAttachmentManager.

All methods of this protocol are optional.

Since:
2.0

List of all members.

Public Member Functions

(void) - attachmentManager:didDownloadAttachmentInfos:
(void) - attachmentManager:didDownloadDataForAttachment:
(void) - attachmentManager:didPostLocalEditsToServer:

Member Function Documentation

- (void) attachmentManager: (AGSAttachmentManager *)  attachmentManager
didDownloadAttachmentInfos: (NSArray *)  attachmentInfos 
[optional]

Tells the delegate that the operation for downloading metadata for all attachments belonging to the feature associated with the AGSAttachmentManager is complete.

When the operation completes, it is possible that an error may have been encountered. The delegate should always inspect the AGSAttachmentManager::downloadAttachmentInfosError property and handle the error appropriately.

If no error was encountered, then the metadata was retrieved successfully, and AGSAttachmentInfo objects containing the metadata are passed into this method. Also, the AGSAttachmentManager::attachments property is also populated with empty AGSAttachment objects containing only metadata.

Parameters:
attachmentManager that performed the operation
attachmentInfos representing the attachment metadata. It is an array of AGSAttachmentInfo objects.
Since:
2.0
- (void) attachmentManager: (AGSAttachmentManager *)  attachmentManager
didDownloadDataForAttachment: (AGSAttachment *)  attachment 
[optional]

Tells the delegate that the operation for downloading data for a particular attachment is complete.

When the operation completes, it is possible that an error may have been encountered. The delegate should always inspect the AGSAttachment::networkError property of the attachment and handle the error appropriately.

If no error was encountered, then the data was downloaded successfully, and you can invoke the data (AGSAttachment) method on the attachment object to get at the raw data.

Parameters:
attachmentManager that performed the operation
attachment containing the error or the raw data
Since:
2.0
- (void) attachmentManager: (AGSAttachmentManager *)  attachmentManager
didPostLocalEditsToServer: (NSArray *)  attachmentsPosted 
[optional]

Tells the delegate that the AGSAttachmentManager is done syncing local edits with the remote server.

If an error was encountered while posting the edits, the AGSAttachment::networkError or AGSAttachment::editResultError properties on individual attachment objects are set depending on whether a network error prevented the operation from succeeding, or if an underlying database error occurred on the server. A delegate should always inspect these properties and handle errors appropriately.

Parameters:
attachmentManager that performed the operation
attachmentsPosted representing the attachments that were to be synced with the server. It is an array of AGSAttachment objects.
Since:
2.0