blob: e8a36d903c7bbeb873200acfcc5355b9bb36d4ac (
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
|
//
// SDLRPCStruct.h
#import <Foundation/Foundation.h>
#import "NSNumber+NumberType.h"
NS_ASSUME_NONNULL_BEGIN
/// Superclass of all RPC-related structs and messages
@interface SDLRPCStruct : NSObject <NSCopying>
/// The store that contains RPC data
@property (strong, nonatomic, readonly) NSMutableDictionary<NSString *, id> *store;
/// Declares if the RPC payload ought to be protected
@property (assign, nonatomic, getter=isPayloadProtected) BOOL payloadProtected;
/**
* Convenience init
*
* @param dict A dictionary
* @return A SDLRPCStruct object
*/
- (instancetype)initWithDictionary:(NSDictionary<NSString *, id> *)dict;
/**
* Converts struct to JSON formatted data
*
* @param version The protocol version
* @return JSON formatted data
*/
- (NSDictionary<NSString *, id> *)serializeAsDictionary:(Byte)version;
@end
NS_ASSUME_NONNULL_END
|