|
|
@ -16,7 +16,7 @@ enum DNType : Int { case ready = 0, downloading, downloadArrived, noDownloadAvai |
|
|
|
func notifyDownload(_ type: Int, withName: NSString, withFilename: NSString) |
|
|
|
} |
|
|
|
|
|
|
|
@objc(pEpMacOSAdapterProtocol) protocol pEpMacOSAdapterProtocol { |
|
|
|
@objc(PEPMacOSAdapterProtocol) protocol PEPMacOSAdapterProtocol { |
|
|
|
func subscribeForUpdate(_ endpoint: NSXPCListenerEndpoint?) |
|
|
|
func unsubscribeForUpdate() |
|
|
|
func updateNow() |
|
|
@ -43,7 +43,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele |
|
|
|
|
|
|
|
var statusBarItem: NSStatusItem? = nil |
|
|
|
lazy var connection: NSXPCConnection = NSXPCConnection.init(machServiceName: "foundation.pEp.adapter.macOS") |
|
|
|
var service: pEpMacOSAdapterProtocol? |
|
|
|
var service: PEPMacOSAdapterProtocol? |
|
|
|
var nc = NSUserNotificationCenter.default |
|
|
|
lazy var clientListener: NSXPCListener = NSXPCListener.anonymous() |
|
|
|
var receiver: pEpNotification! |
|
|
@ -233,9 +233,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele |
|
|
|
} |
|
|
|
|
|
|
|
private func initXPCConnection() { |
|
|
|
connection.remoteObjectInterface = NSXPCInterface.init(with: pEpMacOSAdapterProtocol.self) |
|
|
|
connection.remoteObjectInterface = NSXPCInterface.init(with: PEPMacOSAdapterProtocol.self) |
|
|
|
connection.resume() |
|
|
|
service = connection.remoteObjectProxyWithErrorHandler(proxyErrorHandler) as? pEpMacOSAdapterProtocol |
|
|
|
service = connection.remoteObjectProxyWithErrorHandler(proxyErrorHandler) as? PEPMacOSAdapterProtocol |
|
|
|
} |
|
|
|
|
|
|
|
private func initClientService() { |
|
|
|