jpmobile-terminfo 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg
data/README.rdoc ADDED
@@ -0,0 +1,24 @@
1
+ = jpmobile-terminfo: Carrier terminal information List for jpmobile
2
+
3
+ == About jpmobile-terminfo
4
+ 主要キャリアの端末情報を管理する jpmobile 用プラグイン。
5
+
6
+ == インストール
7
+ === Rails pluginとしてインストールする場合
8
+ % rails plugin install git://github.com/jpmobile/jpmobile-terminfo.git
9
+
10
+ === gemでインストールする場合
11
+ % gem install jpmobile-terminfo
12
+
13
+ == カスタマイズするには
14
+ forkして編集してください。編集結果をpluginとしてインストールするとよいでしょう。
15
+
16
+ == リンク
17
+
18
+ * http://jpmobile-rails.org
19
+
20
+ == 作者
21
+
22
+ Copyright 2006-2010 (c) Shin-ichiro OGAWA, Yoji Shidara, under MIT License.
23
+
24
+ Shin-ichiro OGAWA <rust.stnard@gmail.com>
data/Rakefile ADDED
@@ -0,0 +1,36 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/clean'
4
+ require 'rake/testtask'
5
+ require 'rake/rdoctask'
6
+ require 'fileutils'
7
+ include FileUtils
8
+
9
+ begin
10
+ require 'jeweler'
11
+ Jeweler::Tasks.new do |gem|
12
+ gem.name = "jpmobile-terminfo"
13
+ gem.summary = "Carrier terminal information List for jpmobile"
14
+ gem.description = "Carrier terminal information List for jpmobile"
15
+ gem.email = "rust.stnard@gmail.com"
16
+ gem.homepage = "http://github.com/jpmobile/jpmobile-terminfo"
17
+ gem.authors = ["Shin-ichiro OGAWA"]
18
+
19
+ gem.add_development_dependency('jeweler', '>=1.4.0')
20
+ end
21
+ rescue LoadError
22
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
23
+ end
24
+ Jeweler::GemcutterTasks.new
25
+
26
+ begin
27
+ require 'rspec/core/rake_task'
28
+
29
+ desc 'run unit testing (core test)'
30
+ RSpec::Core::RakeTask.new(:spec) do |t|
31
+ spec_dir = File.join(File.dirname(__FILE__), 'spec')
32
+ t.pattern = "#{spec_dir}/*_spec.rb"
33
+ end
34
+ rescue LoadError
35
+ warn "RSpec is not installed. Some tasks were skipped. please install rspec"
36
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,53 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{jpmobile-terminfo}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Shin-ichiro OGAWA"]
12
+ s.date = %q{2010-09-16}
13
+ s.description = %q{Carrier terminal information List for jpmobile}
14
+ s.email = %q{rust.stnard@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ ".gitignore",
20
+ "README.rdoc",
21
+ "Rakefile",
22
+ "VERSION",
23
+ "jpmobile-terminfo.gemspec",
24
+ "lib/jpmobile-terminfo.rb",
25
+ "lib/jpmobile/mobile/terminfo.rb",
26
+ "lib/jpmobile/mobile/terminfo/docomo.rb",
27
+ "spec/spec_helper.rb",
28
+ "spec/terminfo_spec.rb"
29
+ ]
30
+ s.homepage = %q{http://github.com/jpmobile/jpmobile-terminfo}
31
+ s.rdoc_options = ["--charset=UTF-8"]
32
+ s.require_paths = ["lib"]
33
+ s.rubygems_version = %q{1.3.7}
34
+ s.summary = %q{Carrier terminal information List for jpmobile}
35
+ s.test_files = [
36
+ "spec/spec_helper.rb",
37
+ "spec/terminfo_spec.rb"
38
+ ]
39
+
40
+ if s.respond_to? :specification_version then
41
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
+ s.specification_version = 3
43
+
44
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
+ s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
46
+ else
47
+ s.add_dependency(%q<jeweler>, [">= 1.4.0"])
48
+ end
49
+ else
50
+ s.add_dependency(%q<jeweler>, [">= 1.4.0"])
51
+ end
52
+ end
53
+
@@ -0,0 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
3
+ $:.include?(File.expand_path(File.dirname(__FILE__)))
4
+
5
+ module Jpmobile
6
+ module Mobile
7
+ autoload :Terminfo, 'jpmobile/mobile/terminfo'
8
+ end
9
+ end
@@ -0,0 +1,62 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Jpmobile
3
+ module Mobile
4
+ class Terminfo
5
+ autoload :Docomo, 'jpmobile/mobile/terminfo/docomo'
6
+
7
+ def initialize(carrier, env)
8
+ case carrier.class.name
9
+ when /Docomo/
10
+ display_info = Docomo::DISPLAY_INFO[carrier.model_name] || {}
11
+ @browser_width = display_info[:browser_width]
12
+ @browser_height = display_info[:browser_height]
13
+ @color_p = display_info[:color_p]
14
+ @colors = display_info[:colors]
15
+ when /Au/
16
+ if r = env['HTTP_X_UP_DEVCAP_SCREENPIXELS']
17
+ @physical_width, @physical_height = r.split(/,/,2).map {|x| x.to_i}
18
+ end
19
+ if r = env['HTTP_X_UP_DEVCAP_ISCOLOR']
20
+ @color_p = (r == '1')
21
+ end
22
+ if r = env['HTTP_X_UP_DEVCAP_SCREENDEPTH']
23
+ a = r.split(/,/)
24
+ @colors = 2 ** a[0].to_i
25
+ end
26
+ when /Softbank/, /Vodafone/
27
+ if r = env['HTTP_X_JPHONE_DISPLAY']
28
+ @physical_width, @physical_height = r.split(/\*/,2).map {|x| x.to_i}
29
+ end
30
+ if r = env['HTTP_X_JPHONE_COLOR']
31
+ case r
32
+ when /^C/
33
+ @color_p = true
34
+ when /^G/
35
+ @color_p = false
36
+ end
37
+ if r =~ /^.(\d+)$/
38
+ @colors = $1.to_i
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ # 画面がカラーならば +true+、白黒ならば +false+ を返す。不明の場合は +nil+。
45
+ def color?; @color_p; end
46
+ # 画面の色数を返す。不明の場合は +nil+。
47
+ def colors; @colors; end
48
+ # ディスプレイの画面幅を返す。不明の場合は +nil+。
49
+ def physical_width; @physical_width; end
50
+ # ディスプレイの画面高さを返す。不明の場合は +nil+。
51
+ def physical_height; @physical_height; end
52
+ # ブラウザの画面幅を返す。不明の場合は +nil+。
53
+ def browser_width; @browser_width; end
54
+ # ブラウザの画面高さを返す。不明の場合は +nil+。
55
+ def browser_height; @browser_height; end
56
+ # 画面の幅を返す。ブラウザ画面の幅がわかる場合はそれを優先する。不明の場合は +nil+。
57
+ def width; browser_width || physical_width; end
58
+ # 画面の高さを返す。ブラウザ画面の高さがわかる場合はそれを優先する。不明の場合は +nil+。
59
+ def height; browser_height || physical_height; end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,739 @@
1
+ module Jpmobile::Mobile::Terminfo::Docomo
2
+ DISPLAY_INFO =
3
+ {"SH06A3"=>
4
+ {:browser_width=>240,
5
+ :browser_height=>296,
6
+ :color_p=>true,
7
+ :colors=>16777216},
8
+ "F10A"=>
9
+ {:browser_width=>240, :browser_height=>330, :color_p=>true, :colors=>262144},
10
+ "F905iBiz"=>
11
+ {:browser_width=>240,
12
+ :browser_height=>352,
13
+ :color_p=>true,
14
+ :colors=>16777216},
15
+ "N600i"=>
16
+ {:browser_width=>176, :browser_height=>180, :color_p=>true, :colors=>65536},
17
+ "P900iV"=>
18
+ {:browser_width=>240, :browser_height=>266, :color_p=>true, :colors=>262144},
19
+ "P703imyu"=>
20
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
21
+ "F02A"=>
22
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
23
+ "SH704i"=>
24
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
25
+ "F503iS"=>
26
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>4096},
27
+ "F505i"=>
28
+ {:browser_width=>240, :browser_height=>268, :color_p=>true, :colors=>262144},
29
+ "F883i"=>
30
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
31
+ "D851iWM"=>
32
+ {:browser_width=>230, :browser_height=>320, :color_p=>true, :colors=>262144},
33
+ "P06A"=>
34
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
35
+ "N705imyu"=>
36
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
37
+ "F902i"=>
38
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
39
+ "N505i"=>
40
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
41
+ "F700i"=>
42
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
43
+ "D903i"=>
44
+ {:browser_width=>230, :browser_height=>320, :color_p=>true, :colors=>262144},
45
+ "SA800i"=>
46
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>65536},
47
+ "N902i"=>
48
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
49
+ "KO210i"=>
50
+ {:browser_width=>96, :browser_height=>96, :color_p=>true, :colors=>256},
51
+ "D902iS"=>
52
+ {:browser_width=>230, :browser_height=>320, :color_p=>true, :colors=>262144},
53
+ "SO213iWR"=>
54
+ {:browser_width=>120, :browser_height=>112, :color_p=>true, :colors=>65536},
55
+ "N700i"=>
56
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
57
+ "N2001"=>
58
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>4096},
59
+ "SH821i"=>
60
+ {:browser_width=>96, :browser_height=>78, :color_p=>true, :colors=>256},
61
+ "SH01A"=>
62
+ {:browser_width=>240,
63
+ :browser_height=>320,
64
+ :color_p=>true,
65
+ :colors=>16777216},
66
+ "N905iBiz"=>
67
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
68
+ "F05A"=>
69
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>65536},
70
+ "SH706ie"=>
71
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
72
+ "F901iC"=>
73
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
74
+ "N2002"=>
75
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>65536},
76
+ "F209i"=>
77
+ {:browser_width=>96, :browser_height=>91, :color_p=>true, :colors=>256},
78
+ "N706ie"=>
79
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
80
+ "P706imyu"=>
81
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
82
+ "P905iTV"=>
83
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
84
+ "F905i"=>
85
+ {:browser_width=>240,
86
+ :browser_height=>352,
87
+ :color_p=>true,
88
+ :colors=>16777216},
89
+ "F703i"=>
90
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
91
+ "N209i"=>
92
+ {:browser_width=>108, :browser_height=>82, :color_p=>false, :colors=>4},
93
+ "P209iS"=>
94
+ {:browser_width=>96, :browser_height=>87, :color_p=>true, :colors=>256},
95
+ "D210i"=>
96
+ {:browser_width=>96, :browser_height=>91, :color_p=>true, :colors=>256},
97
+ "SO210i"=>
98
+ {:browser_width=>120, :browser_height=>113, :color_p=>true, :colors=>256},
99
+ "SH902i"=>
100
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
101
+ "N252i"=>
102
+ {:browser_width=>132, :browser_height=>140, :color_p=>true, :colors=>65536},
103
+ "SH505iS"=>
104
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
105
+ "N905i"=>
106
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
107
+ "N704imyu"=>
108
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
109
+ "P903iX"=>
110
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
111
+ "N505iS"=>
112
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
113
+ "NM502i"=>
114
+ {:browser_width=>111, :browser_height=>106, :color_p=>false, :colors=>2},
115
+ "R692i"=>
116
+ {:browser_width=>96, :browser_height=>98, :color_p=>true, :colors=>4096},
117
+ "N2102V"=>
118
+ {:browser_width=>176, :browser_height=>198, :color_p=>true, :colors=>65536},
119
+ "D705imyu"=>
120
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
121
+ "SO903iTV"=>
122
+ {:browser_width=>240, :browser_height=>368, :color_p=>true, :colors=>262144},
123
+ "F903iX"=>
124
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
125
+ "P253i"=>
126
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
127
+ "SH702iD"=>
128
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
129
+ "L852i"=>
130
+ {:browser_width=>240, :browser_height=>298, :color_p=>true, :colors=>65536},
131
+ "SH04A"=>
132
+ {:browser_width=>240,
133
+ :browser_height=>320,
134
+ :color_p=>true,
135
+ :colors=>16777216},
136
+ "P704i"=>
137
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
138
+ "SH851i"=>
139
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
140
+ "N07A3"=>
141
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
142
+ "N01A"=>
143
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
144
+ "F706i"=>
145
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
146
+ "P705iCL"=>
147
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
148
+ "SH905i"=>
149
+ {:browser_width=>240,
150
+ :browser_height=>320,
151
+ :color_p=>true,
152
+ :colors=>16777216},
153
+ "N211iS"=>
154
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>4096},
155
+ "P502i"=>
156
+ {:browser_width=>96, :browser_height=>117, :color_p=>false, :colors=>4},
157
+ "SO213iS"=>
158
+ {:browser_width=>120, :browser_height=>112, :color_p=>true, :colors=>65536},
159
+ "T2101V"=>
160
+ {:browser_width=>176, :browser_height=>144, :color_p=>true, :colors=>262144},
161
+ "SO213i"=>
162
+ {:browser_width=>120, :browser_height=>112, :color_p=>true, :colors=>65536},
163
+ "N702iD"=>
164
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
165
+ "F08A3"=>
166
+ {:browser_width=>240, :browser_height=>324, :color_p=>true, :colors=>262144},
167
+ "N706i"=>
168
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
169
+ "F502it"=>
170
+ {:browser_width=>96, :browser_height=>91, :color_p=>true, :colors=>256},
171
+ "SH901iS"=>
172
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
173
+ "N901iS"=>
174
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
175
+ "P505i"=>
176
+ {:browser_width=>240, :browser_height=>266, :color_p=>true, :colors=>65536},
177
+ "D701iWM"=>
178
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>65536},
179
+ "P821i"=>
180
+ {:browser_width=>118, :browser_height=>128, :color_p=>false, :colors=>4},
181
+ "L602i"=>
182
+ {:browser_width=>170, :browser_height=>189, :color_p=>true, :colors=>65536},
183
+ "P09A3"=>
184
+ {:browser_width=>240, :browser_height=>331, :color_p=>true, :colors=>262144},
185
+ "N04A"=>
186
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
187
+ "D251i"=>
188
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>262144},
189
+ "D251iS"=>
190
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>262144},
191
+ "P902i"=>
192
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
193
+ "SO502iWM"=>
194
+ {:browser_width=>120, :browser_height=>113, :color_p=>true, :colors=>256},
195
+ "SH506iC"=>
196
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
197
+ "P252iS"=>
198
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
199
+ "P706ie"=>
200
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
201
+ "P2102V"=>
202
+ {:browser_width=>176, :browser_height=>198, :color_p=>true, :colors=>262144},
203
+ "D702i"=>
204
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
205
+ "P505iS"=>
206
+ {:browser_width=>240, :browser_height=>266, :color_p=>true, :colors=>65536},
207
+ "SO702i"=>
208
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
209
+ "F210i"=>
210
+ {:browser_width=>96, :browser_height=>113, :color_p=>true, :colors=>256},
211
+ "P10A"=>
212
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
213
+ "P905i"=>
214
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
215
+ "P851i"=>
216
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
217
+ "SH700i"=>
218
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
219
+ "F501i"=>
220
+ {:browser_width=>112, :browser_height=>84, :color_p=>false, :colors=>2},
221
+ "P02A"=>
222
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
223
+ "P702iD"=>
224
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
225
+ "P211iS"=>
226
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>65536},
227
+ "F700iS"=>
228
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
229
+ "N210i"=>
230
+ {:browser_width=>118, :browser_height=>113, :color_p=>true, :colors=>256},
231
+ "SO705i"=>
232
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
233
+ "D705i"=>
234
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
235
+ "D503i"=>
236
+ {:browser_width=>132, :browser_height=>126, :color_p=>true, :colors=>4096},
237
+ "NM850iG"=>
238
+ {:browser_width=>176, :browser_height=>144, :color_p=>true, :colors=>65536},
239
+ "SO503i"=>
240
+ {:browser_width=>120, :browser_height=>113, :color_p=>true, :colors=>65536},
241
+ "SH252i"=>
242
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
243
+ "N501i"=>
244
+ {:browser_width=>118, :browser_height=>128, :color_p=>false, :colors=>2},
245
+ "P211i"=>
246
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>65536},
247
+ "P901iS"=>
248
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
249
+ "L705i"=>
250
+ {:browser_width=>240, :browser_height=>280, :color_p=>true, :colors=>262144},
251
+ "F901iS"=>
252
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
253
+ "F01A"=>
254
+ {:browser_width=>240,
255
+ :browser_height=>352,
256
+ :color_p=>true,
257
+ :colors=>16777216},
258
+ "N906imyu"=>
259
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
260
+ "SH703i"=>
261
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
262
+ "F504i"=>
263
+ {:browser_width=>132, :browser_height=>136, :color_p=>true, :colors=>65536},
264
+ "P05A"=>
265
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
266
+ "SH706iw"=>
267
+ {:browser_width=>240,
268
+ :browser_height=>320,
269
+ :color_p=>true,
270
+ :colors=>16777216},
271
+ "P705imyu"=>
272
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
273
+ "N504i"=>
274
+ {:browser_width=>160, :browser_height=>180, :color_p=>true, :colors=>65536},
275
+ "F880iES"=>
276
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
277
+ "SH07A3"=>
278
+ {:browser_width=>240,
279
+ :browser_height=>296,
280
+ :color_p=>true,
281
+ :colors=>16777216},
282
+ "SO506i"=>
283
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
284
+ "P901iTV"=>
285
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
286
+ "D902i"=>
287
+ {:browser_width=>230, :browser_height=>320, :color_p=>true, :colors=>262144},
288
+ "P506iC"=>
289
+ {:browser_width=>240, :browser_height=>266, :color_p=>true, :colors=>65536},
290
+ "SH702iS"=>
291
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
292
+ "SA702i"=>
293
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>65536},
294
+ "D903iTV"=>
295
+ {:browser_width=>230, :browser_height=>320, :color_p=>true, :colors=>262144},
296
+ "D506i"=>
297
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
298
+ "SH903iTV"=>
299
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
300
+ "SO903i"=>
301
+ {:browser_width=>240, :browser_height=>368, :color_p=>true, :colors=>262144},
302
+ "F504iS"=>
303
+ {:browser_width=>132, :browser_height=>136, :color_p=>true, :colors=>65536},
304
+ "N702iS"=>
305
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
306
+ "F04A"=>
307
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
308
+ "SH706i"=>
309
+ {:browser_width=>240,
310
+ :browser_height=>320,
311
+ :color_p=>true,
312
+ :colors=>16777216},
313
+ "N503iS"=>
314
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>4096},
315
+ "L705iX"=>
316
+ {:browser_width=>240, :browser_height=>280, :color_p=>true, :colors=>262144},
317
+ "F251i"=>
318
+ {:browser_width=>132, :browser_height=>140, :color_p=>true, :colors=>65536},
319
+ "N905imyu"=>
320
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
321
+ "F904i"=>
322
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
323
+ "P700i"=>
324
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
325
+ "N251i"=>
326
+ {:browser_width=>132, :browser_height=>140, :color_p=>true, :colors=>65536},
327
+ "SO902iWP+"=>
328
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
329
+ "F881iES"=>
330
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
331
+ "D905i"=>
332
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
333
+ "N904i"=>
334
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
335
+ "P2002"=>
336
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>65536},
337
+ "R691i"=>
338
+ {:browser_width=>96, :browser_height=>72, :color_p=>false, :colors=>4},
339
+ "SO906i"=>
340
+ {:browser_width=>240,
341
+ :browser_height=>368,
342
+ :color_p=>true,
343
+ :colors=>16777216},
344
+ "N902iL"=>
345
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
346
+ "P252i"=>
347
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
348
+ "P209i"=>
349
+ {:browser_width=>96, :browser_height=>87, :color_p=>false, :colors=>4},
350
+ "SH03A"=>
351
+ {:browser_width=>240,
352
+ :browser_height=>320,
353
+ :color_p=>true,
354
+ :colors=>16777216},
355
+ "F07A"=>
356
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
357
+ "P703i"=>
358
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
359
+ "F705i"=>
360
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>262144},
361
+ "SH904i"=>
362
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
363
+ "SH902iSL"=>
364
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
365
+ "N506iS"=>
366
+ {:browser_width=>240, :browser_height=>295, :color_p=>true, :colors=>262144},
367
+ "P501i"=>
368
+ {:browser_width=>96, :browser_height=>120, :color_p=>false, :colors=>2},
369
+ "SO212i"=>
370
+ {:browser_width=>120, :browser_height=>112, :color_p=>true, :colors=>65536},
371
+ "N705i"=>
372
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
373
+ "NM706i"=>
374
+ {:browser_width=>231,
375
+ :browser_height=>235,
376
+ :color_p=>true,
377
+ :colors=>16777216},
378
+ "F661i"=>
379
+ {:browser_width=>132, :browser_height=>136, :color_p=>true, :colors=>65536},
380
+ "F671iS"=>
381
+ {:browser_width=>160, :browser_height=>120, :color_p=>true, :colors=>65536},
382
+ "F2051"=>
383
+ {:browser_width=>176, :browser_height=>182, :color_p=>true, :colors=>65536},
384
+ "R211i"=>
385
+ {:browser_width=>96, :browser_height=>98, :color_p=>true, :colors=>4096},
386
+ "P07A3"=>
387
+ {:browser_width=>240, :browser_height=>331, :color_p=>true, :colors=>262144},
388
+ "N2051"=>
389
+ {:browser_width=>176, :browser_height=>198, :color_p=>true, :colors=>65536},
390
+ "N08A3"=>
391
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
392
+ "N703iD"=>
393
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
394
+ "L601i"=>
395
+ {:browser_width=>170, :browser_height=>189, :color_p=>true, :colors=>65536},
396
+ "F09A3"=>
397
+ {:browser_width=>240,
398
+ :browser_height=>324,
399
+ :color_p=>true,
400
+ :colors=>16777216},
401
+ "N03A"=>
402
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
403
+ "SO905iCS"=>
404
+ {:browser_width=>240,
405
+ :browser_height=>368,
406
+ :color_p=>true,
407
+ :colors=>16777216},
408
+ "SH902iS"=>
409
+ {:browser_width=>240, :browser_height=>240, :color_p=>true, :colors=>262144},
410
+ "F672i"=>
411
+ {:browser_width=>160, :browser_height=>120, :color_p=>true, :colors=>65536},
412
+ "P503iS"=>
413
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>256},
414
+ "P504i"=>
415
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
416
+ "L01A"=>
417
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
418
+ "N821i"=>
419
+ {:browser_width=>118, :browser_height=>128, :color_p=>false, :colors=>4},
420
+ "P901i"=>
421
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
422
+ "N902iS"=>
423
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
424
+ "P506iCII"=>
425
+ {:browser_width=>240, :browser_height=>266, :color_p=>true, :colors=>65536},
426
+ "N701iECO"=>
427
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
428
+ "N502it"=>
429
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>256},
430
+ "P2101V"=>
431
+ {:browser_width=>163, :browser_height=>182, :color_p=>true, :colors=>262144},
432
+ "D701i"=>
433
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>65536},
434
+ "P253iS"=>
435
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
436
+ "SO505iS"=>
437
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
438
+ "N2701"=>
439
+ {:browser_width=>176, :browser_height=>198, :color_p=>true, :colors=>65536},
440
+ "P904i"=>
441
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
442
+ "D253i"=>
443
+ {:browser_width=>176, :browser_height=>198, :color_p=>true, :colors=>262144},
444
+ "SH505i"=>
445
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
446
+ "L04A"=>
447
+ {:browser_width=>240, :browser_height=>313, :color_p=>true, :colors=>262144},
448
+ "P01A"=>
449
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
450
+ "SH705iII"=>
451
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
452
+ "D704i"=>
453
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
454
+ "SO704i"=>
455
+ {:browser_width=>240, :browser_height=>368, :color_p=>true, :colors=>262144},
456
+ "SH251i"=>
457
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>65536},
458
+ "N902iX"=>
459
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
460
+ "D502i"=>
461
+ {:browser_width=>96, :browser_height=>90, :color_p=>true, :colors=>256},
462
+ "SO502i"=>
463
+ {:browser_width=>120, :browser_height=>120, :color_p=>false, :colors=>4},
464
+ "D505iS"=>
465
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
466
+ "R209i"=>
467
+ {:browser_width=>96, :browser_height=>72, :color_p=>false, :colors=>4},
468
+ "L704i"=>
469
+ {:browser_width=>240, :browser_height=>280, :color_p=>true, :colors=>262144},
470
+ "P210i"=>
471
+ {:browser_width=>96, :browser_height=>91, :color_p=>true, :colors=>256},
472
+ "M702iG"=>
473
+ {:browser_width=>240, :browser_height=>267, :color_p=>true, :colors=>262144},
474
+ "F212i"=>
475
+ {:browser_width=>132, :browser_height=>136, :color_p=>true, :colors=>65536},
476
+ "SH05A3"=>
477
+ {:browser_width=>240,
478
+ :browser_height=>296,
479
+ :color_p=>true,
480
+ :colors=>16777216},
481
+ "F883iESS"=>
482
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
483
+ "SH700iS"=>
484
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
485
+ "N900iG"=>
486
+ {:browser_width=>240, :browser_height=>269, :color_p=>true, :colors=>65536},
487
+ "F503i"=>
488
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>256},
489
+ "P04A"=>
490
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
491
+ "F900i"=>
492
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
493
+ "N503i"=>
494
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>4096},
495
+ "P651ps"=>
496
+ {:browser_width=>96, :browser_height=>87, :color_p=>false, :colors=>4},
497
+ "D505i"=>
498
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
499
+ "N900i"=>
500
+ {:browser_width=>240, :browser_height=>269, :color_p=>true, :colors=>65536},
501
+ "D702iF"=>
502
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
503
+ "SO505i"=>
504
+ {:browser_width=>256, :browser_height=>240, :color_p=>true, :colors=>262144},
505
+ "F902iS"=>
506
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
507
+ "SO506iC"=>
508
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
509
+ "D901i"=>
510
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
511
+ "P902iS"=>
512
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
513
+ "N703imyu"=>
514
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
515
+ "D901iS"=>
516
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
517
+ "P213i"=>
518
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
519
+ "SO902i"=>
520
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
521
+ "N601i"=>
522
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
523
+ "F03A"=>
524
+ {:browser_width=>240,
525
+ :browser_height=>352,
526
+ :color_p=>true,
527
+ :colors=>16777216},
528
+ "F884i"=>
529
+ {:browser_width=>240, :browser_height=>364, :color_p=>true, :colors=>262144},
530
+ "SH705i"=>
531
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
532
+ "F506i"=>
533
+ {:browser_width=>240, :browser_height=>268, :color_p=>true, :colors=>262144},
534
+ "SH251iS"=>
535
+ {:browser_width=>176, :browser_height=>187, :color_p=>true, :colors=>65536},
536
+ "SH08A3"=>
537
+ {:browser_width=>240,
538
+ :browser_height=>296,
539
+ :color_p=>true,
540
+ :colors=>16777216},
541
+ "N706iII"=>
542
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
543
+ "F903i"=>
544
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
545
+ "N506i"=>
546
+ {:browser_width=>240, :browser_height=>295, :color_p=>true, :colors=>262144},
547
+ "SH900i"=>
548
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
549
+ "N900iL"=>
550
+ {:browser_width=>240, :browser_height=>269, :color_p=>true, :colors=>65536},
551
+ "ER209i"=>
552
+ {:browser_width=>120, :browser_height=>72, :color_p=>false, :colors=>2},
553
+ "F900iC"=>
554
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
555
+ "N251iS"=>
556
+ {:browser_width=>132, :browser_height=>140, :color_p=>true, :colors=>65536},
557
+ "D904i"=>
558
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
559
+ "N903i"=>
560
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
561
+ "D253iWM"=>
562
+ {:browser_width=>220, :browser_height=>144, :color_p=>true, :colors=>262144},
563
+ "F2102V"=>
564
+ {:browser_width=>176, :browser_height=>182, :color_p=>true, :colors=>65536},
565
+ "N701i"=>
566
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
567
+ "SO905i"=>
568
+ {:browser_width=>240,
569
+ :browser_height=>368,
570
+ :color_p=>true,
571
+ :colors=>16777216},
572
+ "N504iS"=>
573
+ {:browser_width=>160, :browser_height=>180, :color_p=>true, :colors=>65536},
574
+ "SH02A"=>
575
+ {:browser_width=>240,
576
+ :browser_height=>320,
577
+ :color_p=>true,
578
+ :colors=>16777216},
579
+ "F06A"=>
580
+ {:browser_width=>240,
581
+ :browser_height=>352,
582
+ :color_p=>true,
583
+ :colors=>16777216},
584
+ "D800iDS"=>
585
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
586
+ "F906i"=>
587
+ {:browser_width=>240,
588
+ :browser_height=>352,
589
+ :color_p=>true,
590
+ :colors=>16777216},
591
+ "F801i"=>
592
+ {:browser_width=>240, :browser_height=>352, :color_p=>true, :colors=>65536},
593
+ "F704i"=>
594
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
595
+ "D211i"=>
596
+ {:browser_width=>100, :browser_height=>91, :color_p=>true, :colors=>4096},
597
+ "SO211i"=>
598
+ {:browser_width=>120, :browser_height=>112, :color_p=>true, :colors=>4096},
599
+ "SH903i"=>
600
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
601
+ "P702i"=>
602
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
603
+ "N253i"=>
604
+ {:browser_width=>160, :browser_height=>180, :color_p=>true, :colors=>65536},
605
+ "F505iGPS"=>
606
+ {:browser_width=>240, :browser_height=>268, :color_p=>true, :colors=>262144},
607
+ "F702iD"=>
608
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
609
+ "N06A3"=>
610
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
611
+ "N906i"=>
612
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
613
+ "NM705i"=>
614
+ {:browser_width=>231,
615
+ :browser_height=>235,
616
+ :color_p=>true,
617
+ :colors=>16777216},
618
+ "F882iES"=>
619
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
620
+ "M702iS"=>
621
+ {:browser_width=>240, :browser_height=>267, :color_p=>true, :colors=>262144},
622
+ "SH906i"=>
623
+ {:browser_width=>240,
624
+ :browser_height=>320,
625
+ :color_p=>true,
626
+ :colors=>16777216},
627
+ "P705i"=>
628
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
629
+ "SH905iTV"=>
630
+ {:browser_width=>240,
631
+ :browser_height=>320,
632
+ :color_p=>true,
633
+ :colors=>16777216},
634
+ "N900iS"=>
635
+ {:browser_width=>240, :browser_height=>269, :color_p=>true, :colors=>65536},
636
+ "L600i"=>
637
+ {:browser_width=>170, :browser_height=>189, :color_p=>true, :colors=>65536},
638
+ "N02A"=>
639
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
640
+ "SA700iS"=>
641
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>65536},
642
+ "F671i"=>
643
+ {:browser_width=>120, :browser_height=>126, :color_p=>true, :colors=>256},
644
+ "P503i"=>
645
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>256},
646
+ "P08A3"=>
647
+ {:browser_width=>240, :browser_height=>331, :color_p=>true, :colors=>262144},
648
+ "F883iES"=>
649
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
650
+ "P900i"=>
651
+ {:browser_width=>240, :browser_height=>266, :color_p=>true, :colors=>65536},
652
+ "P251iS"=>
653
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
654
+ "SO503iS"=>
655
+ {:browser_width=>120, :browser_height=>113, :color_p=>true, :colors=>65536},
656
+ "N09A3"=>
657
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
658
+ "N906iL"=>
659
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
660
+ "KO209i"=>
661
+ {:browser_width=>96, :browser_height=>96, :color_p=>true, :colors=>256},
662
+ "SH906iTV"=>
663
+ {:browser_width=>240,
664
+ :browser_height=>320,
665
+ :color_p=>true,
666
+ :colors=>16777216},
667
+ "F903iBSC"=>
668
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
669
+ "P504iS"=>
670
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>65536},
671
+ "D503iS"=>
672
+ {:browser_width=>132, :browser_height=>126, :color_p=>true, :colors=>4096},
673
+ "N05A"=>
674
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
675
+ "L03A"=>
676
+ {:browser_width=>240, :browser_height=>280, :color_p=>true, :colors=>262144},
677
+ "P903i"=>
678
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
679
+ "D252i"=>
680
+ {:browser_width=>176, :browser_height=>198, :color_p=>true, :colors=>262144},
681
+ "SH2101V"=>
682
+ {:browser_width=>800, :browser_height=>600, :color_p=>true, :colors=>65536},
683
+ "F884iES"=>
684
+ {:browser_width=>240, :browser_height=>282, :color_p=>true, :colors=>262144},
685
+ "SH901iC"=>
686
+ {:browser_width=>240, :browser_height=>252, :color_p=>true, :colors=>262144},
687
+ "D2101V"=>
688
+ {:browser_width=>120, :browser_height=>130, :color_p=>true, :colors=>262144},
689
+ "D209i"=>
690
+ {:browser_width=>96, :browser_height=>90, :color_p=>true, :colors=>256},
691
+ "SO703i"=>
692
+ {:browser_width=>240, :browser_height=>368, :color_p=>true, :colors=>262144},
693
+ "D703i"=>
694
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
695
+ "SO506iS"=>
696
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>262144},
697
+ "D702iBCL"=>
698
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
699
+ "F883iS"=>
700
+ {:browser_width=>240, :browser_height=>256, :color_p=>true, :colors=>65536},
701
+ "P704imyu"=>
702
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
703
+ "D501i"=>
704
+ {:browser_width=>96, :browser_height=>72, :color_p=>false, :colors=>2},
705
+ "P701iD"=>
706
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
707
+ "F211i"=>
708
+ {:browser_width=>96, :browser_height=>113, :color_p=>true, :colors=>4096},
709
+ "N901iC"=>
710
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>65536},
711
+ "P906i"=>
712
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
713
+ "F502i"=>
714
+ {:browser_width=>96, :browser_height=>91, :color_p=>true, :colors=>256},
715
+ "L706ie"=>
716
+ {:browser_width=>240, :browser_height=>280, :color_p=>true, :colors=>262144},
717
+ "N506iSII"=>
718
+ {:browser_width=>240, :browser_height=>295, :color_p=>true, :colors=>262144},
719
+ "L06A"=>
720
+ {:browser_width=>240, :browser_height=>313, :color_p=>true, :colors=>262144},
721
+ "P03A"=>
722
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
723
+ "P903iTV"=>
724
+ {:browser_width=>240, :browser_height=>350, :color_p=>true, :colors=>262144},
725
+ "N211i"=>
726
+ {:browser_width=>118, :browser_height=>128, :color_p=>true, :colors=>4096},
727
+ "F900iT"=>
728
+ {:browser_width=>230, :browser_height=>240, :color_p=>true, :colors=>262144},
729
+ "SO706i"=>
730
+ {:browser_width=>240, :browser_height=>320, :color_p=>true, :colors=>262144},
731
+ "D900i"=>
732
+ {:browser_width=>240, :browser_height=>270, :color_p=>true, :colors=>262144},
733
+ "N502i"=>
734
+ {:browser_width=>118, :browser_height=>128, :color_p=>false, :colors=>4},
735
+ "D504i"=>
736
+ {:browser_width=>132, :browser_height=>144, :color_p=>true, :colors=>262144},
737
+ "SO504i"=>
738
+ {:browser_width=>120, :browser_height=>112, :color_p=>true, :colors=>65536}}
739
+ end
@@ -0,0 +1,2 @@
1
+ # -*- coding: utf-8 -*-
2
+ require File.join(File.expand_path(File.dirname(__FILE__)), '../lib/jpmobile-terminfo')
@@ -0,0 +1,54 @@
1
+ # -*- coding: utf-8 -*-
2
+ require File.join(File.expand_path(File.dirname(__FILE__)), 'spec_helper')
3
+
4
+ # dummy classes
5
+ module Jpmobile::Mobile
6
+ class Docomo; end
7
+ class Au; end
8
+ class Softbank; end
9
+ end
10
+
11
+ describe Jpmobile::Mobile::Terminfo do
12
+ def mock_carrier(carrier, stubs={ })
13
+ @mock_carrier = eval("Jpmobile::Mobile::#{carrier}").new
14
+ @mock_carrier.stub(stubs)
15
+ @mock_carrier
16
+ end
17
+
18
+ context "docomoの場合" do
19
+ it "端末情報を取得できること" do
20
+ terminfo = Jpmobile::Mobile::Terminfo.new(mock_carrier("Docomo", {:model_name => 'SH906i'}), {})
21
+ terminfo.color?.should be_true
22
+ terminfo.colors.should == 16777216
23
+ terminfo.width.should == 240
24
+ terminfo.height.should == 320
25
+ end
26
+ end
27
+
28
+ context "auの場合" do
29
+ it "端末情報を取得できること" do
30
+ terminfo = Jpmobile::Mobile::Terminfo.new(mock_carrier("Au"), {
31
+ 'HTTP_X_UP_DEVCAP_SCREENPIXELS' => "240,348",
32
+ 'HTTP_X_UP_DEVCAP_ISCOLOR' => "1",
33
+ 'HTTP_X_UP_DEVCAP_SCREENDEPTH' => "16,RGB565"
34
+ })
35
+ terminfo.color?.should be_true
36
+ terminfo.colors.should == 65536
37
+ terminfo.width.should == 240
38
+ terminfo.height.should == 348
39
+ end
40
+ end
41
+
42
+ context "softbankの場合" do
43
+ it "端末情報を取得できること" do
44
+ terminfo = Jpmobile::Mobile::Terminfo.new(mock_carrier("Softbank"), {
45
+ 'HTTP_X_JPHONE_DISPLAY' => "240*320",
46
+ 'HTTP_X_JPHONE_COLOR' => "C262144"
47
+ })
48
+ terminfo.color?.should be_true
49
+ terminfo.colors.should == 262144
50
+ terminfo.width.should == 240
51
+ terminfo.height.should == 320
52
+ end
53
+ end
54
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jpmobile-terminfo
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 2
9
+ version: 0.0.2
10
+ platform: ruby
11
+ authors:
12
+ - Shin-ichiro OGAWA
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-09-16 00:00:00 +09:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: jeweler
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 1
30
+ - 4
31
+ - 0
32
+ version: 1.4.0
33
+ type: :development
34
+ version_requirements: *id001
35
+ description: Carrier terminal information List for jpmobile
36
+ email: rust.stnard@gmail.com
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - README.rdoc
43
+ files:
44
+ - .gitignore
45
+ - README.rdoc
46
+ - Rakefile
47
+ - VERSION
48
+ - jpmobile-terminfo.gemspec
49
+ - lib/jpmobile-terminfo.rb
50
+ - lib/jpmobile/mobile/terminfo.rb
51
+ - lib/jpmobile/mobile/terminfo/docomo.rb
52
+ - spec/spec_helper.rb
53
+ - spec/terminfo_spec.rb
54
+ has_rdoc: true
55
+ homepage: http://github.com/jpmobile/jpmobile-terminfo
56
+ licenses: []
57
+
58
+ post_install_message:
59
+ rdoc_options:
60
+ - --charset=UTF-8
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ segments:
69
+ - 0
70
+ version: "0"
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ segments:
77
+ - 0
78
+ version: "0"
79
+ requirements: []
80
+
81
+ rubyforge_project:
82
+ rubygems_version: 1.3.7
83
+ signing_key:
84
+ specification_version: 3
85
+ summary: Carrier terminal information List for jpmobile
86
+ test_files:
87
+ - spec/spec_helper.rb
88
+ - spec/terminfo_spec.rb