2020-11-20 04:04:56 +01:00
|
|
|
|
2020-12-02 06:25:16 +01:00
|
|
|
@objc
|
|
|
|
public final class SNUtilitiesKitConfiguration : NSObject {
|
2020-11-20 04:04:56 +01:00
|
|
|
@objc public let owsPrimaryStorage: OWSPrimaryStorageProtocol
|
|
|
|
public let maxFileSize: UInt
|
|
|
|
|
2020-12-02 06:25:16 +01:00
|
|
|
@objc public static var shared: SNUtilitiesKitConfiguration!
|
2020-11-20 04:04:56 +01:00
|
|
|
|
|
|
|
fileprivate init(owsPrimaryStorage: OWSPrimaryStorageProtocol, maxFileSize: UInt) {
|
|
|
|
self.owsPrimaryStorage = owsPrimaryStorage
|
|
|
|
self.maxFileSize = maxFileSize
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-02 06:25:16 +01:00
|
|
|
public enum SNUtilitiesKit { // Just to make the external API nice
|
2020-11-20 04:04:56 +01:00
|
|
|
|
|
|
|
public static func configure(owsPrimaryStorage: OWSPrimaryStorageProtocol, maxFileSize: UInt) {
|
2020-12-02 06:25:16 +01:00
|
|
|
SNUtilitiesKitConfiguration.shared = SNUtilitiesKitConfiguration(owsPrimaryStorage: owsPrimaryStorage, maxFileSize: maxFileSize)
|
2020-11-20 04:04:56 +01:00
|
|
|
}
|
|
|
|
}
|