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.
35 lines
1.1 KiB
Objective-C
35 lines
1.1 KiB
Objective-C
//
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import "TSYapDatabaseObject.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
#define OWSDisappearingMessagesConfigurationDefaultExpirationDuration kDayInterval
|
|
|
|
@class YapDatabaseReadTransaction;
|
|
|
|
@interface OWSDisappearingMessagesConfiguration : TSYapDatabaseObject
|
|
|
|
- (instancetype)initDefaultWithThreadId:(NSString *)threadId;
|
|
|
|
- (instancetype)initWithThreadId:(NSString *)threadId enabled:(BOOL)isEnabled durationSeconds:(uint32_t)seconds;
|
|
|
|
@property (nonatomic, getter=isEnabled) BOOL enabled;
|
|
@property (nonatomic) uint32_t durationSeconds;
|
|
@property (nonatomic, readonly) NSUInteger durationIndex;
|
|
@property (nonatomic, readonly) NSString *durationString;
|
|
@property (nonatomic, readonly) BOOL dictionaryValueDidChange;
|
|
@property (readonly, getter=isNewRecord) BOOL newRecord;
|
|
|
|
+ (instancetype)fetchOrBuildDefaultWithThreadId:(NSString *)threadId
|
|
transaction:(YapDatabaseReadTransaction *)transaction;
|
|
|
|
+ (NSArray<NSNumber *> *)validDurationsSeconds;
|
|
+ (uint32_t)maxDurationSeconds;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|