-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdeviceType.go
More file actions
63 lines (57 loc) · 1.13 KB
/
Copy pathdeviceType.go
File metadata and controls
63 lines (57 loc) · 1.13 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
package uaparser
var (
desktop = &itemSpec{
name: "Desktop",
mustContains: []string{"Windows", "Linux", "Mac OS X", "CrOS", "Macintosh"},
mustNotContains: []string{"Windows Phone", "Android", "ARM"},
}
tablet = &itemSpec{
name: "Tablet",
mustContains: []string{"iPad", "Android", "ARM", "PlayBook"},
mustNotContains: []string{
"Mobile ",
"C6802", // Xperia Z Android (which is a phone) does not include Mobile in UA-string so without this is seen as a tablet
"Windows Phone",
},
}
phone = &itemSpec{
name: "Phone",
mustContains: []string{
"iPhone",
"Android",
"Windows Phone",
"BB10",
"BlackBerry",
},
mustNotContains: []string{},
}
car = &itemSpec{
name: "Car",
mustContains: []string{
"QtCarBrowser",
},
mustNotContains: []string{},
}
smartTv = &itemSpec{
name: "SmartTV",
mustContains: []string{
"SMART-TV",
"AppleTV",
"CrKey",
"Large Screen",
"HbbTV",
"LG Browser",
"PhilipsTV",
"Opera TV",
"PlayStation",
},
mustNotContains: []string{},
}
_DEVICETYPES = []*itemSpec{
tablet,
phone,
car,
smartTv,
desktop,
}
)