Differences From Artifact [c4660e76b1]:
- File
iOS/SiteStorage.swift
— part of check-in
[2c5f88ebb0]
at
2019-06-16 05:25:10
on branch trunk
— iOS: Migrate to Swift
This is in preparation for moving to SwiftUI at some point. (user: js, size: 4615) [annotate] [blame] [check-ins using]
To Artifact [6bede05795]:
- File iOS/SiteStorage.swift — part of check-in [958a05efc9] at 2019-06-16 15:51:40 on branch trunk — Adjust to ObjFW changes (user: js, size: 4555) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
75 76 77 78 79 80 81 | func hasSite(_ name: OFString) -> Bool { return (storage[name] != nil) } func length(forSite name: OFString) -> size_t { guard let site = storage[name] else { OFInvalidArgumentException().throw() | < < < | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | func hasSite(_ name: OFString) -> Bool { return (storage[name] != nil) } func length(forSite name: OFString) -> size_t { guard let site = storage[name] else { OFInvalidArgumentException().throw() } return (site[SiteStorage.lengthField] as! OFNumber).sizeValue } func isLegacy(site name: OFString) -> Bool { guard let site = storage[name] else { OFInvalidArgumentException().throw() } return (site[SiteStorage.legacyField] as! OFNumber).boolValue } func keyFile(forSite name: OFString) -> OFString? { guard let site = storage[name] else { OFInvalidArgumentException().throw() } let keyFile = site[SiteStorage.keyFileField] if keyFile is OFNull { return nil } |
︙ | ︙ |