another.im-ios/AnotherXMPP/XMPPStorage.swift

22 lines
494 B
Swift
Raw Permalink Normal View History

2024-12-17 08:34:44 +00:00
import Foundation
2024-12-18 04:08:11 +00:00
public typealias Credentials = [String: String]
2024-12-17 08:34:44 +00:00
2024-12-18 04:08:11 +00:00
public protocol XMPPStorage: AnyObject {
2024-12-17 08:34:44 +00:00
// 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
}