summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLRPCResponseNotification.h
blob: 8d77dd767746ca49d7f8aead0c441accd4dc1201 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
//  SDLRPCResponseNotification.h
//  SmartDeviceLink-iOS
//
//  Created by Joel Fischer on 8/25/16.
//  Copyright © 2016 smartdevicelink. All rights reserved.
//

#import <Foundation/Foundation.h>

@class SDLRPCResponse;


NS_ASSUME_NONNULL_BEGIN

/**
 *  A NSNotification object that makes retrieving internal SDLRPCResponse data easier
 */
@interface SDLRPCResponseNotification : NSNotification

/**
 *  The response within the userinfo dictionary
 */
@property (copy, nonatomic, readonly) __kindof SDLRPCResponse *response;

/**
 *  Create an NSNotification object containing an SDLRPCResponse
 *
 *  @param name The NSNotification name
 *  @param object The NSNotification object
 *  @param response The SDLRPCResponse payload
 *  @return The NSNotification
 */
- (instancetype)initWithName:(NSString *)name object:(nullable id)object rpcResponse:(__kindof SDLRPCResponse *)response;

/**
 *  Returns whether or not the containing response is equal to a class, not including subclasses.
 *
 *  @param aClass the class you are questioning
 */
- (BOOL)isResponseMemberOfClass:(Class)aClass;

/**
 *  Returns whether or not the containing response is a kind of class, including subclasses.
 *
 *  @param aClass the class you are questioning
 */
- (BOOL)isResponseKindOfClass:(Class)aClass;

@end

NS_ASSUME_NONNULL_END