|
|
@ -12,7 +12,7 @@ import SwiftUI |
|
|
|
|
|
|
|
enum DNType : Int { case ready = 0, downloading, downloadArrived, noDownloadAvailable } |
|
|
|
|
|
|
|
@objc(pEpNotificationProtocol) protocol pEpNotificationProtocol { |
|
|
|
@objc(PEPNotificationProtocol) protocol PEPNotificationProtocol { |
|
|
|
func notifyDownload(_ type: Int, withName: NSString, withFilename: NSString) |
|
|
|
} |
|
|
|
|
|
|
@ -24,8 +24,8 @@ enum DNType : Int { case ready = 0, downloading, downloadArrived, noDownloadAvai |
|
|
|
func stopUpdates() |
|
|
|
} |
|
|
|
|
|
|
|
@objc class pEpNotification : NSObject, pEpNotificationProtocol { |
|
|
|
var delegate: pEpNotificationProtocol! |
|
|
|
@objc class pEpNotification : NSObject, PEPNotificationProtocol { |
|
|
|
var delegate: PEPNotificationProtocol! |
|
|
|
|
|
|
|
func notifyDownload(_ type: Int, withName: NSString, withFilename: NSString) { |
|
|
|
NSLog("notifyDownload") |
|
|
@ -34,7 +34,7 @@ enum DNType : Int { case ready = 0, downloading, downloadArrived, noDownloadAvai |
|
|
|
} |
|
|
|
|
|
|
|
@NSApplicationMain |
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate, NSXPCListenerDelegate, pEpNotificationProtocol { |
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate, NSXPCListenerDelegate, PEPNotificationProtocol { |
|
|
|
@IBOutlet weak var pEpMenu: NSMenu! |
|
|
|
@IBOutlet weak var statusText: NSMenuItem! |
|
|
|
@IBOutlet weak var _updateNow: NSMenuItem! |
|
|
@ -187,7 +187,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele |
|
|
|
} |
|
|
|
|
|
|
|
@objc func listener(_ listener: NSXPCListener, shouldAcceptNewConnection newConnection: NSXPCConnection) -> Bool { |
|
|
|
newConnection.exportedInterface = NSXPCInterface.init(with: pEpNotificationProtocol.self) |
|
|
|
newConnection.exportedInterface = NSXPCInterface.init(with: PEPNotificationProtocol.self) |
|
|
|
let obj = pEpNotification() |
|
|
|
obj.delegate = self |
|
|
|
newConnection.exportedObject = obj |
|
|
|