summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLStartTime.h
blob: 05645830e61f4bdb1e786897706732b1f425fc46 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//  SDLStartTime.h
//


#import "SDLRPCMessage.h"

NS_ASSUME_NONNULL_BEGIN

/**
 * Describes the hour, minute and second values used to set the media clock.
 *
 * @since SDL 1.0
 */
@interface SDLStartTime : SDLRPCStruct

/**
 Create a time struct with a time interval (time in seconds). Fractions of the second will be eliminated and rounded down.

 @param timeInterval The time interval to transform into hours, minutes, seconds
 @return The object
 */
- (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval;

/**
 Create a time struct with hours, minutes, and seconds

 @param hours The number of hours
 @param minutes The number of minutes
 @param seconds The number of seconds
 @return The object
 */
- (instancetype)initWithHours:(UInt8)hours minutes:(UInt8)minutes seconds:(UInt8)seconds;

/**
 * The hour of the media clock
 * 
 * Some display types only support a max value of 19. If out of range, it will be rejected.
 *
 * Required, Integer, 0 - 59
 */
@property (strong, nonatomic) NSNumber<SDLInt> *hours;

/**
 * The minute of the media clock
 *
 * Required, Integer, 0 - 59
 */
@property (strong, nonatomic) NSNumber<SDLInt> *minutes;

/**
 * The second of the media clock
 *
 * Required, Integer, 0 - 59
 */
@property (strong, nonatomic) NSNumber<SDLInt> *seconds;

@end

NS_ASSUME_NONNULL_END