// // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @class YapDatabaseExtension; @interface OWSStorage : NSObject - (instancetype)init NS_UNAVAILABLE; - (instancetype)initStorage NS_DESIGNATED_INITIALIZER; - (void)setSyncRegistrationsAreComplete; + (void)resetAllStorage; // TODO: Deprecate? - (nullable YapDatabaseConnection *)newDatabaseConnection; - (BOOL)registerExtension:(YapDatabaseExtension *)extension withName:(NSString *)extensionName; - (void)asyncRegisterExtension:(YapDatabaseExtension *)extension withName:(NSString *)extensionName completionBlock:(nullable void (^)(BOOL ready))completionBlock; - (nullable id)registeredExtension:(NSString *)extensionName; - (void)resetStorage; #pragma mark - Password /** * Returns NO if: * * - Keychain is locked because device has just been restarted. * - Password could not be retrieved because of a keychain error. */ + (BOOL)isDatabasePasswordAccessible; @end NS_ASSUME_NONNULL_END