Files
damus/damus/Models/HeadlessDamusState.swift
2024-01-25 12:09:49 -08:00

27 lines
770 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// HeadlessDamusState.swift
// damus
//
// Created by Daniel DAquino on 2023-11-27.
//
import Foundation
/// HeadlessDamusState
///
/// A protocl for a lighter headless alternative to DamusState that does not have dependencies on View objects or UI logic.
/// This is useful in limited environments (e.g. Notification Service Extension) where we do not want View/UI dependencies
protocol HeadlessDamusState {
var ndb: Ndb { get }
var settings: UserSettingsStore { get }
var contacts: Contacts { get }
var muted_threads: MutedThreadsManager { get }
var keypair: Keypair { get }
var profiles: Profiles { get }
var zaps: Zaps { get }
var lnurls: LNUrls { get }
@discardableResult
func add_zap(zap: Zapping) -> Bool
}