line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAgent::Flash; |
2
|
3
|
|
|
3
|
|
121854
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
90
|
|
3
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
95
|
|
4
|
3
|
|
|
3
|
|
16
|
use vars qw($VERSION); |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
124
|
|
5
|
|
|
|
|
|
|
$VERSION = '0.20'; |
6
|
3
|
|
|
3
|
|
82
|
use 5.008001; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
115
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
17
|
use HTTP::MobileAgent; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
56
|
|
9
|
3
|
|
|
3
|
|
2371
|
use HTTP::MobileAgent::Flash::DoCoMoFlashMap; |
|
3
|
|
|
|
|
13
|
|
|
3
|
|
|
|
|
339
|
|
10
|
3
|
|
|
3
|
|
2523
|
use HTTP::MobileAgent::Flash::EZWebFlashMap; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
289
|
|
11
|
3
|
|
|
3
|
|
2331
|
use HTTP::MobileAgent::Flash::SoftBankFlashMap; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
231
|
|
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
17
|
use Carp; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
221
|
|
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
16
|
use base qw(Class::Accessor); |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
1861
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors(qw(max_file_size version width height)); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import { |
19
|
3
|
|
|
3
|
|
29
|
my $class = shift; |
20
|
3
|
|
|
3
|
|
7895
|
no strict 'refs'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1246
|
|
21
|
3
|
|
|
|
|
7
|
*{"HTTP\::MobileAgent\::flash"} = \&_flash; |
|
3
|
|
|
|
|
56
|
|
22
|
3
|
|
|
|
|
8
|
*{"HTTP\::MobileAgent\::is_flash"} = \&_is_flash; |
|
3
|
|
|
|
|
64
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _flash { |
26
|
49
|
|
|
49
|
|
20445
|
my $self = shift; |
27
|
49
|
100
|
|
|
|
139
|
unless ($self->{flash}) { |
28
|
15
|
|
|
|
|
57
|
$self->{flash} = HTTP::MobileAgent::Flash->new($self); |
29
|
|
|
|
|
|
|
} |
30
|
49
|
|
|
|
|
184
|
return $self->{flash}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _is_flash { |
34
|
15
|
|
|
15
|
|
76533
|
my $self = shift; |
35
|
15
|
100
|
|
|
|
60
|
return ($self->flash->version > 0)? 1 : 0; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub new { |
39
|
15
|
|
|
15
|
1
|
24
|
my ($class, $agent) = @_; |
40
|
|
|
|
|
|
|
|
41
|
15
|
|
|
|
|
18
|
my $map; |
42
|
15
|
100
|
|
|
|
76
|
if ($agent->is_docomo) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
43
|
5
|
|
|
|
|
31
|
$map = $HTTP::MobileAgent::Flash::DoCoMoFlashMap::FLASH_MAP->{uc($agent->model)}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
elsif ($agent->is_ezweb) { |
46
|
7
|
|
|
|
|
86
|
$map = $HTTP::MobileAgent::Flash::EZWebFlashMap::FLASH_MAP->{uc($agent->model)}; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
elsif ($agent->is_softbank) { |
49
|
1
|
|
|
|
|
41
|
$map = $HTTP::MobileAgent::Flash::SoftBankFlashMap::FLASH_MAP->{uc($agent->model)}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
15
|
100
|
|
|
|
134
|
if ($map) { |
53
|
9
|
|
|
|
|
45
|
return bless $map, $class; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else { |
56
|
6
|
|
|
|
|
39
|
return bless { |
57
|
|
|
|
|
|
|
max_file_size => -1, |
58
|
|
|
|
|
|
|
version => -1, |
59
|
|
|
|
|
|
|
width => -1, |
60
|
|
|
|
|
|
|
height => -1, |
61
|
|
|
|
|
|
|
}, $class; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub is_supported { |
66
|
7
|
|
|
7
|
1
|
10
|
my $self = shift; |
67
|
7
|
|
50
|
|
|
18
|
my $version = shift || ""; |
68
|
|
|
|
|
|
|
|
69
|
7
|
50
|
|
|
|
18
|
croak "You must set version before call is_supported()" if ($version eq ""); |
70
|
|
|
|
|
|
|
|
71
|
7
|
|
|
|
|
10
|
$version =~ s/Lite//ig; |
72
|
7
|
100
|
|
|
|
16
|
return ($version <= $self->version)? 1 : 0; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |
76
|
|
|
|
|
|
|
__END__ |