blob: 54d1ac776e82c2f805c097da2ee8259071a53a22 (
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
39
40
41
42
43
44
45
|
//
// SDLVersion.h
// SmartDeviceLink
//
// Created by Joel Fischer on 2/19/19.
// Copyright © 2019 smartdevicelink. All rights reserved.
//
#import <Foundation/Foundation.h>
@class SDLSyncMsgVersion;
@class SDLMsgVersion;
NS_ASSUME_NONNULL_BEGIN
@interface SDLVersion : NSObject <NSCopying>
@property (nonatomic, assign) NSUInteger major;
@property (nonatomic, assign) NSUInteger minor;
@property (nonatomic, assign) NSUInteger patch;
@property (nonatomic, copy, readonly) NSString *stringVersion;
- (instancetype)initWithMajor:(NSUInteger)major minor:(NSUInteger)minor patch:(NSUInteger)patch;
+ (instancetype)versionWithMajor:(NSUInteger)major minor:(NSUInteger)minor patch:(NSUInteger)patch;
- (nullable instancetype)initWithString:(NSString *)versionString;
+ (nullable instancetype)versionWithString:(NSString *)versionString;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (instancetype)initWithSyncMsgVersion:(SDLSyncMsgVersion *)syncMsgVersion __deprecated_msg(("Use initWithSDLMsgVersion:sdlMsgVersion: instead"));
+ (instancetype)versionWithSyncMsgVersion:(SDLSyncMsgVersion *)syncMsgVersion __deprecated_msg(("Use versionWithSDLMsgVersion:sdlMsgVersion instead"));
#pragma clang diagnostic pop
- (instancetype)initWithSDLMsgVersion:(SDLMsgVersion *)sdlMsgVersion;
+ (instancetype)versionWithSDLMsgVersion:(SDLMsgVersion *)sdlMsgVersion;
- (NSComparisonResult)compare:(SDLVersion *)otherVersion;
- (BOOL)isLessThanVersion:(SDLVersion *)otherVersion;
- (BOOL)isEqualToVersion:(SDLVersion *)otherVersion;
- (BOOL)isGreaterThanVersion:(SDLVersion *)otherVersion;
- (BOOL)isGreaterThanOrEqualToVersion:(SDLVersion *)otherVersion;
- (BOOL)isLessThanOrEqualToVersion:(SDLVersion *)otherVersion;
@end
NS_ASSUME_NONNULL_END
|