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.
		
		
		
		
		
			
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Objective-C
		
	
| //
 | |
| //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| #import "SessionRecord.h"
 | |
| #import <Foundation/Foundation.h>
 | |
| 
 | |
| NS_ASSUME_NONNULL_BEGIN
 | |
| 
 | |
| // See a discussion of the protocolContext in SessionCipher.h.
 | |
| @protocol SessionStore <NSObject>
 | |
| 
 | |
| /**
 | |
|  *  Returns a copy of the SessionRecord corresponding to the recipientId + deviceId tuple or a new SessionRecord if one does not currently exist.
 | |
|  *
 | |
|  *  @param contactIdentifier The recipientId of the remote client.
 | |
|  *  @param deviceId          The deviceId of the remote client.
 | |
|  *
 | |
|  *  @return a copy of the SessionRecord corresponding to the recipientId + deviceId tuple.
 | |
|  */
 | |
| - (SessionRecord *)loadSession:(NSString *)contactIdentifier
 | |
|                       deviceId:(int)deviceId
 | |
|                protocolContext:(nullable id)protocolContext;
 | |
| 
 | |
| - (NSArray *)subDevicesSessions:(NSString *)contactIdentifier protocolContext:(nullable id)protocolContext __attribute__((deprecated));
 | |
| 
 | |
| - (void)storeSession:(NSString *)contactIdentifier
 | |
|             deviceId:(int)deviceId
 | |
|              session:(SessionRecord *)session
 | |
|      protocolContext:(nullable id)protocolContext;
 | |
| 
 | |
| - (BOOL)containsSession:(NSString *)contactIdentifier
 | |
|                deviceId:(int)deviceId
 | |
|         protocolContext:(nullable id)protocolContext;
 | |
| 
 | |
| - (void)deleteSessionForContact:(NSString *)contactIdentifier
 | |
|                        deviceId:(int)deviceId
 | |
|                 protocolContext:(nullable id)protocolContext;
 | |
| 
 | |
| - (void)deleteAllSessionsForContact:(NSString *)contactIdentifier protocolContext:(nullable id)protocolContext;
 | |
| 
 | |
| - (void)archiveAllSessionsForContact:(NSString *)contactIdentifier protocolContext:(nullable id)protocolContext;
 | |
| 
 | |
| @end
 | |
| 
 | |
| NS_ASSUME_NONNULL_END
 |