line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAgent::EZweb; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
41
|
use strict; |
|
10
|
|
|
|
|
14
|
|
|
10
|
|
|
|
|
327
|
|
4
|
10
|
|
|
10
|
|
44
|
use vars qw($VERSION); |
|
10
|
|
|
|
|
127
|
|
|
10
|
|
|
|
|
524
|
|
5
|
|
|
|
|
|
|
$VERSION = 0.20; |
6
|
|
|
|
|
|
|
|
7
|
10
|
|
|
10
|
|
48
|
use base qw(HTTP::MobileAgent); |
|
10
|
|
|
|
|
11
|
|
|
10
|
|
|
|
|
10253
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->make_accessors( |
10
|
|
|
|
|
|
|
qw(version model device_id server xhtml_compliant comment) |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
164
|
|
|
164
|
1
|
510
|
sub is_ezweb { 1 } |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
0
|
1
|
0
|
sub carrier { 'E' } |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
0
|
1
|
0
|
sub carrier_longname { 'EZweb' } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub is_tuka { |
20
|
6
|
|
|
6
|
1
|
6
|
my $self = shift; |
21
|
6
|
|
|
|
|
13
|
my $tuka = substr($self->device_id, 2, 1); |
22
|
6
|
100
|
|
|
|
11
|
if($self->is_wap2){ |
23
|
3
|
100
|
|
|
|
7
|
return 1 if $tuka eq 'U'; |
24
|
|
|
|
|
|
|
} else { |
25
|
3
|
100
|
|
|
|
9
|
return 1 if $tuka eq 'T'; |
26
|
|
|
|
|
|
|
} |
27
|
4
|
|
|
|
|
8
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub is_win { |
31
|
6
|
|
|
6
|
1
|
935
|
my $self = shift; |
32
|
6
|
|
|
|
|
12
|
my $win = substr($self->device_id, 2, 1); |
33
|
6
|
100
|
|
|
|
18
|
$win eq '3' ? 1 : 0; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub parse { |
37
|
151
|
|
|
151
|
0
|
111
|
my $self = shift; |
38
|
151
|
|
|
|
|
252
|
my $ua = $self->user_agent; |
39
|
151
|
100
|
|
|
|
277
|
if ($ua =~ s/^KDDI\-//) { |
40
|
|
|
|
|
|
|
# KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1 |
41
|
30
|
|
|
|
|
37
|
$self->{xhtml_compliant} = 1; |
42
|
30
|
|
|
|
|
76
|
my($device, $browser, $opt, $server) = split / /, $ua, 4; |
43
|
30
|
|
|
|
|
41
|
$self->{device_id} = $device; |
44
|
|
|
|
|
|
|
|
45
|
30
|
|
|
|
|
43
|
my($name, $version) = split m!/!, $browser; |
46
|
30
|
|
|
|
|
27
|
$self->{name} = $name; |
47
|
30
|
|
|
|
|
42
|
$self->{version} = "$version $opt"; |
48
|
30
|
|
|
|
|
41
|
$self->{server} = $server; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
else { |
51
|
|
|
|
|
|
|
# UP.Browser/3.01-HI01 UP.Link/3.4.5.2 |
52
|
121
|
|
|
|
|
274
|
my($browser, $server, $comment) = split / /, $ua, 3; |
53
|
121
|
|
|
|
|
169
|
my($name, $software) = split m!/!, $browser; |
54
|
121
|
|
|
|
|
117
|
$self->{name} = $name; |
55
|
121
|
|
|
|
|
127
|
@{$self}{qw(version device_id)} = split /-/, $software; |
|
121
|
|
|
|
|
165
|
|
56
|
121
|
|
|
|
|
130
|
$self->{server} = $server; |
57
|
121
|
100
|
|
|
|
203
|
if ($comment) { |
58
|
6
|
|
|
|
|
30
|
$comment =~ s/^\((.*)\)$/$1/; |
59
|
6
|
|
|
|
|
13
|
$self->{comment} = $comment; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
} |
62
|
151
|
|
|
|
|
248
|
$self->{model} = $self->{device_id}; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub _make_display { |
66
|
2
|
|
|
2
|
|
3
|
my $self = shift; |
67
|
2
|
|
|
|
|
5
|
my($width, $height) = split /,/, $self->get_header('x-up-devcap-screenpixels'); |
68
|
2
|
|
|
|
|
7
|
my $depth = (split /,/, $self->get_header('x-up-devcap-screendepth'))[0]; |
69
|
2
|
|
|
|
|
5
|
my $color = $self->get_header('x-up-devcap-iscolor'); |
70
|
2
|
|
66
|
|
|
25
|
return HTTP::MobileAgent::Display->new( |
71
|
|
|
|
|
|
|
width => $width, |
72
|
|
|
|
|
|
|
height => $height, |
73
|
|
|
|
|
|
|
color => (defined $color && $color eq '1'), |
74
|
|
|
|
|
|
|
depth => 2 ** $depth, |
75
|
|
|
|
|
|
|
); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
__END__ |