session-ios/src/Account/TSPreKeyManager.h
Michael Kirk 47cad611e5 Fix register w/o background fetch & stale push tokens
* Separate account registration from push token registration
* Provide better errors when validation fails (e.g. numbers don't match, numbers blank)
* More logging during registration
* Call success after setting phone number to avoid any future race condition

  This isn't currently causing problems, but it's unexpected that we'd
  mutate the state *after* calling a callback which might inuitively rely
  on that state.

* Don't throw exception off thread when device keys 404's
* Better async startup handling
  - move processing off main thread
  - reduce code duplication
  - don't wrap it in a transaction in the future case where we want to
    further access the DB

// FREEBIE
2016-11-03 16:10:06 -04:00

22 lines
523 B
Objective-C

//
// TSPrekeyManager.h
// TextSecureKit
//
// Created by Frederic Jacobs on 07/11/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSAccountManager.h"
// Time before deletion of signed PreKeys (measured in seconds)
#define SignedPreKeysDeletionTime 14 * 24 * 60 * 60
@interface TSPreKeyManager : NSObject
+ (void)registerPreKeysWithSuccess:(void (^)())successHandler failure:(void (^)(NSError *error))failureHandler;
+ (void)refreshPreKeys;
@end