This repository was archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathConvertOneConfig.swift
38 lines (34 loc) · 1.53 KB
/
ConvertOneConfig.swift
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
27
28
29
30
31
32
33
34
35
36
37
38
//
// ConvertOneConfig.swift
// RsyncOSX
//
// Created by Thomas Evensen on 25/05/2019.
// Copyright © 2019 Thomas Evensen. All rights reserved.
//
// swiftlint:disable trailing_comma
import Foundation
struct ConvertOneConfig {
var config: Configuration?
var dict: NSMutableDictionary {
let row: NSMutableDictionary = [
DictionaryStrings.taskCellID.rawValue: config?.task ?? "",
DictionaryStrings.hiddenID.rawValue: config?.hiddenID ?? "",
DictionaryStrings.localCatalogCellID.rawValue: config?.localCatalog ?? "",
DictionaryStrings.offsiteCatalogCellID.rawValue: config?.offsiteCatalog ?? "",
DictionaryStrings.offsiteUsernameID.rawValue: config?.offsiteUsername ?? "",
DictionaryStrings.offsiteServerCellID.rawValue: config?.offsiteServer ?? "",
DictionaryStrings.backupIDCellID.rawValue: config?.backupID ?? "",
DictionaryStrings.runDateCellID.rawValue: config?.dateRun ?? "",
DictionaryStrings.daysID.rawValue: config?.dayssincelastbackup ?? "",
DictionaryStrings.markdays.rawValue: config?.markdays ?? "",
DictionaryStrings.snapCellID.rawValue: config?.snapshotnum ?? "",
DictionaryStrings.selectCellID.rawValue: 0,
DictionaryStrings.executepretask.rawValue: config?.executepretask ?? 0,
DictionaryStrings.executeposttask.rawValue: config?.executeposttask ?? 0,
]
return row
}
init(config: Configuration) {
self.config = config
}
}