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
8 years ago
|
//
|
||
6 years ago
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||
8 years ago
|
//
|
||
|
|
||
4 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,
|
||
|
};
|
||
|
|
||
6 years ago
|
NSString *NSStringForNotificationType(NotificationType value);
|
||
|
|
||
8 years ago
|
// Used when migrating logging to NSUserDefaults.
|
||
8 years ago
|
extern NSString *const OWSPreferencesSignalDatabaseCollection;
|
||
|
extern NSString *const OWSPreferencesKeyEnableDebugLog;
|
||
7 years ago
|
extern NSString *const OWSPreferencesCallLoggingDidChangeNotification;
|
||
8 years ago
|
|
||
7 years ago
|
@class YapDatabaseReadWriteTransaction;
|
||
|
|
||
8 years ago
|
@interface OWSPreferences : NSObject
|
||
11 years ago
|
|
||
9 years ago
|
#pragma mark - Helpers
|
||
|
|
||
|
- (nullable id)tryGetValueForKey:(NSString *)key;
|
||
|
- (void)setValueForKey:(NSString *)key toValue:(nullable id)value;
|
||
9 years ago
|
- (void)clear;
|
||
11 years ago
|
|
||
9 years ago
|
#pragma mark - Specific Preferences
|
||
|
|
||
8 years ago
|
+ (BOOL)isReadyForAppExtensions;
|
||
7 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;
|
||
|
|
||
8 years ago
|
- (BOOL)hasDeclinedNoContactsView;
|
||
|
- (void)setHasDeclinedNoContactsView:(BOOL)value;
|
||
|
|
||
7 years ago
|
- (void)setIOSUpgradeNagDate:(NSDate *)value;
|
||
|
- (nullable NSDate *)iOSUpgradeNagDate;
|
||
8 years ago
|
|
||
7 years ago
|
- (BOOL)hasGeneratedThumbnails;
|
||
|
- (void)setHasGeneratedThumbnails:(BOOL)value;
|
||
|
|
||
7 years ago
|
- (BOOL)shouldShowUnidentifiedDeliveryIndicators;
|
||
|
- (void)setShouldShowUnidentifiedDeliveryIndicators:(BOOL)value;
|
||
|
|
||
8 years ago
|
#pragma mark Callkit
|
||
|
|
||
7 years ago
|
- (BOOL)isSystemCallLogEnabled;
|
||
|
- (void)setIsSystemCallLogEnabled:(BOOL)flag;
|
||
|
|
||
|
#pragma mark - Legacy CallKit settings
|
||
|
|
||
7 years ago
|
- (void)applyCallLoggingSettingsForLegacyUsersWithTransaction:(YapDatabaseReadWriteTransaction *)transaction;
|
||
|
|
||
8 years ago
|
- (BOOL)isCallKitEnabled;
|
||
|
- (void)setIsCallKitEnabled:(BOOL)flag;
|
||
7 years ago
|
|
||
8 years ago
|
// Returns YES IFF isCallKitEnabled has been set by user.
|
||
|
- (BOOL)isCallKitEnabledSet;
|
||
|
|
||
8 years ago
|
- (BOOL)isCallKitPrivacyEnabled;
|
||
|
- (void)setIsCallKitPrivacyEnabled:(BOOL)flag;
|
||
8 years ago
|
// Returns YES IFF isCallKitPrivacyEnabled has been set by user.
|
||
|
- (BOOL)isCallKitPrivacySet;
|
||
8 years ago
|
|
||
8 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;
|
||
|
|
||
11 years ago
|
@end
|
||
9 years ago
|
|
||
|
NS_ASSUME_NONNULL_END
|