another.im-ios/AnotherXMPP/XMPPStorage.swift
2024-12-18 05:08:11 +01:00

22 lines
494 B
Swift

import Foundation
public typealias Credentials = [String: String]
public protocol XMPPStorage: AnyObject {
// credentials
func getCredentialsByUUID(_ uuid: UUID) async -> Credentials?
// roster
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
// messages
// omemo
// whatever else
}