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.
32 lines
1.0 KiB
Swift
32 lines
1.0 KiB
Swift
|
|
@objc
|
|
public final class SNUtilitiesKitConfiguration : NSObject {
|
|
@objc public let owsPrimaryStorage: OWSPrimaryStorageProtocol
|
|
public let maxFileSize: UInt
|
|
|
|
@objc public static var shared: SNUtilitiesKitConfiguration!
|
|
|
|
fileprivate init(owsPrimaryStorage: OWSPrimaryStorageProtocol, maxFileSize: UInt) {
|
|
self.owsPrimaryStorage = owsPrimaryStorage
|
|
self.maxFileSize = maxFileSize
|
|
}
|
|
}
|
|
|
|
public enum SNUtilitiesKit { // Just to make the external API nice
|
|
public static func migrations() -> TargetMigrations {
|
|
return TargetMigrations(
|
|
identifier: .utilitiesKit,
|
|
migrations: [
|
|
[
|
|
_001_InitialSetupMigration.self,
|
|
_002_YDBToGRDBMigration.self
|
|
]
|
|
]
|
|
)
|
|
}
|
|
|
|
public static func configure(owsPrimaryStorage: OWSPrimaryStorageProtocol, maxFileSize: UInt) {
|
|
SNUtilitiesKitConfiguration.shared = SNUtilitiesKitConfiguration(owsPrimaryStorage: owsPrimaryStorage, maxFileSize: maxFileSize)
|
|
}
|
|
}
|