summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLRPCStruct.h
blob: e38efa6789d5faaf60d7a3a487d4d1c69d83bad7 (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
//
//  SDLRPCStruct.h


#import <Foundation/Foundation.h>

#import "NSNumber+NumberType.h"

// This is so we don't have to expose this to the project. (could also make the functions below an internal protocol).
typedef NSString* SDLName;

@interface SDLRPCStruct : NSObject {
    NSMutableDictionary<NSString *, id> *store;
}

- (instancetype)initWithDictionary:(NSDictionary<NSString *, id> *)dict;
- (instancetype)init;

- (NSDictionary<NSString *, id> *)serializeAsDictionary:(Byte)version;

- (void)setObject:(NSObject*)object forName:(SDLName)name inStorage:(NSMutableDictionary*)storage;
- (void)setObject:(NSObject *)object forName:(SDLName)name;
- (id)objectForName:(SDLName)name fromStorage:(NSMutableDictionary*)storage;
- (id)objectForName:(SDLName)name;
- (id)objectForName:(SDLName)name ofClass:(Class)classType;
- (NSMutableArray *)objectsForName:(SDLName)name ofClass:(Class)classType;

@end