spiegel-keyman/mac/KeymanSettings/Sources/KeymanSettings/DefaultsRepo.swift
2026-09-14 15:02:35 -04:00

23 lines
696 B
Swift

/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Created by Shawn Schantz on 2026-04-28
*
* DefaultsRepo is a protocol that exposes the ability to read, write and remove
* Keyman UserDefaults settings.
*
*/
import Foundation
public protocol DefaultsRepo {
func readDataModelVersion() -> Int
func readInstallationState() -> Dictionary<String, Any>?
func writeInstallationState(_ dictionary: Dictionary<String, Any>)
func deleteInstallationState()
func readEnabledKeyboards() -> Set<String>
func writeEnabledKeyboards(enabledKeyboardsArray: [String])
func readSelectedKeyboard() -> String
func writeSelectedKeyboard(keyboardName: String)
func clearDefaults()
}