-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathConfigKey.java
More file actions
97 lines (78 loc) · 2.28 KB
/
ConfigKey.java
File metadata and controls
97 lines (78 loc) · 2.28 KB
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
93
94
95
96
97
/*
* Copyright 2003-2020 The Kegbot Project contributors <info@kegbot.org>
*
* This file is part of the Kegtab package from the Kegbot project. For
* more information on Kegtab or Kegbot, see <http://kegbot.org/>.
*
* Kegtab is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation, version 2.
*
* Kegtab is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with Kegtab. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kegbot.app.config;
import static org.kegbot.app.config.AppConfiguration.FALSE;
import static org.kegbot.app.config.AppConfiguration.TRUE;
/**
* Configuration items used by the application. Enum names are used as the key in a backing store.
*/
enum ConfigKey {
SETUP_VERSION("0"),
LOCAL_BACKEND(FALSE),
KEGBOT_URL(""),
API_KEY(""),
USERNAME(""),
PIN(""),
REGISTRATION_ID(""),
ALLOW_REGISTRATION(TRUE),
ALLOW_MANUAL_LOGIN(TRUE),
CACHE_CREDENTIALS(TRUE),
RUN_CORE(TRUE),
ENABLE_AUTOMATIC_FLOW_START(TRUE),
USE_CAMERA(TRUE),
AUTO_TAKE_PHOTOS(TRUE),
TAKE_PHOTOS_DURING_REGISTRATION(FALSE),
TAKE_PHOTOS_DURING_POUR(TRUE),
ENABLE_CAMERA_SOUNDS(TRUE),
FLOW_MINIMUM_VOLUME_ML("10"),
FLOW_IDLE_TIMEOUT_SECONDS("90"),
FLOW_IDLE_WARNING_SECONDS("60"),
ATTRACT_MODE(TRUE),
UPDATE_REQUIRED(FALSE),
UPDATE_AVAILABLE(FALSE),
VOLUME_UNITS_METRIC(FALSE),
TEMPERATURE_UNITS_CELSIUS(FALSE),
STAY_AWAKE(TRUE),
KEEP_SCREEN_ON(TRUE),
WAKE_DURING_POUR(FALSE),
EMAIL_ADDRESS(""),
LAST_USED_KEG_SIZE(""),
NETWORK_CONTROLLER_HOST(""),
NETWORK_CONTROLLER_PORT("8321"),
MQTT_SERVER(""),
MQTT_PORT("1883"),
MQTT_USERNAME(""),
MQTT_PASSWORD(""),
MQTT_TOPIC_PREFIX("kegbot");
private final String mDefaultValue;
ConfigKey(String defaultValue) {
mDefaultValue = defaultValue;
}
/**
* Returns the key name that should be used.
*
* @return the key name
*/
String getName() {
return name();
}
String getDefault() {
return mDefaultValue;
}
}