line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAttribute::Plugin::GPS; |
2
|
7
|
|
|
7
|
|
5493
|
use strict; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
264
|
|
3
|
7
|
|
|
7
|
|
41
|
use warnings; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
244
|
|
4
|
7
|
|
|
7
|
|
44
|
use base qw/HTTP::MobileAttribute::Plugin/; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
1113
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->depends([qw/IS::ThirdForce/]); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $DoCoMoGPSModels = { map { $_ => 1 } qw(F661i F505iGPS) }; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# only for backward compatiblity |
11
|
|
|
|
|
|
|
sub is_gps : CarrierMethod('DoCoMo') { |
12
|
2
|
|
|
2
|
1
|
15
|
my ($self, $c) = @_; |
13
|
2
|
|
|
|
|
275
|
warn "THIS METHOD IS OBSOLETE. DO NOT USE THIS."; |
14
|
2
|
|
|
|
|
14
|
return exists $DoCoMoGPSModels->{ $c->model }; |
15
|
7
|
|
|
7
|
|
2467
|
} |
|
7
|
|
|
|
|
3245
|
|
|
7
|
|
|
|
|
59
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# ------------------------------------------------------------------------- |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $DOCOMO_GPS_COMPLIANT_MODELS = qr/(?:903i(?!TV|X)|(?:90[4-6]|SA[78]0[02])i)/; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub gc_i :CarrierMethod('DoCoMo', 'gps_compliant') { |
22
|
20
|
|
|
20
|
0
|
165
|
my ($self, $c) = @_; |
23
|
20
|
|
66
|
|
|
79
|
return $c->model && ($c->model =~ $DOCOMO_GPS_COMPLIANT_MODELS); |
24
|
7
|
|
|
7
|
|
3481
|
} |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
107
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub gc_e :CarrierMethod('EZweb', 'gps_compliant') { |
27
|
14
|
|
|
14
|
0
|
95
|
my ($self, $c) = @_; |
28
|
14
|
|
100
|
|
|
67
|
my @specs = split //, $c->request->get('x-up-devcap-multimedia') || ''; |
29
|
14
|
|
66
|
|
|
124
|
return defined $specs[ 1 ] && $specs[ 1 ] =~ /^[23]$/; |
30
|
7
|
|
|
7
|
|
2587
|
} |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
38
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub gc_v :CarrierMethod('ThirdForce', 'gps_compliant') { |
33
|
14
|
|
|
14
|
0
|
93
|
my ($self, $c) = @_; |
34
|
14
|
|
|
|
|
183
|
return $c->is_type_3gc; |
35
|
7
|
|
|
7
|
|
1887
|
} |
|
7
|
|
|
|
|
25
|
|
|
7
|
|
|
|
|
34
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub gc_h :CarrierMethod('AirHPhone', 'gps_compliant') { |
38
|
7
|
|
|
7
|
0
|
76
|
return 0; # does not supported. |
39
|
7
|
|
|
7
|
|
1695
|
} |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
62
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
__END__ |