summaryrefslogtreecommitdiff
path: root/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.m
blob: 676645f7669b3d782b68703276da01e3e97fc109 (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
72
73
74
//  SDLPrerecordedSpeech.m
//


#import "SDLPrerecordedSpeech.h"

SDLPrerecordedSpeech *SDLPrerecordedSpeech_HELP_JINGLE = nil;
SDLPrerecordedSpeech *SDLPrerecordedSpeech_INITIAL_JINGLE = nil;
SDLPrerecordedSpeech *SDLPrerecordedSpeech_LISTEN_JINGLE = nil;
SDLPrerecordedSpeech *SDLPrerecordedSpeech_POSITIVE_JINGLE = nil;
SDLPrerecordedSpeech *SDLPrerecordedSpeech_NEGATIVE_JINGLE = nil;

NSArray *SDLPrerecordedSpeech_values = nil;

@implementation SDLPrerecordedSpeech

+ (SDLPrerecordedSpeech *)valueOf:(NSString *)value {
    for (SDLPrerecordedSpeech *item in SDLPrerecordedSpeech.values) {
        if ([item.value isEqualToString:value]) {
            return item;
        }
    }
    return nil;
}

+ (NSArray *)values {
    if (SDLPrerecordedSpeech_values == nil) {
        SDLPrerecordedSpeech_values = @[
            SDLPrerecordedSpeech.HELP_JINGLE,
            SDLPrerecordedSpeech.INITIAL_JINGLE,
            SDLPrerecordedSpeech.LISTEN_JINGLE,
            SDLPrerecordedSpeech.POSITIVE_JINGLE,
            SDLPrerecordedSpeech.NEGATIVE_JINGLE,
        ];
    }
    return SDLPrerecordedSpeech_values;
}

+ (SDLPrerecordedSpeech *)HELP_JINGLE {
    if (SDLPrerecordedSpeech_HELP_JINGLE == nil) {
        SDLPrerecordedSpeech_HELP_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"HELP_JINGLE"];
    }
    return SDLPrerecordedSpeech_HELP_JINGLE;
}

+ (SDLPrerecordedSpeech *)INITIAL_JINGLE {
    if (SDLPrerecordedSpeech_INITIAL_JINGLE == nil) {
        SDLPrerecordedSpeech_INITIAL_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"INITIAL_JINGLE"];
    }
    return SDLPrerecordedSpeech_INITIAL_JINGLE;
}

+ (SDLPrerecordedSpeech *)LISTEN_JINGLE {
    if (SDLPrerecordedSpeech_LISTEN_JINGLE == nil) {
        SDLPrerecordedSpeech_LISTEN_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"LISTEN_JINGLE"];
    }
    return SDLPrerecordedSpeech_LISTEN_JINGLE;
}

+ (SDLPrerecordedSpeech *)POSITIVE_JINGLE {
    if (SDLPrerecordedSpeech_POSITIVE_JINGLE == nil) {
        SDLPrerecordedSpeech_POSITIVE_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"POSITIVE_JINGLE"];
    }
    return SDLPrerecordedSpeech_POSITIVE_JINGLE;
}

+ (SDLPrerecordedSpeech *)NEGATIVE_JINGLE {
    if (SDLPrerecordedSpeech_NEGATIVE_JINGLE == nil) {
        SDLPrerecordedSpeech_NEGATIVE_JINGLE = [[SDLPrerecordedSpeech alloc] initWithValue:@"NEGATIVE_JINGLE"];
    }
    return SDLPrerecordedSpeech_NEGATIVE_JINGLE;
}

@end