Package phones ::
Module com_lglx5550
|
|
1
2
3
4
5
6
7
8
9 """Communicate with the LG LX5550 cell phone
10
11 The LX5550 is substantially similar to the VX4400
12
13 """
14
15
16 import time
17 import cStringIO
18 import sha
19
20
21 import common
22 import copy
23 import p_lglx5550
24 import com_lgvx4400
25 import com_brew
26 import com_phone
27 import com_lg
28 import prototypes
29 import sms
30
31 -class Phone(com_lgvx4400.Phone):
32 "Talk to the LG LX5550 cell phone"
33
34 desc="LG-LX5550"
35 helpid=None
36 protocolclass=p_lglx5550
37 serialsname='lglx5550'
38
39
40 imagelocations=(
41
42 ( 10, "download/dloadindex/brewImageIndex.map", "brew/shared", "images", 30) ,
43 )
44
45 ringtonelocations=(
46
47 ( 50, "download/dloadindex/brewRingerIndex.map", "user/sound/ringer", "ringers", 30),
48 )
49
50 builtinimages= ('Foliage', 'Castle', 'Dandelion', 'Golf course', 'Icicles',
51 'Orangutan', 'Lake')
52
53 builtinringtones= ('Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'Ring 5', 'Ring 6',
54 'Ring 7', 'Ring 8', 'Annen Polka', 'Pachelbel Canon',
55 'Hallelujah', 'La Traviata', 'Leichte Kavallerie Overture',
56 'Mozart Symphony No.40', 'Bach Minuet', 'Farewell',
57 'Mozart Piano Sonata', 'Sting', 'O Solemio',
58 'Pizzicato Polka', 'Stars and Stripes Forever',
59 'Pineapple Rag', 'When the Saints Go Marching In', 'Latin',
60 'Carol 1', 'Carol 2')
61
62
63 - def __init__(self, logtarget, commport):
66
67 - def _getquicktext(self):
68 quicks=[]
69 quicks=com_lgvx4400.Phone._getquicktext(self)
70 built_in=['Yes', 'No', 'Call Me', 'Need Directions', 'Where are you?',
71 'Will Call you later', 'Busy', 'On My way', 'Will arive in 15 minutes',
72 'Thank you', 'Love you']
73 for s in built_in:
74 quicks.append({ 'text': s, 'type': sms.CannedMsgEntry.builtin_type })
75 return quicks
76
87
88 my_version_txt='AX5550'
89 my_model='LX5550'
90
109
110
111 parentprofile=com_lgvx4400.Profile
113 protocolclass=Phone.protocolclass
114 serialsname=Phone.serialsname
115 phone_manufacturer='LG Electronics Inc'
116 phone_model='LX5550'
117
118
119 usbids=com_lgvx4400.Profile.usbids_usbtoserial
120
121
122 reboot_delay=3
123
124 WALLPAPER_WIDTH=120
125 WALLPAPER_HEIGHT=131
126 MAX_WALLPAPER_BASENAME_LENGTH=19
127 WALLPAPER_FILENAME_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
128 WALLPAPER_CONVERT_FORMAT="jpg"
129
130 MAX_RINGTONE_BASENAME_LENGTH=19
131 RINGTONE_FILENAME_CHARS="_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
132
133 imageorigins={}
134 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
137
138
139 imagetargets={}
140 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
141 {'width': 120, 'height': 131, 'format': "BMP"}))
142 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
143 {'width': 120, 'height': 131, 'format': "BMP"}))
144 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
145 {'width': 120, 'height': 160, 'format': "BMP"}))
146
149
150 _supportedsyncs=(
151 ('phonebook', 'read', None),
152 ('calendar', 'read', None),
153 ('wallpaper', 'read', None),
154 ('ringtone', 'read', None),
155 ('phonebook', 'write', 'OVERWRITE'),
156 ('calendar', 'write', 'OVERWRITE'),
157
158
159
160 ('ringtone', 'write', 'MERGE'),
161 ('ringtone', 'write', 'OVERWRITE'),
162 ('memo', 'read', None),
163 ('memo', 'write', 'OVERWRITE'),
164 ('call_history', 'read', None),
165 ('sms', 'read', None),
166 ('sms', 'write', 'OVERWRITE'),
167 )
168
171