mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-25 16:37:42 +01:00
97ccb4840a
Agent application (macOS 10.11+). More info at https://www.insanelymac.com/forum/topic/341047-cloverapp-testing/
51 lines
1.0 KiB
Swift
51 lines
1.0 KiB
Swift
//
|
|
// Driver.swift
|
|
// Clover
|
|
//
|
|
// Created by vector sigma on 22/10/2019.
|
|
// Copyright © 2019 CloverHackyColor. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
enum EFIkind: String {
|
|
case uefi = "UEFI"
|
|
case bios = "BIOS"
|
|
}
|
|
|
|
class EFIDriver {
|
|
private var internalState : NSControl.StateValue = .off
|
|
var dest : String
|
|
var src : String
|
|
var kind : EFIkind
|
|
var sectionName : String
|
|
|
|
var state : NSControl.StateValue {
|
|
get {
|
|
self.itemView?.checkBox.state = self.internalState
|
|
return self.internalState
|
|
}
|
|
set {
|
|
self.internalState = newValue
|
|
self.itemView?.checkBox.state = self.internalState
|
|
}
|
|
}
|
|
|
|
var isFromClover : Bool
|
|
var itemView : CollectionViewItem? = nil
|
|
|
|
init(dest: String, src: String,
|
|
kind: EFIkind,
|
|
sectionName: String,
|
|
state: NSControl.StateValue,
|
|
isFromClover: Bool) {
|
|
self.dest = dest
|
|
self.src = src
|
|
self.kind = kind
|
|
self.sectionName = sectionName
|
|
self.isFromClover = isFromClover
|
|
self.state = state
|
|
}
|
|
}
|
|
|