line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAttribute::Plugin::Display; |
2
|
1
|
|
|
1
|
|
590
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
4
|
use base qw/HTTP::MobileAttribute::Plugin/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
1
|
|
|
1
|
|
7
|
use HTTP::MobileAttribute; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub thirdforce :CarrierMethod('ThirdForce', 'display') { |
8
|
1
|
|
|
1
|
0
|
8
|
my ($self, $c) = @_; |
9
|
1
|
|
|
|
|
3
|
my $request = $c->request; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
5
|
my($width, $height) = split /\*/, $request->get('x-jphone-display'); |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
2
|
my($color, $depth); |
14
|
1
|
50
|
|
|
|
4
|
if (my $c_str = $request->get('x-jphone-color')) { |
15
|
1
|
|
|
|
|
6
|
($color, $depth) = $c_str =~ /^([CG])(\d+)$/; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
25
|
return HTTP::MobileAttribute::Plugin::Display::Display->new(+{ |
19
|
|
|
|
|
|
|
width => $width, |
20
|
|
|
|
|
|
|
height => $height, |
21
|
|
|
|
|
|
|
color => $color eq 'C', |
22
|
|
|
|
|
|
|
depth => $depth, |
23
|
|
|
|
|
|
|
}); |
24
|
1
|
|
|
1
|
|
1050
|
} |
|
1
|
|
|
|
|
1234
|
|
|
1
|
|
|
|
|
5
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub ezweb :CarrierMethod('EZweb', 'display') { |
27
|
2
|
|
|
2
|
0
|
17
|
my ($self, $c) = @_; |
28
|
2
|
|
|
|
|
7
|
my $request = $c->request; |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
7
|
my ( $width, $height ) = split /,/, $request->get('x-up-devcap-screenpixels'); |
31
|
2
|
|
|
|
|
8
|
my $depth = ( split /,/, $request->get('x-up-devcap-screendepth') )[0]; |
32
|
2
|
|
|
|
|
5
|
my $color = $request->get('x-up-devcap-iscolor'); |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
66
|
|
|
30
|
return HTTP::MobileAttribute::Plugin::Display::Display->new(+{ |
35
|
|
|
|
|
|
|
width => $width, |
36
|
|
|
|
|
|
|
height => $height, |
37
|
|
|
|
|
|
|
color => ( defined $color && $color eq '1' ), |
38
|
|
|
|
|
|
|
depth => 2**$depth, |
39
|
|
|
|
|
|
|
}); |
40
|
1
|
|
|
1
|
|
372
|
} |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub docomo :CarrierMethod('DoCoMo', 'display') { |
43
|
5
|
|
|
5
|
0
|
49
|
my ($self, $c) = @_; |
44
|
5
|
|
|
|
|
35
|
return HTTP::MobileAttribute::Plugin::Display::Display->new($self->config->{DoCoMoMap}->{ uc( $c->model ) }); |
45
|
1
|
|
|
1
|
|
196
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package HTTP::MobileAttribute::Plugin::Display::Display; |
48
|
1
|
|
|
1
|
|
172
|
use base qw/Class::Accessor::Fast/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
49
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/width height color depth/); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
__END__ |