another.im-ios/AnotherIM/xmpp/XMPPClientStorageProtocol.swift
2024-12-16 08:19:58 +01:00

23 lines
780 B
Swift

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 {}