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.
43 lines
1.3 KiB
C
43 lines
1.3 KiB
C
9 years ago
|
//
|
||
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||
|
//
|
||
9 years ago
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
|
@class TSStorageManager;
|
||
|
@class TSMessage;
|
||
|
@class TSThread;
|
||
9 years ago
|
@protocol ContactsManagerProtocol;
|
||
9 years ago
|
|
||
|
@interface OWSDisappearingMessagesJob : NSObject
|
||
|
|
||
9 years ago
|
+ (instancetype)sharedJob;
|
||
9 years ago
|
|
||
9 years ago
|
- (instancetype)init NS_UNAVAILABLE;
|
||
9 years ago
|
|
||
9 years ago
|
+ (void)setExpirationsForThread:(TSThread *)thread;
|
||
|
+ (void)setExpirationForMessage:(TSMessage *)message;
|
||
|
+ (void)setExpirationForMessage:(TSMessage *)message expirationStartedAt:(uint64_t)expirationStartedAt;
|
||
9 years ago
|
|
||
|
/**
|
||
|
* Synchronize our disappearing messages settings with that of the given message. Useful so we can
|
||
|
* become eventually consistent with remote senders.
|
||
|
*
|
||
|
* @param message
|
||
|
* Can be an expiring or non expiring message. We match the expiration timer of the message, including disabling
|
||
|
* expiring messages if the message is not an expiring message.
|
||
|
*
|
||
|
* @param contactsManager
|
||
|
* Provides the contact name responsible for any configuration changes in an info message.
|
||
|
*/
|
||
9 years ago
|
+ (void)becomeConsistentWithConfigurationForMessage:(TSMessage *)message
|
||
9 years ago
|
contactsManager:(id<ContactsManagerProtocol>)contactsManager;
|
||
|
|
||
9 years ago
|
// Clean up any messages that expired since last launch immediately
|
||
|
// and continue cleaning in the background.
|
||
|
- (void)startIfNecessary;
|
||
|
|
||
9 years ago
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|