session-ios/SignalMessaging/utils/OWSDatabaseConverter.h
2018-01-25 11:00:38 -05:00

21 lines
571 B
Objective-C

//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
// Used to convert YapDatabase/SQLCipher databases whose header is encrypted
// to databases whose first 32 bytes are unencrypted so that iOS can determine
// that this is a SQLite database using WAL and therefore not terminate the app
// when it is suspended.
@interface OWSDatabaseConverter : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (void)convertDatabaseIfNecessary;
+ (void)convertDatabaseIfNecessary:(NSString *)databaseFilePath;
@end
NS_ASSUME_NONNULL_END