pEp macOS Desktop adapter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. //
  2. // pEpMacOSAdapterProtocol.h
  3. // pEpMacOSAdapter
  4. //
  5. // Created by Volker Birk on 20.04.20.
  6. // Copyleft © 2020 p≡p foundation.
  7. // This file is under GNU General Public License 3.0
  8. //
  9. #import <Foundation/Foundation.h>
  10. /// Notification types
  11. typedef enum { ready = 0, downloading, downloadArrived, noDownloadAvailable } DNType;
  12. /// Callback protocol to notify about download events
  13. @protocol pEpNotificationProtocol
  14. /// notification about download events
  15. - (void)notifyDownload:(int)type withName:(NSString*)name withFilename:(NSString*)filename;
  16. @end
  17. /// This is the object from the client where we deliver notifications to
  18. @interface pEpNotification : NSObject <pEpNotificationProtocol>
  19. @end
  20. /// This protocol is providing the XPC interface to the User Interface program pEpNotifications
  21. @protocol pEpMacOSAdapterProtocol
  22. /**
  23. subscribe to the published notifications about downloads arriving
  24. - Parameter downloading: block to call back when a download is going to happen
  25. - Parameter downloadArrived: block to call back when a download arrived
  26. */
  27. - (void)subscribeForUpdate:(NSXPCListenerEndpoint*)endpoint;
  28. /// unsubscribe from receiving notifications about downloads arriving
  29. - (void)unsubscribeForUpdate;
  30. /// search for immediate updates
  31. - (void)updateNow;
  32. /// schedules updates each 2 hours
  33. - (void)scheduleUpdates;
  34. /// stop auto updates
  35. - (void)stopUpdates;
  36. @end