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.
		
		
		
		
		
			
		
			
	
	
		
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
| 
								 
											5 years ago
										 
									 | 
							
								//
							 | 
						||
| 
								 | 
							
								//  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
							 | 
						||
| 
								 | 
							
								//
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#import <UIKit/UIKit.h>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#import <SessionUtilitiesKit/TSYapDatabaseObject.h>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								NS_ASSUME_NONNULL_BEGIN
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								typedef NS_ENUM(NSInteger, GroupType) {
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								    closedGroup = 0,
							 | 
						||
| 
								 | 
							
								    openGroup = 1,
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								extern const int32_t kGroupIdLength;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@interface TSGroupModel : TSYapDatabaseObject
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@property (nonatomic) NSArray<NSString *> *groupMemberIds;
							 | 
						||
| 
								 | 
							
								@property (nonatomic) NSArray<NSString *> *groupAdminIds;
							 | 
						||
| 
								 | 
							
								@property (nullable, readonly, nonatomic) NSString *groupName;
							 | 
						||
| 
								 | 
							
								@property (readonly, nonatomic) NSData *groupId;
							 | 
						||
| 
								 | 
							
								@property (nonatomic) GroupType groupType;
							 | 
						||
| 
								 | 
							
								@property (nonatomic) NSMutableSet<NSString *> *removedMembers;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#if TARGET_OS_IOS
							 | 
						||
| 
								 | 
							
								@property (nullable, nonatomic, strong) UIImage *groupImage;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								- (instancetype)initWithTitle:(nullable NSString *)title
							 | 
						||
| 
								 | 
							
								                    memberIds:(NSArray<NSString *> *)memberIds
							 | 
						||
| 
								 | 
							
								                        image:(nullable UIImage *)image
							 | 
						||
| 
								 | 
							
								                      groupId:(NSData *)groupId
							 | 
						||
| 
								 | 
							
								                    groupType:(GroupType)groupType
							 | 
						||
| 
								 | 
							
								                     adminIds:(NSArray<NSString *> *)adminIds;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								- (BOOL)isEqual:(id)other;
							 | 
						||
| 
								 | 
							
								- (BOOL)isEqualToGroupModel:(TSGroupModel *)model;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								- (NSString *)getInfoStringAboutUpdateTo:(TSGroupModel *)model;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								- (void)updateGroupId: (NSData *)newGroupId;
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@end
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								NS_ASSUME_NONNULL_END
							 |