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