summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLProtocolMessage.h
blob: 62abd62262a91dbc24af1414ff1819e0c63693d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//  SDLSmartDeviceLinkProtocolMessage.h
//

#import <Foundation/Foundation.h>
@class SDLProtocolHeader;


@interface SDLProtocolMessage : NSObject

@property (strong) SDLProtocolHeader *header;
@property (strong) NSData *payload;
@property (strong, readonly) NSData *data;

+ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload; // Returns a V1 or V2 object

- (NSUInteger)size;
- (NSString *)description;
- (NSDictionary *)rpcDictionary; // Use for RPC type messages to obtain the data in a dictionary

+ (UInt8)determineVersion:(NSData *)data;


@end