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.
		
		
		
		
		
			
		
			
	
	
		
			106 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			106 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			C
		
	
| 
											9 years ago
										 | //
 | ||
| 
											7 years ago
										 | //  Copyright (c) 2019 Open Whisper Systems. All rights reserved.
 | ||
| 
											9 years ago
										 | //
 | ||
|  | 
 | ||
| 
											5 years ago
										 | #import <Foundation/Foundation.h>
 | ||
|  | 
 | ||
| 
											9 years ago
										 | NS_ASSUME_NONNULL_BEGIN | ||
|  | 
 | ||
| 
											9 years ago
										 | /**
 | ||
|  |  * The users privacy preference for what kind of content to show in lock screen notifications. | ||
|  |  */ | ||
| 
											9 years ago
										 | typedef NS_ENUM(NSUInteger, NotificationType) { | ||
|  |     NotificationNoNameNoPreview, | ||
|  |     NotificationNameNoPreview, | ||
|  |     NotificationNamePreview, | ||
|  | }; | ||
|  | 
 | ||
| 
											7 years ago
										 | NSString *NSStringForNotificationType(NotificationType value); | ||
|  | 
 | ||
| 
											9 years ago
										 | // Used when migrating logging to NSUserDefaults.
 | ||
| 
											8 years ago
										 | extern NSString *const OWSPreferencesSignalDatabaseCollection; | ||
|  | extern NSString *const OWSPreferencesKeyEnableDebugLog; | ||
| 
											8 years ago
										 | extern NSString *const OWSPreferencesCallLoggingDidChangeNotification; | ||
| 
											9 years ago
										 | 
 | ||
| 
											8 years ago
										 | @class YapDatabaseReadWriteTransaction; | ||
|  | 
 | ||
| 
											8 years ago
										 | @interface OWSPreferences : NSObject | ||
| 
											12 years ago
										 | 
 | ||
| 
											9 years ago
										 | #pragma mark - Helpers
 | ||
|  | 
 | ||
|  | - (nullable id)tryGetValueForKey:(NSString *)key; | ||
|  | - (void)setValueForKey:(NSString *)key toValue:(nullable id)value; | ||
| 
											10 years ago
										 | - (void)clear; | ||
| 
											12 years ago
										 | 
 | ||
| 
											9 years ago
										 | #pragma mark - Specific Preferences
 | ||
|  | 
 | ||
| 
											8 years ago
										 | + (BOOL)isReadyForAppExtensions; | ||
| 
											8 years ago
										 | + (void)setIsReadyForAppExtensions; | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | - (BOOL)hasSentAMessage; | ||
| 
											9 years ago
										 | - (void)setHasSentAMessage:(BOOL)enabled; | ||
|  | 
 | ||
| 
											8 years ago
										 | + (BOOL)isLoggingEnabled; | ||
|  | + (void)setIsLoggingEnabled:(BOOL)flag; | ||
| 
											9 years ago
										 | 
 | ||
|  | - (BOOL)screenSecurityIsEnabled; | ||
|  | - (void)setScreenSecurity:(BOOL)flag; | ||
|  | 
 | ||
|  | - (NotificationType)notificationPreviewType; | ||
|  | - (void)setNotificationPreviewType:(NotificationType)type; | ||
|  | - (NSString *)nameForNotificationPreviewType:(NotificationType)notificationType; | ||
|  | 
 | ||
|  | - (BOOL)soundInForeground; | ||
|  | - (void)setSoundInForeground:(BOOL)enabled; | ||
|  | 
 | ||
| 
											9 years ago
										 | - (BOOL)hasDeclinedNoContactsView; | ||
|  | - (void)setHasDeclinedNoContactsView:(BOOL)value; | ||
|  | 
 | ||
| 
											8 years ago
										 | - (void)setIOSUpgradeNagDate:(NSDate *)value; | ||
|  | - (nullable NSDate *)iOSUpgradeNagDate; | ||
| 
											9 years ago
										 | 
 | ||
| 
											8 years ago
										 | - (BOOL)hasGeneratedThumbnails; | ||
|  | - (void)setHasGeneratedThumbnails:(BOOL)value; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (BOOL)shouldShowUnidentifiedDeliveryIndicators; | ||
|  | - (void)setShouldShowUnidentifiedDeliveryIndicators:(BOOL)value; | ||
|  | 
 | ||
| 
											9 years ago
										 | #pragma mark Callkit
 | ||
|  | 
 | ||
| 
											8 years ago
										 | - (BOOL)isSystemCallLogEnabled; | ||
|  | - (void)setIsSystemCallLogEnabled:(BOOL)flag; | ||
|  | 
 | ||
|  | #pragma mark - Legacy CallKit settings
 | ||
|  | 
 | ||
| 
											8 years ago
										 | - (void)applyCallLoggingSettingsForLegacyUsersWithTransaction:(YapDatabaseReadWriteTransaction *)transaction; | ||
|  | 
 | ||
| 
											9 years ago
										 | - (BOOL)isCallKitEnabled; | ||
|  | - (void)setIsCallKitEnabled:(BOOL)flag; | ||
| 
											8 years ago
										 | 
 | ||
| 
											9 years ago
										 | // Returns YES IFF isCallKitEnabled has been set by user.
 | ||
|  | - (BOOL)isCallKitEnabledSet; | ||
|  | 
 | ||
| 
											9 years ago
										 | - (BOOL)isCallKitPrivacyEnabled; | ||
|  | - (void)setIsCallKitPrivacyEnabled:(BOOL)flag; | ||
| 
											9 years ago
										 | // Returns YES IFF isCallKitPrivacyEnabled has been set by user.
 | ||
|  | - (BOOL)isCallKitPrivacySet; | ||
| 
											9 years ago
										 | 
 | ||
| 
											9 years ago
										 | #pragma mark direct call connectivity (non-TURN)
 | ||
|  | 
 | ||
|  | - (BOOL)doCallsHideIPAddress; | ||
|  | - (void)setDoCallsHideIPAddress:(BOOL)flag; | ||
|  | 
 | ||
| 
											9 years ago
										 | #pragma mark - Push Tokens
 | ||
|  | 
 | ||
|  | - (void)setPushToken:(NSString *)value; | ||
|  | - (nullable NSString *)getPushToken; | ||
|  | 
 | ||
|  | - (void)setVoipToken:(NSString *)value; | ||
|  | - (nullable NSString *)getVoipToken; | ||
|  | 
 | ||
| 
											8 years ago
										 | - (void)unsetRecordedAPNSTokens; | ||
|  | 
 | ||
| 
											12 years ago
										 | @end | ||
| 
											9 years ago
										 | 
 | ||
|  | NS_ASSUME_NONNULL_END |