AGSAttachment Class Reference


Description

Instances of this class represent an attachment on the client. This is used with the AGSAttachmentManager. This class automatically saves the attachment data to a temporary file and pulls the data out from that temporary file when needed. Thus, it does not store actual attachment data in memory. The temporary file is cleaned up when the AGSAttachmentManager that is managing this attachment is cleared.

Since:
2.0

List of all members.

Public Member Functions

(NSData *) - data
(BOOL) - existsOnServer
(BOOL) - isLocal
(void) - markForDeletion:
(UIImage *) - thumbnail

Properties

AGSAttachmentInfoattachmentInfo
AGSEditResultErroreditResultError
AGSAttachmentEditState editState
NSString * filepath
BOOL isDownloading
NSError * networkError

Member Function Documentation

- (NSData*) data  

If the attachment data has been downloaded, it will be saved to a temporary file. This method pulls the actual NSData from that file and returns it to the caller.

Since:
2.0
- (BOOL) existsOnServer  

Indicates whether the feature exists on the server or if it is only on the client at this point.

Since:
2.0
- (BOOL) isLocal  

Indicates whether the actual attachment data has been downloaded yet.

Since:
2.0
- (void) markForDeletion: (BOOL)  del  

Marks the attachment for deletion. The attachment will not actually be deleted until the edits are synced with the server.

Since:
2.0
- (UIImage*) thumbnail  

Returns a thumbnail image the attachment. Only works with some types of attachments - mainly images and videos.

Since:
2.0

Property Documentation

- (AGSAttachmentInfo*) attachmentInfo [read, retain]

The attachment metadata associated with this attachment.

Since:
2.0
- (AGSEditResultError*) editResultError [read, retain]

Error that occurred, if any, when the local edits were synced with the server for this attachment.

Since:
2.0
- (AGSAttachmentEditState) editState [read, assign]

The edit state of this particular attachment.

Since:
2.0
- (NSString*) filepath [read, retain]

The path to the temporary file that has been downloaded or saved. This will be nil if the attachment data has not been downloaded yet.

Since:
2.0
- (BOOL) isDownloading [read, assign]

Indicates whether or not the data for this this attachment is currently downloading.

Since:
2.0
- (NSError*) networkError [read, retain]

Network error that occurred, if any, when the attachment manager attempted to download data for this attachment or post edits for this attachment.

Since:
2.0