mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
183f0f1ccd
// FREEBIE
32 lines
964 B
Objective-C
32 lines
964 B
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import "TSAccountManager.h"
|
|
|
|
typedef NS_ENUM(NSInteger, RefreshPreKeysMode) {
|
|
// Refresh the signed prekey AND the one-time prekeys.
|
|
RefreshPreKeysMode_SignedAndOneTime,
|
|
// Only refresh the signed prekey, which should happen around every 48 hours.
|
|
//
|
|
// Most users will refresh their signed prekeys much more often than their
|
|
// one-time prekeys, so we use a "signed only" mode to avoid updating the
|
|
// one-time keys in this case.
|
|
//
|
|
// We do not need a "one-time only" mode.
|
|
RefreshPreKeysMode_SignedOnly,
|
|
};
|
|
|
|
@interface TSPreKeyManager : NSObject
|
|
|
|
+ (BOOL)isAppLockedDueToPreKeyUpdateFailures;
|
|
|
|
+ (void)registerPreKeysWithMode:(RefreshPreKeysMode)mode
|
|
success:(void (^)())successHandler
|
|
failure:(void (^)(NSError *error))failureHandler;
|
|
|
|
+ (void)checkPreKeys;
|
|
|
|
+ (void)checkPreKeysIfNecessary;
|
|
|
|
@end
|