/* NSNotification.h Copyright (c) 1994-2012, Apple Inc. All rights reserved. */ #import @class NSString, NSDictionary, NSOperationQueue; /**************** Notifications ****************/ @interface NSNotification : NSObject - (NSString *)name; - (id)object; - (NSDictionary *)userInfo; @end @interface NSNotification (NSNotificationCreation) + (id)notificationWithName:(NSString *)aName object:(id)anObject; + (id)notificationWithName:(NSString *)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo; @end /**************** Notification Center ****************/ @interface NSNotificationCenter : NSObject { @package void * __strong _impl; void * __strong _callback; void *_pad[11]; } + (id)defaultCenter; - (void)addObserver:(id)observer selector:(SEL)aSelector name:(NSString *)aName object:(id)anObject; - (void)postNotification:(NSNotification *)notification; - (void)postNotificationName:(NSString *)aName object:(id)anObject; - (void)postNotificationName:(NSString *)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo; - (void)removeObserver:(id)observer; - (void)removeObserver:(id)observer name:(NSString *)aName object:(id)anObject; #if NS_BLOCKS_AVAILABLE - (id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block NS_AVAILABLE(10_6, 4_0); // The return value is retained by the system, and should be held onto by the caller in // order to remove the observer with removeObserver: later, to stop observation. #endif @end