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.
		
		
		
		
		
			
		
			
	
	
		
			48 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			48 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
| 
											5 years ago
										 | //
 | ||
|  | //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | ||
|  | //
 | ||
|  | 
 | ||
| 
											5 years ago
										 | #import <SessionUtilitiesKit/TSYapDatabaseObject.h>
 | ||
| 
											5 years ago
										 | 
 | ||
|  | NS_ASSUME_NONNULL_BEGIN | ||
|  | 
 | ||
|  | typedef NS_ENUM(NSUInteger, OWSVerificationState) { | ||
|  |     OWSVerificationStateDefault, | ||
|  |     OWSVerificationStateVerified, | ||
|  |     OWSVerificationStateNoLongerVerified, | ||
|  | }; | ||
|  | 
 | ||
| 
											5 years ago
										 | @class SNProtoVerified; | ||
| 
											5 years ago
										 | 
 | ||
|  | NSString *OWSVerificationStateToString(OWSVerificationState verificationState); | ||
|  | 
 | ||
|  | @interface OWSRecipientIdentity : TSYapDatabaseObject | ||
|  | 
 | ||
|  | @property (nonatomic, readonly) NSString *recipientId; | ||
|  | @property (nonatomic, readonly) NSData *identityKey; | ||
|  | @property (nonatomic, readonly) NSDate *createdAt; | ||
|  | @property (nonatomic, readonly) BOOL isFirstKnownKey; | ||
|  | 
 | ||
|  | #pragma mark - Verification State
 | ||
|  | 
 | ||
|  | @property (atomic, readonly) OWSVerificationState verificationState; | ||
|  | 
 | ||
|  | - (void)updateWithVerificationState:(OWSVerificationState)verificationState | ||
|  |                         transaction:(YapDatabaseReadWriteTransaction *)transaction; | ||
|  | 
 | ||
|  | #pragma mark - Initializers
 | ||
|  | 
 | ||
|  | - (instancetype)initWithUniqueId:(NSString *_Nullable)uniqueId NS_UNAVAILABLE; | ||
|  | 
 | ||
|  | - (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; | ||
|  | 
 | ||
|  | - (instancetype)initWithRecipientId:(NSString *)recipientId | ||
|  |                         identityKey:(NSData *)identityKey | ||
|  |                     isFirstKnownKey:(BOOL)isFirstKnownKey | ||
|  |                           createdAt:(NSDate *)createdAt | ||
|  |                   verificationState:(OWSVerificationState)verificationState NS_DESIGNATED_INITIALIZER; | ||
|  | 
 | ||
|  | @end | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_END |