line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAgent::Plugin::Location::Support; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
79505
|
use warnings; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
348
|
|
4
|
9
|
|
|
9
|
|
46
|
use strict; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
271
|
|
5
|
9
|
|
|
9
|
|
49
|
use Carp; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
814
|
|
6
|
9
|
|
|
9
|
|
9958
|
use HTTP::MobileAgent; |
|
9
|
|
|
|
|
236328
|
|
|
9
|
|
|
|
|
296
|
|
7
|
|
|
|
|
|
|
|
8
|
9
|
|
|
9
|
|
7043
|
use version; our $VERSION = qv('0.0.3'); |
|
9
|
|
|
|
|
27356
|
|
|
9
|
|
|
|
|
56
|
|
9
|
9
|
|
|
9
|
|
817
|
use vars qw($GPSModels); |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
8007
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $denv = $ENV{"DOCOMO_GPSMODELS"}; |
12
|
|
|
|
|
|
|
my $senv = $ENV{"SOFTBANK_GPSMODELS"}; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$GPSModels = { |
15
|
|
|
|
|
|
|
map { $_ => 1 } ($denv ? split(/\n/,$denv) : qw( |
16
|
|
|
|
|
|
|
F661i |
17
|
|
|
|
|
|
|
F505iGPS |
18
|
|
|
|
|
|
|
D905i |
19
|
|
|
|
|
|
|
F905i |
20
|
|
|
|
|
|
|
N905i |
21
|
|
|
|
|
|
|
P905i |
22
|
|
|
|
|
|
|
SH905i |
23
|
|
|
|
|
|
|
SO905i |
24
|
|
|
|
|
|
|
N905imyu |
25
|
|
|
|
|
|
|
F883iES |
26
|
|
|
|
|
|
|
F883iESS |
27
|
|
|
|
|
|
|
D904i |
28
|
|
|
|
|
|
|
F904i |
29
|
|
|
|
|
|
|
N904i |
30
|
|
|
|
|
|
|
P904i |
31
|
|
|
|
|
|
|
SH904i |
32
|
|
|
|
|
|
|
D903i |
33
|
|
|
|
|
|
|
F903i |
34
|
|
|
|
|
|
|
F903iBSC |
35
|
|
|
|
|
|
|
N903i |
36
|
|
|
|
|
|
|
P903i |
37
|
|
|
|
|
|
|
SO903i |
38
|
|
|
|
|
|
|
SH903i |
39
|
|
|
|
|
|
|
SA800i |
40
|
|
|
|
|
|
|
F801i |
41
|
|
|
|
|
|
|
SO905iCS |
42
|
|
|
|
|
|
|
)), |
43
|
|
|
|
|
|
|
map { $_ => 1 } ($senv ? split(/\n/,$senv) : qw( |
44
|
|
|
|
|
|
|
910T |
45
|
|
|
|
|
|
|
810T |
46
|
|
|
|
|
|
|
811T |
47
|
|
|
|
|
|
|
812T |
48
|
|
|
|
|
|
|
813T |
49
|
|
|
|
|
|
|
911T |
50
|
|
|
|
|
|
|
912T |
51
|
|
|
|
|
|
|
923SH |
52
|
|
|
|
|
|
|
921P |
53
|
|
|
|
|
|
|
921T |
54
|
|
|
|
|
|
|
920P |
55
|
|
|
|
|
|
|
920T |
56
|
|
|
|
|
|
|
824T |
57
|
|
|
|
|
|
|
823T |
58
|
|
|
|
|
|
|
821T |
59
|
|
|
|
|
|
|
820T |
60
|
|
|
|
|
|
|
V903T |
61
|
|
|
|
|
|
|
V904T |
62
|
|
|
|
|
|
|
V904SH |
63
|
|
|
|
|
|
|
)), |
64
|
|
|
|
|
|
|
map { $_ => 0 } qw(V703N V702NK2 V702NK V802N V702sMO V702MO), |
65
|
|
|
|
|
|
|
}; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
########################################## |
68
|
|
|
|
|
|
|
# Base Module |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
package # hide from PAUSE |
71
|
|
|
|
|
|
|
HTTP::MobileAgent; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub support_location{ |
74
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
75
|
0
|
|
0
|
|
|
0
|
return $self->support_gps || $self->support_sector || $self->support_area; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub support_gps{ |
79
|
15
|
100
|
|
15
|
0
|
57
|
$HTTP::MobileAgent::Plugin::Location::Support::GPSModels->{$_[0]->model} ? 1 : 0; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
0
|
0
|
0
|
sub support_sector{ 0 } |
83
|
|
|
|
|
|
|
|
84
|
2
|
|
|
2
|
0
|
3135
|
sub support_area{ 0 } |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
########################################## |
87
|
|
|
|
|
|
|
# DoCoMo Module |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
package # hide from PAUSE |
90
|
|
|
|
|
|
|
HTTP::MobileAgent::DoCoMo; |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub support_gps{ |
93
|
17
|
|
|
17
|
0
|
61
|
my $model = $_[0]->model; |
94
|
17
|
100
|
100
|
|
|
161
|
return 1 if ( $model =~ /90[5-9]/ && $model !~ /TV/ ); |
95
|
15
|
100
|
|
|
|
58
|
return 1 if ( $model =~ /88[4-9]/ ); |
96
|
13
|
|
|
|
|
53
|
return $_[0]->SUPER::support_gps(@_); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub support_sector { |
100
|
17
|
100
|
66
|
17
|
0
|
67
|
$_[0]->is_foma && (!$_[0]->html_version || $_[0]->html_version >= 5.0) ? 1 : 0 |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
17
|
|
|
17
|
0
|
46914
|
sub support_area{ 1 } |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
########################################## |
106
|
|
|
|
|
|
|
# EZWeb Module |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
package # hide from PAUSE |
109
|
|
|
|
|
|
|
HTTP::MobileAgent::EZweb; |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
sub multimedia_location { |
112
|
0
|
0
|
|
0
|
0
|
0
|
my $dev = $_[0]->get_header('x-up-devcap-multimedia') or return 999; |
113
|
0
|
|
|
|
|
0
|
return (split(//,$dev))[1]; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub support_gps { |
117
|
0
|
0
|
|
0
|
0
|
0
|
$_[0]->multimedia_location > 1 ? 1 : 0; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub support_sector { |
121
|
0
|
0
|
|
0
|
0
|
0
|
$_[0]->multimedia_location ? 1 : 0; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
########################################## |
125
|
|
|
|
|
|
|
# SoftBank Module |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
package # hide from PAUSE |
128
|
|
|
|
|
|
|
HTTP::MobileAgent::Vodafone; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub support_sector{ |
131
|
2
|
|
|
2
|
0
|
5
|
my $self = shift; |
132
|
|
|
|
|
|
|
|
133
|
2
|
50
|
|
|
|
16
|
if ($self->is_type_3gc) { |
134
|
2
|
|
|
|
|
23
|
my $dat = $HTTP::MobileAgent::Plugin::Location::Support::GPSModels->{$self->model}; |
135
|
2
|
50
|
66
|
|
|
29
|
return (defined($dat) && $dat == 0) ? 0 : 1; |
136
|
|
|
|
|
|
|
} else { |
137
|
0
|
|
|
|
|
|
my $version = $self->version; |
138
|
|
|
|
|
|
|
|
139
|
0
|
0
|
|
|
|
|
return 0 if ($version >= 5.0); # VGS is not support Station |
140
|
0
|
0
|
|
|
|
|
return 1 if ($version > 3.0); # Browser version more than 3.0 is support Station |
141
|
0
|
0
|
|
|
|
|
return 0 if ($version < 3.0); # Browser version less than 3.0 is not support Station |
142
|
0
|
0
|
|
|
|
|
return 1 if ($self->get_header('x-jphone-java')); |
143
|
|
|
|
|
|
|
# All {browser 3.0 and support Java} are support Station |
144
|
|
|
|
|
|
|
|
145
|
0
|
0
|
|
|
|
|
return 0 if ($self->model =~ /^((J-N03)|(J-SH05)|(J-SH04B)|(J-SH04)|(J-PE03)|(J-D03)|(J-K03))/); |
146
|
0
|
|
|
|
|
|
return 1; |
147
|
|
|
|
|
|
|
} |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
########################################## |
151
|
|
|
|
|
|
|
# WILLCOM Module |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
package # hide from PAUSE |
154
|
|
|
|
|
|
|
HTTP::MobileAgent::AirHPhone; |
155
|
|
|
|
|
|
|
|
156
|
0
|
|
|
0
|
0
|
|
sub support_sector{ 1 } |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
159
|
|
|
|
|
|
|
__END__ |