summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLGlobalProperty.m
blob: 59aa87e7b4baef624658420b3cd42ac3ff6210b9 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//  SDLGlobalProperty.m
//


#import "SDLGlobalProperty.h"

SDLGlobalProperty *SDLGlobalProperty_HELPPROMPT = nil;
SDLGlobalProperty *SDLGlobalProperty_TIMEOUTPROMPT = nil;
SDLGlobalProperty *SDLGlobalProperty_VRHELPTITLE = nil;
SDLGlobalProperty *SDLGlobalProperty_VRHELPITEMS = nil;
SDLGlobalProperty *SDLGlobalProperty_MENUNAME = nil;
SDLGlobalProperty *SDLGlobalProperty_MENUICON = nil;
SDLGlobalProperty *SDLGlobalProperty_KEYBOARDPROPERTIES = nil;

NSArray *SDLGlobalProperty_values = nil;

@implementation SDLGlobalProperty

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

+ (NSArray *)values {
    if (SDLGlobalProperty_values == nil) {
        SDLGlobalProperty_values = @[
            SDLGlobalProperty.HELPPROMPT,
            SDLGlobalProperty.TIMEOUTPROMPT,
            SDLGlobalProperty.VRHELPTITLE,
            SDLGlobalProperty.VRHELPITEMS,
            SDLGlobalProperty.MENUNAME,
            SDLGlobalProperty.MENUICON,
            SDLGlobalProperty.KEYBOARDPROPERTIES,
        ];
    }
    return SDLGlobalProperty_values;
}

+ (SDLGlobalProperty *)HELPPROMPT {
    if (SDLGlobalProperty_HELPPROMPT == nil) {
        SDLGlobalProperty_HELPPROMPT = [[SDLGlobalProperty alloc] initWithValue:@"HELPPROMPT"];
    }
    return SDLGlobalProperty_HELPPROMPT;
}

+ (SDLGlobalProperty *)TIMEOUTPROMPT {
    if (SDLGlobalProperty_TIMEOUTPROMPT == nil) {
        SDLGlobalProperty_TIMEOUTPROMPT = [[SDLGlobalProperty alloc] initWithValue:@"TIMEOUTPROMPT"];
    }
    return SDLGlobalProperty_TIMEOUTPROMPT;
}

+ (SDLGlobalProperty *)VRHELPTITLE {
    if (SDLGlobalProperty_VRHELPTITLE == nil) {
        SDLGlobalProperty_VRHELPTITLE = [[SDLGlobalProperty alloc] initWithValue:@"VRHELPTITLE"];
    }
    return SDLGlobalProperty_VRHELPTITLE;
}

+ (SDLGlobalProperty *)VRHELPITEMS {
    if (SDLGlobalProperty_VRHELPITEMS == nil) {
        SDLGlobalProperty_VRHELPITEMS = [[SDLGlobalProperty alloc] initWithValue:@"VRHELPITEMS"];
    }
    return SDLGlobalProperty_VRHELPITEMS;
}

+ (SDLGlobalProperty *)MENUNAME {
    if (SDLGlobalProperty_MENUNAME == nil) {
        SDLGlobalProperty_MENUNAME = [[SDLGlobalProperty alloc] initWithValue:@"MENUNAME"];
    }
    return SDLGlobalProperty_MENUNAME;
}

+ (SDLGlobalProperty *)MENUICON {
    if (SDLGlobalProperty_MENUICON == nil) {
        SDLGlobalProperty_MENUICON = [[SDLGlobalProperty alloc] initWithValue:@"MENUICON"];
    }
    return SDLGlobalProperty_MENUICON;
}

+ (SDLGlobalProperty *)KEYBOARDPROPERTIES {
    if (SDLGlobalProperty_KEYBOARDPROPERTIES == nil) {
        SDLGlobalProperty_KEYBOARDPROPERTIES = [[SDLGlobalProperty alloc] initWithValue:@"KEYBOARDPROPERTIES"];
    }
    return SDLGlobalProperty_KEYBOARDPROPERTIES;
}

@end