2020-11-11 00:58:56 +01:00
|
|
|
//
|
|
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2020-11-11 06:30:54 +01:00
|
|
|
#import <SignalUtilitiesKit/OWSStorage.h>
|
2020-11-11 00:58:56 +01:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
@class YapDatabase;
|
|
|
|
|
|
|
|
@interface OWSStorage (Subclass)
|
|
|
|
|
|
|
|
@property (atomic, nullable, readonly) YapDatabase *database;
|
|
|
|
|
|
|
|
- (void)loadDatabase;
|
|
|
|
|
|
|
|
- (void)runSyncRegistrations;
|
|
|
|
// completion will be invoked _off_ the main thread.
|
|
|
|
- (void)runAsyncRegistrationsWithCompletion:(void (^_Nonnull)(void))completion;
|
|
|
|
|
|
|
|
- (BOOL)areAsyncRegistrationsComplete;
|
|
|
|
- (BOOL)areSyncRegistrationsComplete;
|
|
|
|
|
|
|
|
- (NSString *)databaseFilePath;
|
|
|
|
- (NSString *)databaseFilePath_SHM;
|
|
|
|
- (NSString *)databaseFilePath_WAL;
|
|
|
|
|
|
|
|
- (void)resetStorage;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|