/
DeviceClass.java
127 lines (122 loc) · 3.64 KB
/
DeviceClass.java
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2023 Niels Basjes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.basjes.parse.useragent.classify;
public enum DeviceClass {
/**
* The device is assessed as a Desktop/Laptop class device.
*/
DESKTOP("Desktop"),
/**
* In some cases the useragent has been altered by anonimization software.
*/
ANONYMIZED("Anonymized"),
/**
* A device that is mobile yet we do not know if it is a eReader/Tablet/Phone or Watch.
*/
MOBILE("Mobile"),
/**
* A mobile device with a rather large screen (common > 7").
*/
TABLET("Tablet"),
/**
* A mobile device with a small screen (common < 7").
*/
PHONE("Phone"),
/**
* A mobile device with a tiny screen (common < 2"). Normally these are an additional screen for a phone/tablet type device.
*/
WATCH("Watch"),
/**
* A mobile device with a AR capabilities.
*/
AUGMENTED_REALITY("Augmented Reality"),
/**
* A mobile device with a VR capabilities.
*/
VIRTUAL_REALITY("Virtual Reality"),
/**
* Similar to a Tablet yet in most cases with an eInk screen.
*/
E_READER("eReader"),
/**
* A connected device that allows interacting via a TV sized screen.
*/
SET_TOP_BOX("Set-top box"),
/**
* Similar to Set-top box yet here this is built into the TV.
*/
TV("TV"),
/**
* 'Fixed' game systems like the PlayStation and XBox.
*/
GAME_CONSOLE("Game Console"),
/**
* 'Mobile' game systems like the 3DS.
*/
HANDHELD_GAME_CONSOLE("Handheld Game Console"),
/**
* An appliance with a browser built in (like a large Fridge).
*/
HOME_APPLIANCE("Home Appliance"),
/**
* A voice driven 'browser' (i.e. ask a question and the page is read aloud). Like Alexa and Google Home.
*/
VOICE("Voice"),
/**
* A smart speaker kind of device with a tablet sized screen built in (like Google Nest and Amazon Echo Home).
*/
SMART_DISPLAY("Smart Display"),
/**
* A browser built into a car.
*/
CAR("Car"),
/**
* Something that runs in a cloud somewhere.
*/
CLOUD("Cloud"),
/**
* Robots that visit the site.
*/
ROBOT("Robot"),
/**
* Robots that visit the site indicating they want to be seen as a Mobile visitor.
*/
ROBOT_MOBILE("Robot Mobile"),
/**
* Robots that visit the site pretending they are robots like google, but they are not.
*/
ROBOT_IMITATOR("Robot Imitator"),
/**
* In case scripting is detected in the useragent string, also fallback in really broken situations.
*/
HACKER("Hacker"),
/**
* We really don't know, these are usually useragents that look normal yet contain almost no information about the device.
*/
UNKNOWN("Unknown"),
/**
* We found a deviceclass string that we have no enum value for.
*/
UNCLASSIFIED("Unclassified");
private final String value;
DeviceClass(final String newValue) {
value = newValue;
}
public String getValue() {
return value;
}
}