another.im-ios/AnotherIM/xmpp/XMPPClientStorageProtocol.swift

23 lines
780 B
Swift
Raw Normal View History

2024-06-19 15:06:39 +00:00
import Foundation
typealias XMPPClientStorageProtocol =
AnyObject &
XMPPClientStorageCredentials &
XMPPClientStorageHistory
// For storing credentials
typealias XMPPClientCredentials = [String: String]
protocol XMPPClientStorageCredentials: AnyObject {
func updateCredentialsByUUID(_ uuid: UUID, _ credentials: XMPPClientCredentials) async
func getCredentialsByUUID(_ uuid: UUID) async -> XMPPClientCredentials?
}
// For storing stanza history
protocol XMPPClientStorageHistory:
XMPPClientStorageHistoryIqs &
XMPPClientStorageHistoryMessages &
XMPPClientStorageHistoryPresences {}
protocol XMPPClientStorageHistoryIqs: AnyObject {}
protocol XMPPClientStorageHistoryMessages: AnyObject {}
protocol XMPPClientStorageHistoryPresences: AnyObject {}