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

//
// pEpMacOSAdapterProtocol.h
// pEpMacOSAdapter
//
// Created by Volker Birk on 20.04.20.
// Copyleft © 2020 p≡p foundation.
// This file is under GNU General Public License 3.0
//
#import <Foundation/Foundation.h>
/// Notification types
typedef enum { ready = 0, downloading, downloadArrived, noDownloadAvailable } DNType;
/// Callback protocol to notify about download events
@protocol pEpNotificationProtocol
/// notification about download events
- (void)notifyDownload:(int)type withName:(NSString*)name withFilename:(NSString*)filename;
@end
/// This is the object from the client where we deliver notifications to
@interface pEpNotification : NSObject <pEpNotificationProtocol>
@end
/// This protocol is providing the XPC interface to the User Interface program pEpNotifications
@protocol pEpMacOSAdapterProtocol
/**
subscribe to the published notifications about downloads arriving
- Parameter downloading: block to call back when a download is going to happen
- Parameter downloadArrived: block to call back when a download arrived
*/
- (void)subscribeForUpdate:(NSXPCListenerEndpoint*)endpoint;
/// unsubscribe from receiving notifications about downloads arriving
- (void)unsubscribeForUpdate;
/// search for immediate updates
- (void)updateNow;
/// schedules updates each 2 hours
- (void)scheduleUpdates;
/// stop auto updates
- (void)stopUpdates;
@end