Package phones ::
Module com_lgux5000
|
|
1
2
3
4
5
6
7
8
9
10
11
12 """Communicate with the LG UX5000 cell phone
13
14 The UX5000 is substantially similar to the VX4400 and VX6100.
15
16 The code in this file mainly inherits from VX4400 and VX6100 code.
17
18 """
19
20
21 import time
22 import cStringIO
23 import sha
24
25
26 import common
27 import commport
28 import copy
29 import p_brew
30 import p_lgux5000
31 import com_lgvx4400
32 import com_brew
33 import com_phone
34 import com_lg
35 import prototypes
36 import call_history
37 import helpids
38
39 -class Phone(com_lgvx4400.Phone):
40 "Talk to the LG UX5000 cell phone"
41
42 desc="LG-UX5000"
43 helpid=helpids.ID_PHONE_LGUX5000
44 protocolclass=p_lgux5000
45 serialsname='lgux5000'
46
47
48 imagelocations=(
49
50 ( 16, "download/dloadindex/brewImageIndex.map", "brew/shared", "images", 60) ,
51 ( 200, "download/dloadindex/mmsImageIndex.map", "brew/shared/mms", "mms", 30),
52 ( 240, "download/dloadindex/mmsDrmImageIndex.map", "brew/shared/mms/d", "drm", 20),
53 ( 130, None, None, "camera", 60)
54 )
55
56 ringtonelocations=(
57
58 ( 50, "download/dloadindex/brewRingerIndex.map", "user/sound/ringer", "ringers", 60),
59 ( 150, "download/dloadindex/mmsRingerIndex.map", "mms/sound", "mms", 20),
60 ( 180, "download/dloadindex/mmsDrmRingerIndex.map", "mms/sound/drm", "drm", 20)
61 )
62
63 builtinimages= ('Sport', 'Butterfly', 'Cake', 'Niagara Falls', 'Rockefeller',
64 'Statue of Liberty', 'The Capital', 'Scenary','White Bear', 'Yacht' )
65
66 builtinringtones= ('Ring 2', 'Ring 3', 'Ring 4', 'Ring 5', 'VZW Default Tone',
67 'Farewell', 'Arabesque',
68 'Piano Sonata', 'Latin', 'When The Saints', 'Bach Cello Suite',
69 'Speedy Way', 'Cancan', 'Sting', 'Toccata and Fugue',
70 'Mozart Symphony 40', 'Nutcracker March', 'Funiculi', 'Polka',
71 'Hallelujah', 'Mozart Aria',
72 'Leichte', 'Spring', 'Slavonic', 'Fantasy', 'Chimes High',
73 'Chimes Low', 'Ding', 'Tada', 'Notify', 'Drum', 'Claps', 'Fanfare',
74 'Chord High', 'Chord Low')
75
76
77 - def __init__(self, logtarget, commport):
80
81 - def makeentry(self, counter, entry, dict):
82 e=com_lgvx4400.Phone.makeentry(self, counter, entry, dict)
83 e.entrysize=0x202
84 return e
85
103
104 my_model='UX5000'
105
123
124 parentprofile=com_lgvx4400.Profile
126 protocolclass=Phone.protocolclass
127 serialsname=Phone.serialsname
128 phone_manufacturer='LG Electronics Inc'
129 phone_model='UX5000'
130
131 WALLPAPER_WIDTH=132
132 WALLPAPER_HEIGHT=148
133 MAX_WALLPAPER_BASENAME_LENGTH=24
134 WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ."
135 WALLPAPER_CONVERT_FORMAT="jpg"
136
137 MAX_RINGTONE_BASENAME_LENGTH=24
138 RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ."
139
140 ringtoneorigins=('ringers', 'mms', 'drm')
141 excluded_ringtone_origins=('mms', 'drm')
142
143
144 imageorigins={}
145 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
146 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "mms"))
147 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "drm"))
150
151
152 imagetargets={}
153 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
154 {'width': 132, 'height': 148, 'format': "JPEG"}))
155 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
156 {'width': 132, 'height': 148, 'format': "JPEG"}))
157 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
158 {'width': 128, 'height': 160, 'format': "JPEG"}))
159
160
161
162
163 _supportedsyncs=(
164 ('phonebook', 'read', None),
165 ('calendar', 'read', None),
166 ('wallpaper', 'read', None),
167 ('ringtone', 'read', None),
168 ('phonebook', 'write', 'OVERWRITE'),
169 ('call_history', 'read', None),
170 ('sms', 'read', None),
171 ('memo', 'read', None),
172 ('calendar', 'write', 'OVERWRITE'),
173 ('wallpaper', 'write', 'MERGE'),
174 ('wallpaper', 'write', 'OVERWRITE'),
175 ('ringtone', 'write', 'MERGE'),
176 ('ringtone', 'write', 'OVERWRITE'),
177 ('sms', 'write', 'OVERWRITE'),
178 ('memo', 'write', 'OVERWRITE'),
179 )
180
183