jpmobile 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/README +8 -5
- data/Rakefile +6 -7
- data/lib/jpmobile.rb +12 -2
- data/lib/jpmobile/email.rb +19 -0
- data/lib/jpmobile/filter.rb +1 -15
- data/lib/jpmobile/helpers.rb +76 -34
- data/lib/jpmobile/hook_action_controller.rb +1 -0
- data/lib/jpmobile/hook_action_view.rb +79 -28
- data/lib/jpmobile/mobile/abstract_mobile.rb +13 -1
- data/lib/jpmobile/mobile/au.rb +2 -0
- data/lib/jpmobile/mobile/docomo.rb +3 -1
- data/lib/jpmobile/mobile/emobile.rb +2 -0
- data/lib/jpmobile/mobile/softbank.rb +7 -1
- data/lib/jpmobile/mobile/willcom.rb +4 -0
- data/lib/jpmobile/mobile/z_display_info_docomo.rb +85 -2
- data/lib/jpmobile/mobile/z_ip_addresses_au.rb +40 -25
- data/lib/jpmobile/mobile/z_ip_addresses_docomo.rb +3 -1
- data/lib/jpmobile/mobile/z_ip_addresses_willcom.rb +97 -76
- data/lib/jpmobile/position.rb +8 -2
- data/lib/jpmobile/request_with_mobile.rb +1 -1
- data/lib/jpmobile/util.rb +21 -0
- data/lib/jpmobile/version.rb +1 -1
- data/test/au_test.rb +1 -1
- data/tools/update_display_info_docomo.rb +1 -0
- data/tools/update_ip_addresses_willcom.rb +2 -1
- metadata +36 -82
- data/doc/classes/ActionController.html +0 -120
- data/doc/classes/ActionController/AbstractRequest.html +0 -118
- data/doc/classes/ActionController/CgiRequest.html +0 -160
- data/doc/classes/ActionView.html +0 -101
- data/doc/classes/DatumConv.html +0 -324
- data/doc/classes/Jpmobile/Display.html +0 -333
- data/doc/classes/Jpmobile/Emoticon.html +0 -467
- data/doc/classes/Jpmobile/Filter.html +0 -120
- data/doc/classes/Jpmobile/Filter/ApplyOnlyForMobile.html +0 -172
- data/doc/classes/Jpmobile/Filter/Base.html +0 -269
- data/doc/classes/Jpmobile/Filter/Emoticon.html +0 -118
- data/doc/classes/Jpmobile/Filter/Emoticon/Inner.html +0 -184
- data/doc/classes/Jpmobile/Filter/Emoticon/Outer.html +0 -207
- data/doc/classes/Jpmobile/Filter/FilterTable.html +0 -178
- data/doc/classes/Jpmobile/Filter/HankakuKana.html +0 -126
- data/doc/classes/Jpmobile/Filter/Sjis.html +0 -271
- data/doc/classes/Jpmobile/Helpers.html +0 -588
- data/doc/classes/Jpmobile/Mobile.html +0 -150
- data/doc/classes/Jpmobile/Mobile/AbstractMobile.html +0 -389
- data/doc/classes/Jpmobile/Mobile/Au.html +0 -420
- data/doc/classes/Jpmobile/Mobile/Ddipocket.html +0 -138
- data/doc/classes/Jpmobile/Mobile/Docomo.html +0 -411
- data/doc/classes/Jpmobile/Mobile/Emobile.html +0 -183
- data/doc/classes/Jpmobile/Mobile/Jphone.html +0 -212
- data/doc/classes/Jpmobile/Mobile/Softbank.html +0 -344
- data/doc/classes/Jpmobile/Mobile/Vodafone.html +0 -176
- data/doc/classes/Jpmobile/Mobile/Willcom.html +0 -211
- data/doc/classes/Jpmobile/Position.html +0 -384
- data/doc/classes/Jpmobile/RequestWithMobile.html +0 -263
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -110
- data/doc/files/README.html +0 -455
- data/doc/files/lib/jpmobile/datum_conv_rb.html +0 -110
- data/doc/files/lib/jpmobile/emoticon/au_rb.html +0 -124
- data/doc/files/lib/jpmobile/emoticon/conversion_table_rb.html +0 -124
- data/doc/files/lib/jpmobile/emoticon/docomo_rb.html +0 -119
- data/doc/files/lib/jpmobile/emoticon/softbank_rb.html +0 -119
- data/doc/files/lib/jpmobile/emoticon/z_combine_rb.html +0 -101
- data/doc/files/lib/jpmobile/emoticon_rb.html +0 -101
- data/doc/files/lib/jpmobile/filter_rb.html +0 -115
- data/doc/files/lib/jpmobile/helpers_rb.html +0 -105
- data/doc/files/lib/jpmobile/hook_abstract_request_rb.html +0 -108
- data/doc/files/lib/jpmobile/hook_action_controller_rb.html +0 -101
- data/doc/files/lib/jpmobile/hook_action_view_rb.html +0 -110
- data/doc/files/lib/jpmobile/mobile/abstract_mobile_rb.html +0 -108
- data/doc/files/lib/jpmobile/mobile/au_rb.html +0 -112
- data/doc/files/lib/jpmobile/mobile/display_rb.html +0 -111
- data/doc/files/lib/jpmobile/mobile/docomo_rb.html +0 -105
- data/doc/files/lib/jpmobile/mobile/emobile_rb.html +0 -105
- data/doc/files/lib/jpmobile/mobile/softbank_rb.html +0 -115
- data/doc/files/lib/jpmobile/mobile/willcom_rb.html +0 -108
- data/doc/files/lib/jpmobile/mobile/z_display_info_docomo_rb.html +0 -114
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_au_rb.html +0 -114
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_docomo_rb.html +0 -124
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_emobile_rb.html +0 -111
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_softbank_rb.html +0 -124
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_willcom_rb.html +0 -114
- data/doc/files/lib/jpmobile/position_rb.html +0 -105
- data/doc/files/lib/jpmobile/request_with_mobile_rb.html +0 -111
- data/doc/files/lib/jpmobile/trans_sid_rb.html +0 -118
- data/doc/files/lib/jpmobile/version_rb.html +0 -101
- data/doc/files/lib/jpmobile_rb.html +0 -101
- data/doc/fr_class_index.html +0 -55
- data/doc/fr_file_index.html +0 -58
- data/doc/fr_method_index.html +0 -134
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,420 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding=" UTF-8"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Jpmobile::Mobile::Au</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset= UTF-8" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Jpmobile::Mobile::Au</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/jpmobile/mobile/au_rb.html">
|
59
|
-
lib/jpmobile/mobile/au.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="AbstractMobile.html">
|
69
|
-
AbstractMobile
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<h2>au携帯電話</h2>
|
85
|
-
<p>
|
86
|
-
CDMA 1X, CDMA 1X WINを含む。
|
87
|
-
</p>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div id="method-list">
|
95
|
-
<h3 class="section-bar">Methods</h3>
|
96
|
-
|
97
|
-
<div class="name-list">
|
98
|
-
<a href="#M000048">device_id</a>
|
99
|
-
<a href="#M000047">display</a>
|
100
|
-
<a href="#M000045">ident_subscriber</a>
|
101
|
-
<a href="#M000046">position</a>
|
102
|
-
<a href="#M000044">subno</a>
|
103
|
-
<a href="#M000051">supports_cookie?</a>
|
104
|
-
<a href="#M000050">supports_gps?</a>
|
105
|
-
<a href="#M000049">supports_location?</a>
|
106
|
-
</div>
|
107
|
-
</div>
|
108
|
-
|
109
|
-
</div>
|
110
|
-
|
111
|
-
|
112
|
-
<!-- if includes -->
|
113
|
-
|
114
|
-
<div id="section">
|
115
|
-
|
116
|
-
|
117
|
-
<div id="constants-list">
|
118
|
-
<h3 class="section-bar">Constants</h3>
|
119
|
-
|
120
|
-
<div class="name-list">
|
121
|
-
<table summary="Constants">
|
122
|
-
<tr class="top-aligned-row context-row">
|
123
|
-
<td class="context-item-name">USER_AGENT_REGEXP</td>
|
124
|
-
<td>=</td>
|
125
|
-
<td class="context-item-value">/^(?:KDDI|UP.Browser\/.+?)-(.+?) /</td>
|
126
|
-
<td width="3em"> </td>
|
127
|
-
<td class="context-item-desc">
|
128
|
-
対応するUser-Agentの正規表現 User-Agent文字列中に
|
129
|
-
"UP.Browser" を含む<a
|
130
|
-
href="Vodafone.html">Vodafone</a>の端末があるので注意が必要
|
131
|
-
|
132
|
-
</td>
|
133
|
-
</tr>
|
134
|
-
<tr class="top-aligned-row context-row">
|
135
|
-
<td class="context-item-name">LOCATION_UNSUPPORTED_DEVICE_ID</td>
|
136
|
-
<td>=</td>
|
137
|
-
<td class="context-item-value">["PT21", "TS25", "KCTE", "TST9", "KCU1", "SYT5", "KCTD", "TST8", "TST7", "KCTC", "SYT4", "KCTB", "KCTA", "TST6", "KCT9", "TST5", "TST4", "KCT8", "SYT3", "KCT7", "MIT1", "MAT3", "KCT6", "TST3", "KCT5", "KCT4", "SYT2", "MAT1", "MAT2", "TST2", "KCT3", "KCT2", "KCT1", "TST1", "SYT1"]</td>
|
138
|
-
<td width="3em"> </td>
|
139
|
-
<td class="context-item-desc">
|
140
|
-
簡易位置情報取得に対応していないデバイスID <a
|
141
|
-
href="http://www.au.kddi.com/ezfactory/tec/spec/eznavi.html">www.au.kddi.com/ezfactory/tec/spec/eznavi.html</a>
|
142
|
-
|
143
|
-
</td>
|
144
|
-
</tr>
|
145
|
-
<tr class="top-aligned-row context-row">
|
146
|
-
<td class="context-item-name">GPS_UNSUPPORTED_DEVICE_ID</td>
|
147
|
-
<td>=</td>
|
148
|
-
<td class="context-item-value">["PT21", "KC26", "SN28", "SN26", "KC23", "SA28", "TS25", "SA25", "SA24", "SN23", "ST14", "KC15", "SN22", "KC14", "ST13", "SN17", "SY15", "CA14", "HI14", "TS14", "KC13", "SN15", "SN16", "SY14", "ST12", "TS13", "CA13", "MA13", "HI13", "SN13", "SY13", "SN12", "SN14", "ST11", "DN11", "SY12", "KCTE", "TST9", "KCU1", "SYT5", "KCTD", "TST8", "TST7", "KCTC", "SYT4", "KCTB", "KCTA", "TST6", "KCT9", "TST5", "TST4", "KCT8", "SYT3", "KCT7", "MIT1", "MAT3", "KCT6", "TST3", "KCT5", "KCT4", "SYT2", "MAT1", "MAT2", "TST2", "KCT3", "KCT2", "KCT1", "TST1", "SYT1"]</td>
|
149
|
-
<td width="3em"> </td>
|
150
|
-
<td class="context-item-desc">
|
151
|
-
GPS取得に対応していないデバイスID
|
152
|
-
|
153
|
-
</td>
|
154
|
-
</tr>
|
155
|
-
</table>
|
156
|
-
</div>
|
157
|
-
</div>
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<!-- if method_list -->
|
165
|
-
<div id="methods">
|
166
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
167
|
-
|
168
|
-
<div id="method-M000048" class="method-detail">
|
169
|
-
<a name="M000048"></a>
|
170
|
-
|
171
|
-
<div class="method-heading">
|
172
|
-
<a href="#M000048" class="method-signature">
|
173
|
-
<span class="method-name">device_id</span><span class="method-args">()</span>
|
174
|
-
</a>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
<div class="method-description">
|
178
|
-
<p>
|
179
|
-
デバイスIDを返す
|
180
|
-
</p>
|
181
|
-
<p><a class="source-toggle" href="#"
|
182
|
-
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
183
|
-
<div class="method-source-code" id="M000048-source">
|
184
|
-
<pre>
|
185
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 72</span>
|
186
|
-
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">device_id</span>
|
187
|
-
73: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_USER_AGENT'</span>] <span class="ruby-operator">=~</span> <span class="ruby-constant">USER_AGENT_REGEXP</span>
|
188
|
-
74: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
|
189
|
-
75: <span class="ruby-keyword kw">else</span>
|
190
|
-
76: <span class="ruby-keyword kw">nil</span>
|
191
|
-
77: <span class="ruby-keyword kw">end</span>
|
192
|
-
78: <span class="ruby-keyword kw">end</span>
|
193
|
-
</pre>
|
194
|
-
</div>
|
195
|
-
</div>
|
196
|
-
</div>
|
197
|
-
|
198
|
-
<div id="method-M000047" class="method-detail">
|
199
|
-
<a name="M000047"></a>
|
200
|
-
|
201
|
-
<div class="method-heading">
|
202
|
-
<a href="#M000047" class="method-signature">
|
203
|
-
<span class="method-name">display</span><span class="method-args">()</span>
|
204
|
-
</a>
|
205
|
-
</div>
|
206
|
-
|
207
|
-
<div class="method-description">
|
208
|
-
<p>
|
209
|
-
画面情報を <tt><a href="../Display.html">Display</a></tt>
|
210
|
-
クラスのインスタンスで返す。
|
211
|
-
</p>
|
212
|
-
<p><a class="source-toggle" href="#"
|
213
|
-
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
214
|
-
<div class="method-source-code" id="M000047-source">
|
215
|
-
<pre>
|
216
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 54</span>
|
217
|
-
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display</span>
|
218
|
-
55: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__display</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@__display</span>
|
219
|
-
56:
|
220
|
-
57: <span class="ruby-identifier">p_w</span> = <span class="ruby-identifier">p_h</span> = <span class="ruby-identifier">col_p</span> = <span class="ruby-identifier">cols</span> = <span class="ruby-keyword kw">nil</span>
|
221
|
-
58: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_UP_DEVCAP_SCREENPIXELS'</span>]
|
222
|
-
59: <span class="ruby-identifier">p_w</span>, <span class="ruby-identifier">p_h</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,/</span>,<span class="ruby-value">2</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">to_i</span>}
|
223
|
-
60: <span class="ruby-keyword kw">end</span>
|
224
|
-
61: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_UP_DEVCAP_ISCOLOR'</span>]
|
225
|
-
62: <span class="ruby-identifier">col_p</span> = (<span class="ruby-identifier">r</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'1'</span>)
|
226
|
-
63: <span class="ruby-keyword kw">end</span>
|
227
|
-
64: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_UP_DEVCAP_SCREENDEPTH'</span>]
|
228
|
-
65: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/,/</span>)
|
229
|
-
66: <span class="ruby-identifier">cols</span> = <span class="ruby-value">2</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">a</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_i</span>
|
230
|
-
67: <span class="ruby-keyword kw">end</span>
|
231
|
-
68: <span class="ruby-ivar">@__display</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Display</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">p_w</span>, <span class="ruby-identifier">p_h</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">col_p</span>, <span class="ruby-identifier">cols</span>)
|
232
|
-
69: <span class="ruby-keyword kw">end</span>
|
233
|
-
</pre>
|
234
|
-
</div>
|
235
|
-
</div>
|
236
|
-
</div>
|
237
|
-
|
238
|
-
<div id="method-M000045" class="method-detail">
|
239
|
-
<a name="M000045"></a>
|
240
|
-
|
241
|
-
<div class="method-heading">
|
242
|
-
<span class="method-name">ident_subscriber</span><span class="method-args">()</span>
|
243
|
-
</div>
|
244
|
-
|
245
|
-
<div class="method-description">
|
246
|
-
<p>
|
247
|
-
Alias for <a href="Au.html#M000044">subno</a>
|
248
|
-
</p>
|
249
|
-
</div>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
<div id="method-M000046" class="method-detail">
|
253
|
-
<a name="M000046"></a>
|
254
|
-
|
255
|
-
<div class="method-heading">
|
256
|
-
<a href="#M000046" class="method-signature">
|
257
|
-
<span class="method-name">position</span><span class="method-args">()</span>
|
258
|
-
</a>
|
259
|
-
</div>
|
260
|
-
|
261
|
-
<div class="method-description">
|
262
|
-
<p>
|
263
|
-
位置情報があれば <a href="../Position.html">Position</a>
|
264
|
-
のインスタンスを返す。無ければ <tt>nil</tt> を返す。
|
265
|
-
</p>
|
266
|
-
<p><a class="source-toggle" href="#"
|
267
|
-
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
268
|
-
<div class="method-source-code" id="M000046-source">
|
269
|
-
<pre>
|
270
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 27</span>
|
271
|
-
27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">position</span>
|
272
|
-
28: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__posotion</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-ivar">@__posotion</span>
|
273
|
-
29: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__posotion</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lat"</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">'lat'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lon"</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lon"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> )
|
274
|
-
30: <span class="ruby-identifier">l</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">new</span>
|
275
|
-
31: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">options</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span>[<span class="ruby-value str">"ver"</span>, <span class="ruby-value str">"datum"</span>, <span class="ruby-value str">"unit"</span>, <span class="ruby-value str">"lat"</span>, <span class="ruby-value str">"lon"</span>, <span class="ruby-value str">"alt"</span>, <span class="ruby-value str">"time"</span>, <span class="ruby-value str">"smaj"</span>, <span class="ruby-value str">"smin"</span>, <span class="ruby-value str">"vert"</span>, <span class="ruby-value str">"majaa"</span>, <span class="ruby-value str">"fm"</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">x</span>) }
|
276
|
-
32: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"unit"</span>]
|
277
|
-
33: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"1"</span>
|
278
|
-
34: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">lat</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lat"</span>].<span class="ruby-identifier">to_f</span>
|
279
|
-
35: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">lon</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lon"</span>].<span class="ruby-identifier">to_f</span>
|
280
|
-
36: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"0"</span>, <span class="ruby-value str">"dms"</span>
|
281
|
-
37: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Invalid dms form"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lat"</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([+-]?\d+)\.(\d+)\.(\d+\.\d+)$/</span>
|
282
|
-
38: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">lat</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">dms2deg</span>(<span class="ruby-identifier">$1</span>,<span class="ruby-identifier">$2</span>,<span class="ruby-identifier">$3</span>)
|
283
|
-
39: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Invalid dms form"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lon"</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([+-]?\d+)\.(\d+)\.(\d+\.\d+)$/</span>
|
284
|
-
40: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">lon</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">dms2deg</span>(<span class="ruby-identifier">$1</span>,<span class="ruby-identifier">$2</span>,<span class="ruby-identifier">$3</span>)
|
285
|
-
41: <span class="ruby-keyword kw">else</span>
|
286
|
-
42: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__posotion</span> = <span class="ruby-keyword kw">nil</span>
|
287
|
-
43: <span class="ruby-keyword kw">end</span>
|
288
|
-
44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"datum"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"1"</span>
|
289
|
-
45: <span class="ruby-comment cmt"># ただし、params["datum"]=="tokyo"のとき(簡易位置情報)のときは、</span>
|
290
|
-
46: <span class="ruby-comment cmt"># 実際にはWGS84系のデータが渡ってくる</span>
|
291
|
-
47: <span class="ruby-comment cmt"># http://www.au.kddi.com/ezfactory/tec/spec/eznavi.html</span>
|
292
|
-
48: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">tokyo2wgs84!</span>
|
293
|
-
49: <span class="ruby-keyword kw">end</span>
|
294
|
-
50: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__posotion</span> = <span class="ruby-identifier">l</span>
|
295
|
-
51: <span class="ruby-keyword kw">end</span>
|
296
|
-
</pre>
|
297
|
-
</div>
|
298
|
-
</div>
|
299
|
-
</div>
|
300
|
-
|
301
|
-
<div id="method-M000044" class="method-detail">
|
302
|
-
<a name="M000044"></a>
|
303
|
-
|
304
|
-
<div class="method-heading">
|
305
|
-
<a href="#M000044" class="method-signature">
|
306
|
-
<span class="method-name">subno</span><span class="method-args">()</span>
|
307
|
-
</a>
|
308
|
-
</div>
|
309
|
-
|
310
|
-
<div class="method-description">
|
311
|
-
<p>
|
312
|
-
EZ番号(サブスクライバID)があれば返す。無ければ
|
313
|
-
<tt>nil</tt> を返す。
|
314
|
-
</p>
|
315
|
-
<p><a class="source-toggle" href="#"
|
316
|
-
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
317
|
-
<div class="method-source-code" id="M000044-source">
|
318
|
-
<pre>
|
319
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 21</span>
|
320
|
-
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subno</span>
|
321
|
-
22: <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">"HTTP_X_UP_SUBNO"</span>]
|
322
|
-
23: <span class="ruby-keyword kw">end</span>
|
323
|
-
</pre>
|
324
|
-
</div>
|
325
|
-
</div>
|
326
|
-
</div>
|
327
|
-
|
328
|
-
<div id="method-M000051" class="method-detail">
|
329
|
-
<a name="M000051"></a>
|
330
|
-
|
331
|
-
<div class="method-heading">
|
332
|
-
<a href="#M000051" class="method-signature">
|
333
|
-
<span class="method-name">supports_cookie?</span><span class="method-args">()</span>
|
334
|
-
</a>
|
335
|
-
</div>
|
336
|
-
|
337
|
-
<div class="method-description">
|
338
|
-
<p>
|
339
|
-
cookieに対応しているか?
|
340
|
-
</p>
|
341
|
-
<p><a class="source-toggle" href="#"
|
342
|
-
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
343
|
-
<div class="method-source-code" id="M000051-source">
|
344
|
-
<pre>
|
345
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 91</span>
|
346
|
-
91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supports_cookie?</span>
|
347
|
-
92: <span class="ruby-keyword kw">true</span>
|
348
|
-
93: <span class="ruby-keyword kw">end</span>
|
349
|
-
</pre>
|
350
|
-
</div>
|
351
|
-
</div>
|
352
|
-
</div>
|
353
|
-
|
354
|
-
<div id="method-M000050" class="method-detail">
|
355
|
-
<a name="M000050"></a>
|
356
|
-
|
357
|
-
<div class="method-heading">
|
358
|
-
<a href="#M000050" class="method-signature">
|
359
|
-
<span class="method-name">supports_gps?</span><span class="method-args">()</span>
|
360
|
-
</a>
|
361
|
-
</div>
|
362
|
-
|
363
|
-
<div class="method-description">
|
364
|
-
<p>
|
365
|
-
GPS位置情報取得に対応している場合は <tt>true</tt>
|
366
|
-
を返す。
|
367
|
-
</p>
|
368
|
-
<p><a class="source-toggle" href="#"
|
369
|
-
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
370
|
-
<div class="method-source-code" id="M000050-source">
|
371
|
-
<pre>
|
372
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 86</span>
|
373
|
-
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supports_gps?</span>
|
374
|
-
87: <span class="ruby-operator">!</span> <span class="ruby-constant">GPS_UNSUPPORTED_DEVICE_ID</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">device_id</span>)
|
375
|
-
88: <span class="ruby-keyword kw">end</span>
|
376
|
-
</pre>
|
377
|
-
</div>
|
378
|
-
</div>
|
379
|
-
</div>
|
380
|
-
|
381
|
-
<div id="method-M000049" class="method-detail">
|
382
|
-
<a name="M000049"></a>
|
383
|
-
|
384
|
-
<div class="method-heading">
|
385
|
-
<a href="#M000049" class="method-signature">
|
386
|
-
<span class="method-name">supports_location?</span><span class="method-args">()</span>
|
387
|
-
</a>
|
388
|
-
</div>
|
389
|
-
|
390
|
-
<div class="method-description">
|
391
|
-
<p>
|
392
|
-
簡易位置情報取得に対応している場合は <tt>true</tt>
|
393
|
-
を返す。
|
394
|
-
</p>
|
395
|
-
<p><a class="source-toggle" href="#"
|
396
|
-
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
397
|
-
<div class="method-source-code" id="M000049-source">
|
398
|
-
<pre>
|
399
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/au.rb, line 81</span>
|
400
|
-
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supports_location?</span>
|
401
|
-
82: <span class="ruby-operator">!</span> <span class="ruby-constant">LOCATION_UNSUPPORTED_DEVICE_ID</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">device_id</span>)
|
402
|
-
83: <span class="ruby-keyword kw">end</span>
|
403
|
-
</pre>
|
404
|
-
</div>
|
405
|
-
</div>
|
406
|
-
</div>
|
407
|
-
|
408
|
-
|
409
|
-
</div>
|
410
|
-
|
411
|
-
|
412
|
-
</div>
|
413
|
-
|
414
|
-
|
415
|
-
<div id="validator-badges">
|
416
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
417
|
-
</div>
|
418
|
-
|
419
|
-
</body>
|
420
|
-
</html>
|
@@ -1,138 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding=" UTF-8"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Jpmobile::Mobile::Ddipocket</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset= UTF-8" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Jpmobile::Mobile::Ddipocket</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/jpmobile/mobile/willcom_rb.html">
|
59
|
-
lib/jpmobile/mobile/willcom.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="Willcom.html">
|
69
|
-
Willcom
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<h2>DDI-POCKET</h2>
|
85
|
-
<p>
|
86
|
-
スーパクラスは<a href="Willcom.html">Willcom</a>。
|
87
|
-
</p>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
<!-- if includes -->
|
99
|
-
|
100
|
-
<div id="section">
|
101
|
-
|
102
|
-
|
103
|
-
<div id="constants-list">
|
104
|
-
<h3 class="section-bar">Constants</h3>
|
105
|
-
|
106
|
-
<div class="name-list">
|
107
|
-
<table summary="Constants">
|
108
|
-
<tr class="top-aligned-row context-row">
|
109
|
-
<td class="context-item-name">USER_AGENT_REGEXP</td>
|
110
|
-
<td>=</td>
|
111
|
-
<td class="context-item-value">/^Mozilla\/3.0\(DDIPOCKET/</td>
|
112
|
-
<td width="3em"> </td>
|
113
|
-
<td class="context-item-desc">
|
114
|
-
対応するUser-Agentの正規表現
|
115
|
-
|
116
|
-
</td>
|
117
|
-
</tr>
|
118
|
-
</table>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
<!-- if method_list -->
|
128
|
-
|
129
|
-
|
130
|
-
</div>
|
131
|
-
|
132
|
-
|
133
|
-
<div id="validator-badges">
|
134
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
135
|
-
</div>
|
136
|
-
|
137
|
-
</body>
|
138
|
-
</html>
|