00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #import <Foundation/Foundation.h>
00020
00026 typedef enum {
00027 AGSAttachmentEditStateOriginal = 0,
00028 AGSAttachmentEditStateAdded,
00029 AGSAttachmentEditStateMarkedForDeletion,
00030 AGSAttachmentEditStateDeletedFromServer
00031 } AGSAttachmentEditState;
00032
00033
00043 @interface AGSAttachment : NSObject {
00044 @private
00045 AGSAttachmentInfo *_attachmentInfo;
00046 NSString *_filepath;
00047 AGSAttachmentEditState _editState;
00048 AGSEditResultError *_editResultError;
00049 NSError *_networkError;
00050 BOOL _isDownloading;
00051 }
00052
00056 @property (nonatomic, retain, readonly) AGSAttachmentInfo *attachmentInfo;
00057
00062 @property (nonatomic, retain, readonly) NSString *filepath;
00063
00067 @property (nonatomic, assign, readonly) AGSAttachmentEditState editState;
00068
00073 @property (nonatomic, retain, readonly) AGSEditResultError *editResultError;
00074
00079 @property (nonatomic, retain, readonly) NSError *networkError;
00080
00084 @property (nonatomic, assign, readonly) BOOL isDownloading;
00085
00090 -(void)markForDeletion:(BOOL)del;
00091
00095 -(BOOL)existsOnServer;
00096
00100 -(BOOL)isLocal;
00101
00105 -(UIImage*)thumbnail;
00106
00111 -(NSData*)data;
00112
00113 @end