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.
21 lines
699 B
Swift
21 lines
699 B
Swift
4 years ago
|
|
||
|
@objc(SNConfiguration)
|
||
|
public final class Configuration : NSObject {
|
||
|
@objc public let owsPrimaryStorage: OWSPrimaryStorageProtocol
|
||
|
public let maxFileSize: UInt
|
||
|
|
||
|
@objc public static var shared: Configuration!
|
||
|
|
||
|
fileprivate init(owsPrimaryStorage: OWSPrimaryStorageProtocol, maxFileSize: UInt) {
|
||
|
self.owsPrimaryStorage = owsPrimaryStorage
|
||
|
self.maxFileSize = maxFileSize
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public enum SessionUtilitiesKit { // Just to make the external API nice
|
||
|
|
||
|
public static func configure(owsPrimaryStorage: OWSPrimaryStorageProtocol, maxFileSize: UInt) {
|
||
|
Configuration.shared = Configuration(owsPrimaryStorage: owsPrimaryStorage, maxFileSize: maxFileSize)
|
||
|
}
|
||
|
}
|