summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadSettings/SettingsStore.swift
blob: fea9e8d183198f6857f5a45ed2d95e539553a34e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
//  SettingsStore.swift
//  MullvadVPN
//
//  Created by Sajad Vishkai on 2022-11-22.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

import Foundation

public enum SettingsKey: String, CaseIterable, Sendable {
    case settings = "Settings"
    case deviceState = "DeviceState"
    case apiAccessMethods = "ApiAccessMethods"
    case ipOverrides = "IPOverrides"
    case customRelayLists = "CustomRelayLists"
    case lastUsedAccount = "LastUsedAccount"
    case shouldWipeSettings = "ShouldWipeSettings"
    case recentConnections = "RecentConnections"
}

public protocol SettingsStore: Sendable {
    func read(key: SettingsKey) throws -> Data
    func write(_ data: Data, for key: SettingsKey) throws
    func delete(key: SettingsKey) throws
}