summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLNotificationDispatcher.h
blob: ba5089a25c7ae1c2d39822c6a46da5768883e9b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
//  SDLnotificationDispatcher.h
//  SmartDeviceLink-iOS
//
//  Created by Joel Fischer on 7/7/16.
//  Copyright © 2016 smartdevicelink. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "SDLProxyListener.h"

@class SDLRPCResponse;
@class SDLRPCNotification;


NS_ASSUME_NONNULL_BEGIN

/**
 *  The SDLNotificationDispatcher subscribes to SDLProxy notifications through SDLProxyListener and sends out actual NSNotifications with those contents. It can also be told to send out other types of notifications.
 */
@interface SDLNotificationDispatcher : NSObject <SDLProxyListener>

/**
 *  Post a notification with a specified name and object.
 *
 *  @param name The name of the notification to be dispatched.
 *  @param info The object to be send along in the `userInfo` dictionary.
 */
- (void)postNotificationName:(NSString *)name infoObject:(nullable id)info;
- (void)postRPCResponseNotification:(NSString *)name response:(__kindof SDLRPCResponse *)response;
- (void)postRPCNotificationNotification:(NSString *)name notification:(__kindof SDLRPCNotification *)rpcNotification;

@end

NS_ASSUME_NONNULL_END