]> git.saurik.com Git - apple/security.git/blobdiff - KVSKeychainSyncingProxy/XPCNotificationDispatcher.h
Security-57740.51.3.tar.gz
[apple/security.git] / KVSKeychainSyncingProxy / XPCNotificationDispatcher.h
diff --git a/KVSKeychainSyncingProxy/XPCNotificationDispatcher.h b/KVSKeychainSyncingProxy/XPCNotificationDispatcher.h
new file mode 100644 (file)
index 0000000..3fc9c4c
--- /dev/null
@@ -0,0 +1,24 @@
+//
+//  XPCNotificationDispatcher.h
+//  Security
+//
+
+
+#import <Foundation/Foundation.h>
+
+@protocol XPCNotificationListener
+- (void) handleNotification: (const char *) name;
+@end
+
+typedef void (^XPCNotificationBlock)(const char* notification);
+
+@interface XPCNotificationDispatcher : NSObject
+
++ (instancetype) dispatcher;
+
+- (instancetype) init;
+
+- (void) addListener: (NSObject<XPCNotificationListener>*) newHandler;
+- (void) removeListener: (NSObject<XPCNotificationListener>*) existingHandler;
+
+@end