2024-12-17 08:34:44 +00:00
|
|
|
import Foundation
|
|
|
|
|
|
|
|
typealias Credentials = [String: String]
|
|
|
|
|
|
|
|
protocol XMPPStorage: AnyObject {
|
|
|
|
// credentials
|
|
|
|
func getCredentialsByUUID(_ uuid: UUID) async -> Credentials?
|
|
|
|
|
|
|
|
// roster
|
2024-12-17 10:00:51 +00:00
|
|
|
func deleteRoster(jid: JID) async
|
|
|
|
// where Data is byte representation of array of roster items
|
|
|
|
// i.e. [XMLElement] -> Data
|
|
|
|
func getRoster(jid: JID) async -> Data?
|
|
|
|
func setRoster(jid: JID, roster: Data) async
|
2024-12-17 08:34:44 +00:00
|
|
|
|
|
|
|
// messages
|
|
|
|
|
|
|
|
// omemo
|
|
|
|
|
|
|
|
// whatever else
|
|
|
|
}
|