mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			36 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Objective-C
		
	
| //
 | |
| //  Copyright (c) 2017 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| #import "TSAttachment.h"
 | |
| 
 | |
| NS_ASSUME_NONNULL_BEGIN
 | |
| 
 | |
| typedef NS_ENUM(NSUInteger, TSAttachmentPointerState) {
 | |
|     TSAttachmentPointerStateEnqueued = 0,
 | |
|     TSAttachmentPointerStateDownloading = 1,
 | |
|     TSAttachmentPointerStateFailed = 2,
 | |
| };
 | |
| 
 | |
| /**
 | |
|  * A TSAttachmentPointer is a yet-to-be-downloaded attachment.
 | |
|  */
 | |
| @interface TSAttachmentPointer : TSAttachment
 | |
| 
 | |
| - (instancetype)initWithServerId:(UInt64)serverId
 | |
|                              key:(NSData *)key
 | |
|                           digest:(nullable NSData *)digest
 | |
|                      contentType:(NSString *)contentType
 | |
|                            relay:(NSString *)relay NS_DESIGNATED_INITIALIZER;
 | |
| 
 | |
| @property (nonatomic, readonly) NSString *relay;
 | |
| @property (atomic) TSAttachmentPointerState state;
 | |
| 
 | |
| // Though now required, `digest` may be null for pre-existing records or from
 | |
| // messages received from other clients
 | |
| @property (nullable, nonatomic, readonly) NSData *digest;
 | |
| 
 | |
| @end
 | |
| 
 | |
| NS_ASSUME_NONNULL_END
 |