blob: c4400a8c7fc74af86fc698c8d6051f2c4a96577f (
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
|
// SDLSmartDeviceLinkProtocolMessage.h
//
#import <Foundation/Foundation.h>
@class SDLProtocolHeader;
NS_ASSUME_NONNULL_BEGIN
@interface SDLProtocolMessage : NSObject
@property (strong, nonatomic) SDLProtocolHeader *header;
@property (nullable, strong, nonatomic) NSData *payload;
@property (strong, nonatomic, readonly) NSData *data;
+ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload; // Returns a V1 or V2 object
- (NSUInteger)size;
- (NSString *)description;
- (nullable NSDictionary<NSString *, id> *)rpcDictionary; // Use for RPC type messages to obtain the data in a dictionary
+ (UInt8)determineVersion:(NSData *)data;
@end
NS_ASSUME_NONNULL_END
|