blob: f922e3292cba6cae726c4d9c0673b5fc79f69637 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//
// SettingsStore.swift
// MullvadVPN
//
// Created by Sajad Vishkai on 2022-11-22.
// Copyright © 2022 Mullvad VPN AB. All rights reserved.
//
import Foundation
public enum SettingsKey: String, CaseIterable {
case settings = "Settings"
case deviceState = "DeviceState"
case apiAccessMethods = "ApiAccessMethods"
case lastUsedAccount = "LastUsedAccount"
case shouldWipeSettings = "ShouldWipeSettings"
}
public protocol SettingsStore {
func read(key: SettingsKey) throws -> Data
func write(_ data: Data, for key: SettingsKey) throws
func delete(key: SettingsKey) throws
}
|