Package phones ::
Module com_lgvx6000
|
|
1
2
3
4
5
6
7
8
9
10 """Communicate with the LG VX6000 cell phone
11
12 The VX6000 is substantially similar to the VX4400 except that it supports more
13 image formats, has wallpapers in no less than 5 locations and puts things in
14 slightly different directories.
15
16 The code in this file mainly inherits from VX4400 code and then extends where
17 the 6000 has extra functionality
18
19 """
20
21
22 import time
23 import cStringIO
24 import sha
25
26
27 import common
28 import copy
29 import p_lgvx6000
30 import com_lgvx4400
31 import com_brew
32 import com_phone
33 import com_lg
34 import prototypes
35 import helpids
36
37 -class Phone(com_lgvx4400.Phone):
38 "Talk to the LG VX6000 cell phone"
39
40 desc="LG-VX6000"
41 helpid=helpids.ID_PHONE_LGVX6000
42 protocolclass=p_lgvx6000
43 serialsname='lgvx6000'
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',
62 'Fish', 'Sea', 'Snowman')
63
64 builtinringtones= ('Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'Ring 5', 'Ring 6',
65 'Annen Polka', 'Leichte Kavallerie Overture', 'CanCan',
66 'Paganini', 'Bubble', 'Fugue',
67 'Polka', 'Mozart Symphony No. 40', 'Cuckoo Waltz', 'Rodetzky',
68 'Funicula', 'Hallelujah', 'Trumpets', 'Trepak', 'Prelude', 'Mozart Aria',
69 'William Tell overture', 'Spring', 'Slavonic', 'Fantasy')
70
71
72 - def __init__(self, logtarget, commport):
75
93
94 my_model='VX6000'
108
109 parentprofile=com_lgvx4400.Profile
111 protocolclass=Phone.protocolclass
112 serialsname=Phone.serialsname
113 phone_manufacturer='LG Electronics Inc'
114 phone_model='VX6000'
115
116
117
118
119
120
121 WALLPAPER_WIDTH=120
122 WALLPAPER_HEIGHT=131
123 MAX_WALLPAPER_BASENAME_LENGTH=32
124 WALLPAPER_FILENAME_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
125 WALLPAPER_CONVERT_FORMAT="bmp"
126
127 MAX_RINGTONE_BASENAME_LENGTH=32
128 RINGTONE_FILENAME_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
129
130
131 imageorigins={}
132 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
133 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "mms"))
134 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "drm"))
137
138 ringtoneorigins=('ringers', 'mms', 'drm')
139 excluded_ringtone_origins=('mms', 'drm')
140 excluded_wallpaper_origins=('mms', 'drm')
141
142
143 imagetargets={}
144 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
145 {'width': 120, 'height': 131, 'format': "BMP"}))
146 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
147 {'width': 120, 'height': 131, 'format': "BMP"}))
148 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
149 {'width': 120, 'height': 160, 'format': "BMP"}))
150
153
154 _supportedsyncs=(
155 ('phonebook', 'read', None),
156 ('calendar', 'read', None),
157 ('wallpaper', 'read', None),
158 ('ringtone', 'read', None),
159 ('phonebook', 'write', 'OVERWRITE'),
160 ('calendar', 'write', 'OVERWRITE'),
161 ('wallpaper', 'write', 'MERGE'),
162 ('wallpaper', 'write', 'OVERWRITE'),
163 ('ringtone', 'write', 'MERGE'),
164 ('ringtone', 'write', 'OVERWRITE'),
165 ('memo', 'read', None),
166 ('memo', 'write', 'OVERWRITE'),
167 ('call_history', 'read', None),
168 ('sms', 'read', None),
169 ('sms', 'write', 'OVERWRITE'),
170 )
171
174