session-ios/SessionProtocolKit/Configuration.swift

15 lines
579 B
Swift
Raw Normal View History

2020-11-05 07:04:39 +01:00
2020-12-02 06:25:16 +01:00
public struct SNProtocolKitConfiguration {
2020-11-05 07:04:39 +01:00
public let storage: SessionProtocolKitStorageProtocol
public let sharedSenderKeysDelegate: SharedSenderKeysDelegate
2020-12-02 06:25:16 +01:00
internal static var shared: SNProtocolKitConfiguration!
2020-11-05 07:04:39 +01:00
}
2020-12-02 06:25:16 +01:00
public enum SNProtocolKit { // Just to make the external API nice
2020-11-05 07:04:39 +01:00
public static func configure(storage: SessionProtocolKitStorageProtocol, sharedSenderKeysDelegate: SharedSenderKeysDelegate) {
2020-12-02 06:25:16 +01:00
SNProtocolKitConfiguration.shared = SNProtocolKitConfiguration(storage: storage, sharedSenderKeysDelegate: sharedSenderKeysDelegate)
2020-11-05 07:04:39 +01:00
}
}