Package phones ::
Module com_lglx5450
|
|
1
2
3
4
5
6
7
8
9
10
11 """Communicate with the LG LX5450 cell phone
12
13 The LX5450 is substantially similar to the VX4400 except that it supports more
14 image formats, has wallpapers in no less than 4 locations and puts things in
15 slightly different directories. It is almost identical to the vx6000.
16
17 The code in this file mainly inherits from VX4400 code and then extends where
18 the 5450 has extra functionality
19
20 """
21
22
23 import time
24 import cStringIO
25 import sha
26
27
28 import common
29 import copy
30 import p_lglx5450
31 import com_lgvx4400
32 import com_brew
33 import com_phone
34 import com_lg
35 import prototypes
36
37 -class Phone(com_lgvx4400.Phone):
38 "Talk to the LG LX5450 cell phone"
39
40 desc="LG-LX5450"
41 helpid=None
42 protocolclass=p_lglx5450
43 serialsname='lglx5450'
44
45
46 imagelocations=(
47
48 ( 10, "download/dloadindex/brewImageIndex.map", "brew/shared", "images", 30) ,
49 ( 0xc8, "download/dloadindex/mmsImageIndex.map", "brew/shared/mms", "mms", 20),
50 ( 0xdc, "download/dloadindex/mmsDrmImageIndex.map", "brew/shared/mms/d", "drm", 20),
51 ( 0x82, None, None, "camera", 20)
52 )
53
54 ringtonelocations=(
55
56 ( 50, "download/dloadindex/brewRingerIndex.map", "user/sound/ringer", "ringers", 30),
57 ( 150, "download/dloadindex/mmsRingerIndex.map", "mms/sound", "mms", 20),
58 ( 180, "download/dloadindex/mmsDrmRingerIndex.map", "mms/sound/drm", "drm", 20)
59 )
60
61 builtinimages= ('Beach Ball', 'Towerbridge', 'Sunflower', 'Beach', 'Fish',
62 'Sea', 'Snowman')
63
64 builtinringtones= ('Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'Ring 5', 'Ring 6',
65 'Annen Polka', 'Beethoven Symphony No. 9', 'Pachelbel Canon',
66 'Hallelujah', 'La Traviata', 'Leichte Kavallerie Overture',
67 'Mozart Symphony No.40', 'Bach Minuet', 'Farewell',
68 'Mozart Piano Sonata', 'Sting', 'Trout', 'O solemio',
69 'Pizzicata Polka', 'Stars and Stripes Forever',
70 'Pineapple Rag', 'When the Saints Go Marching In', 'Latin',
71 'Carol 1', 'Carol 2')
72
73
74 - def __init__(self, logtarget, commport):
77
91
102
103
104 my_version_txt='AX545V'
105 my_model='LX5450'
106
107 parentprofile=com_lgvx4400.Profile
109 protocolclass=Phone.protocolclass
110 serialsname=Phone.serialsname
111 phone_manufacturer='LG Electronics Inc'
112 phone_model='LX5450'
113
114 WALLPAPER_WIDTH=120
115 WALLPAPER_HEIGHT=131
116 MAX_WALLPAPER_BASENAME_LENGTH=32
117 WALLPAPER_FILENAME_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
118 WALLPAPER_CONVERT_FORMAT="bmp"
119
120 MAX_RINGTONE_BASENAME_LENGTH=32
121 RINGTONE_FILENAME_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
122
123
124 imageorigins={}
125 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
126 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "mms"))
127 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "drm"))
130
131 ringtoneorigins=('ringers', 'mms', 'drm')
132 excluded_ringtone_origins=('mms', 'drm')
133 excluded_wallpaper_origins=('mms', 'drm')
134
135
136 imagetargets={}
137 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
138 {'width': 120, 'height': 131, 'format': "BMP"}))
139
142
143 _supportedsyncs=(
144 ('sms', 'read', None),
145 ('sms', 'write', 'OVERWRITE'),
146 ('phonebook', 'read', None),
147 ('phonebook', 'write', 'OVERWRITE'),
148 ('calendar', 'write', 'OVERWRITE'),
149 ('calendar', 'read', None),
150 ('wallpaper', 'read', None),
151 ('wallpaper', 'write', 'MERGE'),
152 ('wallpaper', 'write', 'OVERWRITE'),
153 ('ringtone', 'read', None),
154 ('ringtone', 'write', 'MERGE'),
155 ('ringtone', 'write', 'OVERWRITE'),
156 ('memo', 'read', None),
157 ('memo', 'write', 'OVERWRITE'),
158 ('call_history', 'read', None),
159 )
160
163