summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLGlobals.h
blob: 5b922039854ffd83d3075f44a57cf5ef9b67e447 (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
//
//  SDLGlobals.h
//  SmartDeviceLink-iOS
//
//  Created by Joel Fischer on 8/5/15.
//  Copyright (c) 2015 smartdevicelink. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "SDLProtocolHeader.h"

NS_ASSUME_NONNULL_BEGIN

#define SDL_SYSTEM_VERSION_LESS_THAN(version) ([[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] == NSOrderedAscending)
#define SDL_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(version) ([[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] != NSOrderedAscending)
#define BLOCK_RETURN return

extern NSString *const SDLMaxProxyProtocolVersion;

extern NSUInteger const SDLDefaultMTUSize;
extern NSUInteger const SDLV1MTUSize;
extern NSUInteger const SDLV3MTUSize;

@interface SDLGlobals : NSObject

@property (strong, nonatomic, readonly) NSString *protocolVersion;
@property (assign, nonatomic, readonly) NSInteger majorProtocolVersion;
@property (strong, nonatomic) NSString *maxHeadUnitVersion;

+ (instancetype)sharedGlobals;

- (void)setDynamicMTUSize:(NSUInteger)maxMTUSize forServiceType:(SDLServiceType)serviceType;
- (NSUInteger)mtuSizeForServiceType:(SDLServiceType)serviceType;

@end

NS_ASSUME_NONNULL_END