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.
33 lines
964 B
C
33 lines
964 B
C
10 years ago
|
//
|
||
9 years ago
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||
10 years ago
|
//
|
||
|
|
||
|
#import "TSAccountManager.h"
|
||
|
|
||
9 years ago
|
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,
|
||
|
};
|
||
10 years ago
|
|
||
|
@interface TSPreKeyManager : NSObject
|
||
|
|
||
9 years ago
|
+ (BOOL)isAppLockedDueToPreKeyUpdateFailures;
|
||
|
|
||
9 years ago
|
+ (void)registerPreKeysWithMode:(RefreshPreKeysMode)mode
|
||
|
success:(void (^)())successHandler
|
||
|
failure:(void (^)(NSError *error))failureHandler;
|
||
10 years ago
|
|
||
9 years ago
|
+ (void)checkPreKeys;
|
||
10 years ago
|
|
||
9 years ago
|
+ (void)checkPreKeysIfNecessary;
|
||
|
|
||
10 years ago
|
@end
|