Package phones ::
Module com_lgvx4500
|
|
1
2
3
4
5
6
7
8
9
10 """Communicate with the LG VX4500 cell phone
11
12 The VX4500 is substantially similar to the VX4400
13
14 """
15
16
17 import time
18 import cStringIO
19 import sha
20
21
22 import common
23 import copy
24 import p_lgvx4500
25 import com_lgvx4400
26 import com_brew
27 import com_phone
28 import com_lg
29 import helpids
30 import prototypes
31
32 -class Phone(com_lgvx4400.Phone):
33 "Talk to the LG VX4500 cell phone"
34
35 desc="LG-VX4500"
36 helpid=helpids.ID_PHONE_LGVX4500
37 protocolclass=p_lgvx4500
38 serialsname='lgvx4500'
39
40
41 imagelocations=(
42
43 ( 10, "download/dloadindex/brewImageIndex.map", "brew/shared", "images", 30) ,
44 )
45
46 ringtonelocations=(
47
48 ( 50, "download/dloadindex/brewRingerIndex.map", "user/sound/ringer", "ringers", 30),
49 )
50
51 builtinimages= ('Foliage', 'Castle', 'Dandelion', 'Golf course', 'Icicles',
52 'Orangutan', 'Lake', 'Golden Gate', 'Desert')
53
54 builtinringtones= ('Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'Ring 5', 'Ring 6',
55 'Ring 7', 'Ring 8', 'Annen Polka', 'Pachelbel Canon',
56 'Hallelujah', 'La Traviata', 'Leichte Kavallerie Overture',
57 'Mozart Symphony No.40', 'Bach Minuet', 'Farewell',
58 'Mozart Piano Sonata', 'Sting', 'O solemio',
59 'Pizzicata Polka', 'Stars and Stripes Forever',
60 'Pineapple Rag', 'When the Saints Go Marching In', 'Latin',
61 'Carol 1', 'Carol 2', 'Chimes high', 'Chimes low', 'Ding',
62 'TaDa', 'Notify', 'Drum', 'Claps', 'Fanfare', 'Chord high',
63 'Chord low')
64
65
66 - def __init__(self, logtarget, commport):
69
70 - def makeentry(self, counter, entry, dict):
71 e=com_lgvx4400.Phone.makeentry(self, counter, entry, dict)
72 e.entrysize=0x202
73
74 return e
75
76 my_model='VX4500'
77
96
97
98 parentprofile=com_lgvx4400.Profile
100 protocolclass=Phone.protocolclass
101 serialsname=Phone.serialsname
102 phone_manufacturer='LG Electronics Inc'
103 phone_model='VX4500'
104
105
106 usbids=com_lgvx4400.Profile.usbids_usbtoserial
107
108 WALLPAPER_WIDTH=120
109 WALLPAPER_HEIGHT=131
110 MAX_WALLPAPER_BASENAME_LENGTH=19
111 WALLPAPER_FILENAME_CHARS="abcdefghijklmnopqrstuvwxyz0123456789 ."
112 WALLPAPER_CONVERT_FORMAT="bmp"
113
114 MAX_RINGTONE_BASENAME_LENGTH=19
115 RINGTONE_FILENAME_CHARS="abcdefghijklmnopqrstuvxwyz0123456789 ."
116
117 imageorigins={}
118 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
121
122
123 imagetargets={}
124 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
125 {'width': 120, 'height': 131, 'format': "BMP"}))
126 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
127 {'width': 120, 'height': 131, 'format': "BMP"}))
128 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
129 {'width': 120, 'height': 160, 'format': "BMP"}))
130
133
134 _supportedsyncs=(
135 ('phonebook', 'read', None),
136 ('calendar', 'read', None),
137 ('wallpaper', 'read', None),
138 ('ringtone', 'read', None),
139 ('phonebook', 'write', 'OVERWRITE'),
140 ('calendar', 'write', 'OVERWRITE'),
141 ('wallpaper', 'write', 'MERGE'),
142 ('wallpaper', 'write', 'OVERWRITE'),
143 ('ringtone', 'write', 'MERGE'),
144 ('ringtone', 'write', 'OVERWRITE'),
145 ('memo', 'read', None),
146 ('memo', 'write', 'OVERWRITE'),
147 ('call_history', 'read', None),
148 ('sms', 'read', None),
149 ('sms', 'write', 'OVERWRITE'),
150 )
151
154