another.im-ios/AnotherXMPP/XMPPStorage.swift

24 lines
598 B
Swift
Raw 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-24 10:43:15 +00:00
func getRosterVer(jid: JID) async -> String?
func setRosterVer(jid: JID, version: String) async
2024-12-17 08:34:44 +00:00
// messages
// omemo
// whatever else
}