2018-09-18 15:36:38 +00:00
|
|
|
//
|
|
|
|
// RouterProcessStatus+ObjectiveC.swift
|
|
|
|
// I2PLauncher
|
|
|
|
//
|
|
|
|
// Created by Mikal Villa on 18/09/2018.
|
|
|
|
// Copyright © 2018 The I2P Project. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
extension RouterProcessStatus {
|
2018-09-22 22:13:40 +00:00
|
|
|
|
2018-10-11 16:59:59 +00:00
|
|
|
static func createNewRouterProcess(i2pPath: String) {
|
2018-09-18 15:36:38 +00:00
|
|
|
let timeWhenStarted = Date()
|
|
|
|
RouterProcessStatus.routerStartedAt = timeWhenStarted
|
2018-10-11 16:59:59 +00:00
|
|
|
SBridge.sharedInstance().startupI2PRouter(i2pPath)
|
2018-09-22 22:13:40 +00:00
|
|
|
RouterManager.shared().updateState()
|
|
|
|
}
|
|
|
|
static func shutdownRouterChildProcess() {
|
|
|
|
RouterManager.shared().getRouterTask()?.requestShutdown()
|
|
|
|
RouterManager.shared().updateState()
|
2018-09-18 15:36:38 +00:00
|
|
|
}
|
|
|
|
}
|