summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSetMediaClockTimer.m
blob: 3eb77bf8c37fc4be4967b97fa78e4902e8e2e64c (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
60
61
62
63
64
65
66
67
68
69
70
71
//  SDLSetMediaClockTimer.m
//


#import "SDLSetMediaClockTimer.h"

#import "SDLNames.h"
#import "SDLStartTime.h"

@implementation SDLSetMediaClockTimer

- (instancetype)init {
    if (self = [super initWithName:NAMES_SetMediaClockTimer]) {
    }
    return self;
}

- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
    if (self = [super initWithDictionary:dict]) {
    }
    return self;
}

- (void)setStartTime:(SDLStartTime *)startTime {
    if (startTime != nil) {
        [parameters setObject:startTime forKey:NAMES_startTime];
    } else {
        [parameters removeObjectForKey:NAMES_startTime];
    }
}

- (SDLStartTime *)startTime {
    NSObject *obj = [parameters objectForKey:NAMES_startTime];
    if (obj == nil || [obj isKindOfClass:SDLStartTime.class]) {
        return (SDLStartTime *)obj;
    } else {
        return [[SDLStartTime alloc] initWithDictionary:(NSMutableDictionary *)obj];
    }
}

- (void)setEndTime:(SDLStartTime *)endTime {
    if (endTime != nil) {
        [parameters setObject:endTime forKey:NAMES_endTime];
    } else {
        [parameters removeObjectForKey:NAMES_endTime];
    }
}

- (SDLStartTime *)endTime {
    NSObject *obj = [parameters objectForKey:NAMES_endTime];
    if (obj == nil || [obj isKindOfClass:SDLStartTime.class]) {
        return (SDLStartTime *)obj;
    } else {
        return [[SDLStartTime alloc] initWithDictionary:(NSMutableDictionary *)obj];
    }
}

- (void)setUpdateMode:(SDLUpdateMode)updateMode {
    if (updateMode != nil) {
        [parameters setObject:updateMode forKey:NAMES_updateMode];
    } else {
        [parameters removeObjectForKey:NAMES_updateMode];
    }
}

- (SDLUpdateMode)updateMode {
    NSObject *obj = [parameters objectForKey:NAMES_updateMode];
    return (SDLUpdateMode)obj;
}

@end