Package phones ::
Module com_lgvx5200
|
|
1
2
3
4
5
6
7
8
9
10
11 """Communicate with the LG VX5200 cell phone
12
13
14 The code in this file mainly inherits from VX8100 code and then extends where
15 the 5200 has different functionality
16
17 """
18
19
20 import time
21 import cStringIO
22 import sha
23
24
25 import common
26 import commport
27 import copy
28 import com_lgvx4400
29 import p_brew
30 import p_lgvx5200
31 import com_lgvx8100
32 import com_brew
33 import com_phone
34 import com_lg
35 import prototypes
36 import bpcalendar
37 import call_history
38 import sms
39 import memo
40 import helpids
41
42 -class Phone(com_lgvx8100.Phone):
43 "Talk to the LG VX5200 cell phone"
44
45 desc="LG-VX5200"
46 helpid=helpids.ID_PHONE_LGVX5200
47 protocolclass=p_lgvx5200
48 serialsname='lgvx5200'
49
50 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'VZW Default Ringtone') + \
51 tuple(['Ringtone '+`n` for n in range(1,11)]) + \
52 ('No Ring',)
53
54 ringtonelocations= (
55
56 ( 'ringers', 'dload/ringtone.dat', '', 'user/sound/ringer', 100, 150, 0x201, 1, 0),
57 ( 'sounds', 'dload/sound.dat', 'dload/soundsize.dat', 'dload/snd', 100, 150, 0x402, 0, 151),
58 )
59
60 calendarlocation="sch/schedule.dat"
61 calendarexceptionlocation="sch/schexception.dat"
62 calenderrequiresreboot=1
63 memolocation="sch/memo.dat"
64
65 builtinwallpapers = ()
66
67 wallpaperlocations= (
68 ( 'images', 'dload/image.dat', 'dload/imagesize.dat', 'dload/img', 100, 50, 0, 0, 0),
69 )
70
71 - def __init__(self, logtarget, commport):
74
77
78 my_model='VX5200'
79
80
81
86
87 parentprofile=com_lgvx8100.Profile
89 protocolclass=Phone.protocolclass
90 serialsname=Phone.serialsname
91
92 BP_Calendar_Version=3
93 phone_manufacturer='LG Electronics Inc'
94 phone_model='VX5200'
95
96 WALLPAPER_WIDTH=275
97 WALLPAPER_HEIGHT=175
98 MAX_WALLPAPER_BASENAME_LENGTH=32
99 WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_() ."
100 WALLPAPER_CONVERT_FORMAT="jpg"
101
102
103 DIALSTRING_CHARS="[^0-9PW#*]"
104
105 MAX_RINGTONE_BASENAME_LENGTH=32
106 RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_() ."
107
108
109 imageorigins={}
110 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
113
114 ringtoneorigins=('ringers', 'sounds')
115 excluded_ringtone_origins=('sounds')
116
117
118 imagetargets={}
119 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
120 {'width': 275, 'height': 175, 'format': "JPEG"}))
121
124
125
128
129 _supportedsyncs=(
130 ('phonebook', 'read', None),
131 ('calendar', 'read', None),
132 ('wallpaper', 'read', None),
133 ('ringtone', 'read', None),
134 ('call_history', 'read', None),
135 ('sms', 'read', None),
136 ('memo', 'read', None),
137 ('phonebook', 'write', 'OVERWRITE'),
138 ('calendar', 'write', 'OVERWRITE'),
139 ('wallpaper', 'write', 'MERGE'),
140 ('wallpaper', 'write', 'OVERWRITE'),
141 ('ringtone', 'write', 'MERGE'),
142 ('ringtone', 'write', 'OVERWRITE'),
143 ('sms', 'write', 'OVERWRITE'),
144 ('memo', 'write', 'OVERWRITE'),
145 )
146