Add recently added vendors to phone database.
[wammu.git] / Wammu / Data.py
blob10cec4c55bcb038a115096a40771e6a9f66f42d5
1 # -*- coding: UTF-8 -*-
2 # vim: expandtab sw=4 ts=4 sts=4:
3 '''
4 Wammu - Phone manager
5 Some static data like bitmaps, category mappings etc.
6 Many of them might be moved to python-gammu later
7 '''
8 __author__ = 'Michal Čihař'
9 __email__ = 'michal@cihar.com'
10 __license__ = '''
11 Copyright © 2003 - 2009 Michal Čihař
13 This program is free software; you can redistribute it and/or modify it
14 under the terms of the GNU General Public License version 2 as published by
15 the Free Software Foundation.
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20 more details.
22 You should have received a copy of the GNU General Public License along with
23 this program; if not, write to the Free Software Foundation, Inc.,
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 '''
27 import sys
28 from gammu.Data import Connections, MemoryValueTypes, CalendarTypes, CalendarValueTypes, TodoPriorities, TodoValueTypes, InternationalPrefixes
31 # When support for sound will be implemented, here should be sounds
32 PredefinedSounds = [
33 (_('Chimes high'),''),
34 (_('Chimes low'),''),
35 (_('Ding'),''),
36 (_('TaDa'),''),
37 (_('Notify'),''),
38 (_('Drum'),''),
39 (_('Claps'),''),
40 (_('Fanfare'),''),
41 (_('Chord high'),''),
42 (_('Chord low'),''),
45 # Wanted somebody who will draw nicer icons :-)
47 Note = [
48 '16 16 2 1',
49 'x c Black',
50 ' c None',
51 ' xx ',
52 ' xxx xxx ',
53 ' xxxxxxxxx ',
54 ' xx xx xx',
55 ' xx ',
56 ' xx ',
57 ' xx ',
58 ' xx ',
59 ' xxxxxx ',
60 ' xxxxxxx ',
61 'xxxxxxxx ',
62 'xxxxxxxx ',
63 'x xxxxx ',
64 'x xxxx ',
65 ' x xxx ',
66 ' xxxx ']
68 UnknownPredefined = [
69 '16 16 2 1',
70 'x c Black',
71 ' c None',
72 ' xxxxxx ',
73 ' x x ',
74 ' x xxxx x ',
75 ' x x x x ',
76 ' x x x ',
77 ' x x ',
78 ' x x ',
79 ' x x ',
80 ' x x ',
81 ' x x ',
82 ' xx ',
83 ' ',
84 ' xx ',
85 ' xxxx ',
86 ' x xx ',
87 ' xx ']
89 PredefinedAnimations = [
90 (_("I'm ironic, flirty"),
91 ['16 16 2 1',
92 'x c Black',
93 ' c None',
94 ' xxxxxx ',
95 ' xx xx ',
96 ' x x ',
97 ' x x ',
98 ' x xx xx x ',
99 'x x x x x x',
100 'x xx xx x',
101 'x x',
102 'x x',
103 'x x',
104 'x x x x',
105 ' x x x x ',
106 ' x x x x ',
107 ' x xx x ',
108 ' xx xx ',
109 ' xxxxxx ']),
110 (_("I am glad"),
111 ['16 16 2 1',
112 'x c Black',
113 ' c None',
114 ' xxxxxx ',
115 ' xx xx ',
116 ' x x ',
117 ' x x ',
118 ' x xx xx x ',
119 'x x x x x x',
120 'x xx xx x',
121 'x x',
122 'x x',
123 'x x',
124 'x x x x',
125 ' x x x x ',
126 ' x xxxx x ',
127 ' x x ',
128 ' xx xx ',
129 ' xxxxxx ']),
130 (_("I am skeptic"),
131 ['16 16 2 1',
132 'x c Black',
133 ' c None',
134 ' xxxxxx ',
135 ' xx xx ',
136 ' x x ',
137 ' x x ',
138 ' x xx xx x ',
139 'x x x x x x',
140 'x xx xx x',
141 'x x',
142 'x x',
143 'x x',
144 'x xxxxx x',
145 ' x x x ',
146 ' x x x ',
147 ' x x ',
148 ' xx xx ',
149 ' xxxxxx ']),
150 (_("I am sad"),
151 ['16 16 2 1',
152 'x c Black',
153 ' c None',
154 ' xxxxxx ',
155 ' xx xx ',
156 ' x x ',
157 ' x x ',
158 ' x xx xx x ',
159 'x x x x x x',
160 'x xx xx x',
161 'x x',
162 'x x',
163 'x x',
164 'x xxxx x',
165 ' x x x x ',
166 ' x x x x ',
167 ' x x ',
168 ' xx xx ',
169 ' xxxxxx ']),
170 (_("WOW"),
171 ['16 16 2 1',
172 'x c Black',
173 ' c None',
174 ' xxxxxx ',
175 ' xx xx ',
176 ' x x ',
177 ' x x ',
178 ' x xx xx x ',
179 'x x x x x x',
180 'x xx xx x',
181 'x x',
182 'x x',
183 'x xxxx x',
184 'x x x x',
185 ' x x x x ',
186 ' x xxxx x ',
187 ' x x ',
188 ' xx xx ',
189 ' xxxxxx ']),
190 (_("I am crying"),
191 ['16 16 2 1',
192 'x c Black',
193 ' c None',
194 ' xxxxxx ',
195 ' xx xx ',
196 ' x x ',
197 ' x x ',
198 ' x xx xx x ',
199 'x x x x x x',
200 'x xx xx x',
201 'x x x x',
202 'x x',
203 'x x',
204 'x xxxx x',
205 ' x x x x ',
206 ' x xxxx x ',
207 ' x x ',
208 ' xx xx ',
209 ' xxxxxx ']),
210 (_("I am winking"),
211 ['16 16 2 1',
212 'x c Black',
213 ' c None',
214 ' xxxxxx ',
215 ' xx xx ',
216 ' x x ',
217 ' x x ',
218 ' x xx x ',
219 'x xxxx x x x',
220 'x xx xx x',
221 'x x',
222 'x x',
223 'x x',
224 'x x x x',
225 ' x xxxxxx x ',
226 ' x x ',
227 ' x x ',
228 ' xx xx ',
229 ' xxxxxx ']),
230 (_("I am laughing"),
231 ['16 16 2 1',
232 'x c Black',
233 ' c None',
234 ' xxxxxx ',
235 ' xx xx ',
236 ' x x ',
237 ' x x ',
238 ' x xx xx x ',
239 'x x x x x x',
240 'x xx xx x',
241 'x x',
242 'x x',
243 'x x',
244 'x x x x',
245 ' x xxxxxx x ',
246 ' x xxxx x ',
247 ' x x ',
248 ' xx xx ',
249 ' xxxxxx ']),
250 (_("I am indifferent"),
251 ['16 16 2 1',
252 'x c Black',
253 ' c None',
254 ' xxxxxx ',
255 ' xx xx ',
256 ' x x ',
257 ' x x ',
258 ' x xx xx x ',
259 'x x x x x x',
260 'x xx xx x',
261 'x x',
262 'x x',
263 'x x',
264 'x x',
265 ' x x ',
266 ' x xxxxxx x ',
267 ' x x ',
268 ' xx xx ',
269 ' xxxxxx ']),
270 (_("I am in love"),
271 ['16 16 2 1',
272 'x c Black',
273 ' c None',
274 ' xxxx xx xx ',
275 ' xx x x x',
276 ' x x x ',
277 ' x x x ',
278 ' x xx xx x x ',
279 'x x x x x x',
280 'x xx xx x',
281 'x x',
282 'x x',
283 'x x',
284 'x x',
285 ' x x x x ',
286 ' x xxxx x ',
287 ' x x ',
288 ' xx xx ',
289 ' xxxxxx ']),
290 (_("I am confused"),
291 ['16 16 2 1',
292 'x c Black',
293 ' c None',
294 ' xxxxxx xx ',
295 ' xx x x ',
296 ' x x ',
297 ' x x ',
298 ' x xx xx x',
299 'x x x x x x x',
300 'x xx xx x',
301 'x x',
302 'x x',
303 'x x',
304 'x x',
305 ' x xxxxx x ',
306 ' x x ',
307 ' x x ',
308 ' xx xx ',
309 ' xxxxxx ']),
310 (_("Tongue hanging out"),
311 ['16 16 2 1',
312 'x c Black',
313 ' c None',
314 ' xxxxxx ',
315 ' xx xx ',
316 ' x x ',
317 ' x x ',
318 ' x xx xx x ',
319 'x x x x x x',
320 'x xx xx x',
321 'x x',
322 'x x',
323 'x x',
324 'x x',
325 ' x x x ',
326 ' x xxxxx x x ',
327 ' x xx x ',
328 ' xx x x ',
329 ' xxxxxxxxx ']),
330 (_("I am angry"),
331 ['16 16 2 1',
332 'x c Black',
333 ' c None',
334 ' xxxxxx ',
335 ' xx xx ',
336 ' x x ',
337 ' x x x x ',
338 ' x xx xxx x ',
339 'x x x x x x',
340 'x xx xx x',
341 'x x',
342 'x x',
343 'x x',
344 'x xxxx x',
345 ' x x x x ',
346 ' x x x x ',
347 ' x x ',
348 ' xx xx ',
349 ' xxxxxx ']),
350 (_("Wearing glases"),
351 ['16 16 2 1',
352 'x c Black',
353 ' c None',
354 ' xxxxxx ',
355 ' xx xx ',
356 ' x x ',
357 ' x x ',
358 'xxxxxxxxxxxxxxxx',
359 'x xxx xxx x',
360 'x xx xx x',
361 'x x',
362 'x x',
363 'x x',
364 'x x',
365 ' x x x x ',
366 ' x xxxxxx x ',
367 ' x x ',
368 ' xx xx ',
369 ' xxxxxx ']),
370 (_("Devil"),
371 ['16 16 2 1',
372 'x c Black',
373 ' c None',
374 'x xxxxxx x',
375 'xxxxx xxxxx',
376 ' xx xx ',
377 ' x x ',
378 ' x xx xx x ',
379 'x x x x x x',
380 'x xx xx x',
381 'x x',
382 'x x',
383 'x xxxxxxxx x',
384 'x x x x x x',
385 ' x x x x ',
386 ' x xxxx x ',
387 ' x x ',
388 ' xx xx ',
389 ' xxxxxx ']),
392 # First is used as default
393 Models = [
394 'auto',
395 'at',
396 'alcatel',
397 'nauto',
398 'obex',
399 'seobex',
402 Conn_Generic = [
403 'at19200',
404 'at115200',
405 'obex',
407 Conn_Cable = [
408 'at19200',
409 'at115200',
410 'fbusdlr3',
411 'fbus',
412 'mbus',
413 'fbuspl2303',
414 'phonetblue',
415 'fbusblue',
417 Conn_IrDA_Win = [
418 'irdaphonet',
419 'irdaat',
421 Conn_IrDA_Other = [
422 'irdaphonet',
423 'at19200',
425 Conn_BlueRF = [
426 'at19200',
428 Conn_Bluetooth_All = [
429 'bluephonet',
430 'bluefbus',
431 'bluerfgnapbus',
432 'blueat',
433 'blueobex',
435 Conn_Bluetooth_Nokia = [
436 'bluephonet',
437 'bluefbus',
438 'bluerfgnapbus',
439 'blueat',
440 'blueobex',
442 Conn_Bluetooth_Standard = [
443 'blueat',
444 'blueobex',
445 'bluerfgnapbus',
447 Conn_Bluetooth = {
448 'Sony-Ericsson' : Conn_Bluetooth_Standard,
449 'Siemens' : Conn_Bluetooth_Standard,
450 'BenQ' : Conn_Bluetooth_Standard,
451 'Samsung' : Conn_Bluetooth_Standard,
452 'LG' : Conn_Bluetooth_Standard,
453 'Motorola' : Conn_Bluetooth_Standard,
454 'Nokia' : Conn_Bluetooth_Nokia,
455 'Alcatel' : Conn_Bluetooth_Standard,
457 if sys.platform == 'win32':
458 Devices = [
460 'com1:',
461 'com2:',
462 'com3:',
463 'com4:',
464 'com5:',
465 'com6:',
467 AllDevices = [
468 (Conn_IrDA_Win, '', None, ['irda']),
469 (Conn_Cable, 'com%d:', (1,6), ['irda', 'usb', 'serial', 'bluetooth']),
471 # FIXME: support more platforms?
472 else:
473 Devices = [
474 '/dev/ttyS0',
475 '/dev/ttyS1',
476 '/dev/ttyUSB0',
477 '/dev/ttyUSB1',
478 '/dev/ttyACM0',
479 '/dev/ttyACM1',
480 '/dev/ircomm0',
481 '/dev/rfcomm0',
482 '/dev/usb/tts/0',
484 AllDevices = [
485 (Conn_Cable, '/dev/ttyS%d', (0, 3), ['serial']),
486 (Conn_Cable, '/dev/ttyUSB%d', (0, 3), ['serial', 'usb']),
487 (Conn_Cable, '/dev/ttyACM%d', (0, 3), ['serial', 'usb']),
488 (Conn_BlueRF, '/dev/rfrcomm%d', (0, 1), ['bluetooth']),
489 (Conn_IrDA_Other, '/dev/ircomm%d', (0, 1), ['irda']),
490 (Conn_Cable, '/dev/usb/tts/%d', (0, 3), ['serial', 'usb']),
493 ContactMemoryTypes = ['ME', 'SM']
495 SMSIDs = {
496 'Text': [
497 'Text',
498 'ConcatenatedTextLong',
499 'ConcatenatedAutoTextLong',
500 'ConcatenatedTextLong16bit',
501 'ConcatenatedAutoTextLong16bit',
502 'NokiaVCARD21Long',
503 'NokiaVCALENDAR10Long'
505 'Sound': [
506 'NokiaProfileLong',
507 'NokiaRingtone',
508 'NokiaRingtoneLong',
509 'EMSSound10',
510 'EMSSound12',
511 'EMSSonyEricssonSound',
512 'EMSSound10Long',
513 'EMSSound12Long',
514 'EMSSonyEricssonSoundLong',
516 'Animation': [
517 'NokiaProfileLong',
518 'EMSAnimation',
519 'AlcatelMonoAnimationLong',
520 'NokiaScreenSaverLong',
522 'File': [
523 'SiemensFile',
525 'Bitmap': [
526 'NokiaProfileLong',
527 'NokiaPictureImageLong',
528 'NokiaOperatorLogo',
529 'NokiaOperatorLogoLong',
530 'NokiaCallerLogo',
531 'EMSFixedBitmap',
532 'EMSVariableBitmap',
533 'EMSVariableBitmapLong',
534 'AlcatelMonoBitmapLong',
535 'AlcatelSMSTemplateName',
537 'PredefinedAnimation': [
538 'EMSPredefinedAnimation',
540 'PredefinedSound': [
541 'EMSPredefinedSound',
545 TextFormats = [
546 [(_('Alignment'), _('None')),
547 ('Left', _('Left'), '<div align="left">%s</div>'),
548 ('Right', _('Right'), '<div align="right">%s</div>'),
549 ('Center', _('Center'), '<div align="center">%s</div>'),
551 [(_('Text Size'), _('Normal')),
552 ('Large', _('Large'), '<font size="+2">%s</font>'),
553 ('Small', _('Small'), '<font size="-2">%s</font>'),
555 ['', ('Bold', _('Bold'), '<b>%s</b>')],
556 ['', ('Italic', _('Italic'), '<i>%s</i>')],
557 ['', ('Underlined', _('Underlined'), '<u>%s</u>')],
558 ['', ('Strikethrough', _('Strikethrough'), '<strike>%s</strike>')],
561 # dump from Gammu Phone Database
562 ManufacturerMap = {
563 'Alcatel': 1,
564 'Nokia': 2,
565 'Siemens': 3,
566 'Sony Ericsson': 4,
567 'Sagem': 5,
568 'Motorola': 6,
569 'Falcom': 7,
570 'Samsung': 8,
571 'LG': 9,
572 'Sharp': 10,
573 'Mitsubishi': 11,
574 'PalmOne': 12,
575 'BenQ-Siemens': 13,
576 'Philips': 14,
577 'Elson': 15,
578 'Toshiba': 16,
579 'Option': 17,
580 'Onda': 18,
581 'Teltonika': 19,
582 'HTC': 20,
583 'Apple': 21,
584 'Huawei': 22,
585 'Wavecom': 23,
586 'Sierra Wireless': 24,
587 'Lenovo': 25,
588 'Fly': 26,
589 'Simcom': 27,
590 'Sanyo': 28,
591 'ZTE': 29,
592 'Jinpeng': 30,
594 GarbleMap = {
595 0: 'atdot',
596 1: 'nospam',
597 2: 'none',
598 3: 'hide',
601 # Generated from http://standards.ieee.org/regauth/oui/oui.txt
602 MAC_Prefixes = {
603 'Sony-Ericsson' : [
604 '00:01:EC',
605 '00:0A:D9',
606 '00:0E:07',
607 '00:0F:DE',
608 '00:12:EE',
609 '00:15:E0',
610 '00:16:20',
611 '00:16:B8',
612 '00:18:13',
613 '00:19:63',
614 '00:1A:75',
615 '00:1B:59',
616 '00:1C:A4',
617 '00:1D:28',
618 '00:1E:45',
619 '00:80:37',
621 'Nokia' : [
622 '00:02:EE',
623 '00:0B:E1',
624 '00:0E:ED',
625 '00:0F:BB',
626 '00:10:B3',
627 '00:11:9F',
628 '00:12:62',
629 '00:13:70',
630 '00:13:FD',
631 '00:14:A7',
632 '00:15:2A',
633 '00:15:A0',
634 '00:15:DE',
635 '00:16:4E',
636 '00:16:BC',
637 '00:17:4B',
638 '00:17:B0',
639 '00:18:0F',
640 '00:18:42',
641 '00:18:8D',
642 '00:18:C5',
643 '00:19:2D',
644 '00:19:4F',
645 '00:19:79',
646 '00:19:B7',
647 '00:1A:16',
648 '00:1A:89',
649 '00:1A:DC',
650 '00:1B:33',
651 '00:1B:AF',
652 '00:1B:EE',
653 '00:1C:35',
654 '00:1C:9A',
655 '00:1C:D4',
656 '00:1C:D6',
657 '00:1D:3B',
658 '00:1D:6E',
659 '00:1D:98',
660 '00:1D:E9',
661 '00:1D:FD',
662 '00:1E:3A',
663 '00:1E:3B',
664 '00:1E:A3',
665 '00:1E:A4',
666 '00:40:43',
667 '00:A0:8E',
668 '00:E0:03',
670 'Siemens' : [
671 '00:01:E3',
672 '00:05:19',
673 '00:0B:23',
674 '00:0B:A3',
675 '00:0D:41',
676 '00:0E:8C',
677 '00:0F:BB',
678 '00:11:06',
679 '00:11:33',
680 '00:13:A3',
681 '00:18:D1',
682 '00:19:28',
683 '00:19:99',
684 '00:1A:D0',
685 '00:1A:E8',
686 '00:1B:1B',
687 '00:1C:06',
688 '00:30:05',
689 '00:50:07',
690 '00:90:40',
691 '00:C0:E4',
692 '08:00:06',
694 'Samsung' : [
695 '00:00:F0',
696 '00:02:78',
697 '00:09:18',
698 '00:0D:AE',
699 '00:0D:E5',
700 '00:0F:73',
701 '00:12:47',
702 '00:12:FB',
703 '00:13:77',
704 '00:15:99',
705 '00:15:B9',
706 '00:16:32',
707 '00:16:6B',
708 '00:16:6C',
709 '00:16:DB',
710 '00:17:C9',
711 '00:17:D5',
712 '00:18:AF',
713 '00:1A:8A',
714 '00:1B:98',
715 '00:1C:43',
716 '00:1D:25',
717 '00:1D:F6',
718 '00:1E:7D',
719 '00:E0:64',
721 'LG' : [
722 '00:05:C9',
723 '00:0B:29',
724 '00:12:56',
725 '00:14:80',
726 '00:19:A1',
727 '00:1C:62',
728 '00:1E:75',
729 '00:1E:B2',
730 '00:50:CE',
731 '00:E0:91',
733 'BenQ' : [
734 '00:03:9D',
735 '00:17:CA',
737 'Motorola' : [
738 '00:01:AF',
739 '00:04:56',
740 '00:04:BD',
741 '00:08:0E',
742 '00:0A:28',
743 '00:0B:06',
744 '00:0C:E5',
745 '00:0E:5C',
746 '00:0E:C7',
747 '00:0F:9F',
748 '00:11:1A',
749 '00:11:80',
750 '00:11:AE',
751 '00:12:25',
752 '00:12:8A',
753 '00:12:C9',
754 '00:13:71',
755 '00:14:04',
756 '00:14:9A',
757 '00:14:E8',
758 '00:15:2F',
759 '00:15:9A',
760 '00:15:A8',
761 '00:16:26',
762 '00:16:75',
763 '00:16:B5',
764 '00:17:00',
765 '00:17:84',
766 '00:17:E2',
767 '00:17:EE',
768 '00:18:A4',
769 '00:18:C0',
770 '00:19:2C',
771 '00:19:5E',
772 '00:19:A6',
773 '00:19:C0',
774 '00:1A:1B',
775 '00:1A:66',
776 '00:1A:77',
777 '00:1A:AD',
778 '00:1A:DB',
779 '00:1A:DE',
780 '00:1B:52',
781 '00:1B:DD',
782 '00:1C:11',
783 '00:1C:12',
784 '00:1C:C1',
785 '00:1C:FB',
786 '00:1D:6B',
787 '00:1D:BE',
788 '00:1E:46',
789 '00:1E:5A',
790 '00:1E:8D',
791 '00:20:40',
792 '00:20:75',
793 '00:A0:BF',
794 '00:C0:F9',
795 '00:E0:0C',
797 'Alcatel' : [
798 '00:07:72',
799 '00:08:9A',
800 '00:0E:86',
801 '00:0F:62',
802 '00:11:3F',
803 '00:11:8B',
804 '00:15:3F',
805 '00:16:4D',
806 '00:17:CC',
807 '00:19:8F',
808 '00:1A:F0',
809 '00:1C:8E',
810 '00:1D:4C',
811 '00:20:32',
812 '00:20:60',
813 '00:20:DA',
814 '00:80:21',
815 '00:80:39',
816 '00:80:9F',
817 '00:A0:81',
818 '00:C0:BE',
819 '00:D0:95',
820 '00:D0:F6',
821 '00:E0:B1',
822 '00:E0:DA',