Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rsyncOSX committed Mar 30, 2023
1 parent f510397 commit 2266673
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 65 deletions.
40 changes: 0 additions & 40 deletions RsyncOSX/ReadConfigurationJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,12 @@
import Combine
import Foundation

/*
struct UniqueserversandLogins: Hashable {
var offsiteUsername: String?
var offsiteServer: String?
init(_ username: String,
_ servername: String)
{
offsiteServer = servername
offsiteUsername = username
}
func hash(into hasher: inout Hasher) {
hasher.combine(offsiteUsername)
hasher.combine(offsiteServer)
}
}
*/
class ReadConfigurationJSON: NamesandPaths {
var configurations: [Configuration]?
var filenamedatastore = [SharedReference.shared.fileconfigurationsjson]
var subscriptons = Set<AnyCancellable>()
var validhiddenIDs = Set<Int>()

/*
func setuniqueserversandlogins() -> [UniqueserversandLogins]? {
let configs = configurations?.filter {
SharedReference.shared.synctasks.contains($0.task)
}
guard configs?.count ?? 0 > 0 else { return nil }
var uniqueserversandlogins = [UniqueserversandLogins]()
for i in 0 ..< (configs?.count ?? 0) {
if let config = configs?[i] {
if config.offsiteUsername.isEmpty == false, config.offsiteServer.isEmpty == false {
let record = UniqueserversandLogins(config.offsiteUsername, config.offsiteServer)
if uniqueserversandlogins.filter({ ($0.offsiteUsername == record.offsiteUsername) &&
($0.offsiteServer == record.offsiteServer)
}).count == 0 {
uniqueserversandlogins.append(record)
}
}
}
}
return uniqueserversandlogins
}
*/
init(_ profile: String?) {
super.init(.configurations)
filenamedatastore.publisher
Expand Down
2 changes: 0 additions & 2 deletions RsyncOSX/ReadScheduleJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class ReadScheduleJSON: NamesandPaths {
.sink { completion in
switch completion {
case .finished:
// print("The publisher finished normally.")
return
case let .failure(error):
let error = error as NSError
Expand All @@ -47,7 +46,6 @@ class ReadScheduleJSON: NamesandPaths {
var schedule = ConfigurationSchedule(data[i])
schedule.profilename = profile
// Validate that the hidden ID is OK,
// schedule != Scheduletype.stopped.rawValue, logs count > 0
if let validhiddenID = validhiddenID {
if validhiddenID.contains(schedule.hiddenID) {
schedules.append(schedule)
Expand Down
5 changes: 0 additions & 5 deletions RsyncOSX/RsyncAsync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ final class RsyncAsync: Errors {
}
}

// Terminate Process, used when user Aborts task.
func abortProcess() {
_ = InterruptProcess()
}

init(arguments: [String]?,
processtermination: @escaping ([String]?) -> Void)
{
Expand Down
5 changes: 0 additions & 5 deletions RsyncOSX/RsyncProcess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ final class RsyncProcess: Errors {
}
}

// Terminate Process, used when user Aborts task.
func abortProcess() {
_ = InterruptProcess()
}

init(arguments: [String]?,
config: Configuration?,
processtermination: @escaping () -> Void,
Expand Down
5 changes: 0 additions & 5 deletions RsyncOSX/RsyncProcessAsync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ final class RsyncProcessAsync: Errors {
}
}

// Terminate Process, used when user Aborts task.
func abortProcess() {
_ = InterruptProcess()
}

init(arguments: [String]?,
config: Configuration?,
processtermination: @escaping ([String]?) -> Void)
Expand Down
6 changes: 0 additions & 6 deletions RsyncOSX/ViewControllerExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ extension VcMain {
as? NSViewController)
}

// AssistID
var viewControllerAssist: NSViewController? {
return (sheetviewstoryboard?.instantiateController(withIdentifier: "AssistID")
as? NSViewController)
}

// Profile
var viewControllerProfile: NSViewController? {
return (sheetviewstoryboard?.instantiateController(withIdentifier: "ProfileID")
Expand Down
1 change: 0 additions & 1 deletion RsyncOSX/WriteConfigurationJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class WriteConfigurationJSON: NamesandPaths {
.sink(receiveCompletion: { completion in
switch completion {
case .finished:
// print("The publisher finished normally.")
return
case let .failure(error):
let error = error as NSError
Expand Down
1 change: 0 additions & 1 deletion RsyncOSX/WriteScheduleJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class WriteScheduleJSON: NamesandPaths {
.sink(receiveCompletion: { completion in
switch completion {
case .finished:
// print("The publisher finished normally.")
return
case let .failure(error):
let error = error as NSError
Expand Down
Binary file not shown.

0 comments on commit 2266673

Please sign in to comment.