2017-01-12 21:37:37 +01:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2016-10-10 22:02:09 +02:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2016-11-12 18:22:29 +01:00
|
|
|
/**
|
|
|
|
* The users privacy preference for what kind of content to show in lock screen notifications.
|
|
|
|
*/
|
2016-10-10 22:02:09 +02:00
|
|
|
typedef NS_ENUM(NSUInteger, NotificationType) {
|
|
|
|
NotificationNoNameNoPreview,
|
|
|
|
NotificationNameNoPreview,
|
|
|
|
NotificationNamePreview,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSUInteger, TSImageQuality) {
|
|
|
|
TSImageQualityUncropped = 1,
|
|
|
|
TSImageQualityHigh = 2,
|
|
|
|
TSImageQualityMedium = 3,
|
|
|
|
TSImageQualityLow = 4
|
|
|
|
};
|
|
|
|
|
2017-01-24 01:48:14 +01:00
|
|
|
// Used when migrating logging to NSUserDefaults.
|
|
|
|
extern NSString *const PropertyListPreferencesSignalDatabaseCollection;
|
|
|
|
extern NSString *const PropertyListPreferencesKeyEnableDebugLog;
|
|
|
|
|
2014-07-30 08:05:36 +02:00
|
|
|
@interface PropertyListPreferences : NSObject
|
2014-05-06 19:41:08 +02:00
|
|
|
|
2016-10-10 22:02:09 +02:00
|
|
|
#pragma mark - Helpers
|
|
|
|
|
|
|
|
- (nullable id)tryGetValueForKey:(NSString *)key;
|
|
|
|
- (void)setValueForKey:(NSString *)key toValue:(nullable id)value;
|
2015-12-22 12:45:09 +01:00
|
|
|
- (void)clear;
|
2014-05-06 19:41:08 +02:00
|
|
|
|
2016-10-10 22:02:09 +02:00
|
|
|
#pragma mark - Specific Preferences
|
|
|
|
|
|
|
|
- (NSTimeInterval)getCachedOrDefaultDesiredBufferDepth;
|
|
|
|
- (void)setCachedDesiredBufferDepth:(double)value;
|
|
|
|
|
|
|
|
- (BOOL)getHasSentAMessage;
|
|
|
|
- (void)setHasSentAMessage:(BOOL)enabled;
|
|
|
|
|
|
|
|
- (BOOL)getHasArchivedAMessage;
|
|
|
|
- (void)setHasArchivedAMessage:(BOOL)enabled;
|
|
|
|
|
|
|
|
- (BOOL)loggingIsEnabled;
|
|
|
|
- (void)setLoggingEnabled:(BOOL)flag;
|
|
|
|
|
|
|
|
- (BOOL)screenSecurityIsEnabled;
|
|
|
|
- (void)setScreenSecurity:(BOOL)flag;
|
|
|
|
|
|
|
|
- (NotificationType)notificationPreviewType;
|
|
|
|
- (void)setNotificationPreviewType:(NotificationType)type;
|
|
|
|
- (NSString *)nameForNotificationPreviewType:(NotificationType)notificationType;
|
|
|
|
|
|
|
|
- (BOOL)soundInForeground;
|
|
|
|
- (void)setSoundInForeground:(BOOL)enabled;
|
|
|
|
|
|
|
|
- (BOOL)hasRegisteredVOIPPush;
|
|
|
|
- (void)setHasRegisteredVOIPPush:(BOOL)enabled;
|
|
|
|
|
|
|
|
- (TSImageQuality)imageUploadQuality;
|
|
|
|
|
|
|
|
- (nullable NSString *)lastRanVersion;
|
|
|
|
- (NSString *)setAndGetCurrentVersion;
|
|
|
|
|
2017-02-02 18:21:48 +01:00
|
|
|
#pragma mark - Calling
|
|
|
|
|
|
|
|
#pragma mark Callkit
|
|
|
|
|
|
|
|
- (BOOL)isCallKitEnabled;
|
|
|
|
- (void)setIsCallKitEnabled:(BOOL)flag;
|
|
|
|
|
2017-02-22 16:06:01 +01:00
|
|
|
#pragma mark direct call connectivity (non-TURN)
|
|
|
|
|
|
|
|
- (BOOL)doCallsHideIPAddress;
|
|
|
|
- (void)setDoCallsHideIPAddress:(BOOL)flag;
|
|
|
|
|
2016-11-08 19:08:04 +01:00
|
|
|
#pragma mark - Block on Identity Change
|
|
|
|
|
|
|
|
- (BOOL)shouldBlockOnIdentityChange;
|
|
|
|
- (void)setShouldBlockOnIdentityChange:(BOOL)value;
|
|
|
|
|
2016-10-10 22:02:09 +02:00
|
|
|
#pragma mark - Push Tokens
|
|
|
|
|
|
|
|
- (void)setPushToken:(NSString *)value;
|
|
|
|
- (nullable NSString *)getPushToken;
|
|
|
|
|
|
|
|
- (void)setVoipToken:(NSString *)value;
|
|
|
|
- (nullable NSString *)getVoipToken;
|
|
|
|
|
2014-05-06 19:41:08 +02:00
|
|
|
@end
|
2016-10-10 22:02:09 +02:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|