Package phones ::
Module com_lgvx7000
|
|
1
2
3
4
5
6
7
8
9
10 """Communicate with the LG VX7000 cell phone
11
12 The VX7000 is substantially similar to the VX6000 but also supports video.
13
14 The code in this file mainly inherits from VX4400 code and then extends where
15 the 6000 has extra functionality
16
17 """
18
19
20 import time
21 import cStringIO
22 import sha
23
24
25 import common
26 import copy
27 import p_lgvx7000
28 import com_lgvx4400
29 import com_brew
30 import com_phone
31 import com_lg
32 import prototypes
33 import helpids
34
35 -class Phone(com_lg.LGNewIndexedMedia,com_lgvx4400.Phone):
36 "Talk to the LG VX7000 cell phone"
37
38 desc="LG-VX7000"
39 helpid=helpids.ID_PHONE_LGVX7000
40 protocolclass=p_lgvx7000
41 serialsname='lgvx7000'
42
43 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps') + \
44 tuple(['Ringtone '+`n` for n in range(1,11)]) + \
45 ('No Ring',)
46
47 ringtonelocations= (
48
49 ( 'ringers', 'dload/sound.dat', 'dload/soundsize.dat', 'dload/snd', 100, 50, 1),
50 )
51
52 builtinwallpapers = ()
53
54 wallpaperlocations= (
55 ( 'images', 'dload/image.dat', 'dload/imagesize.dat', 'dload/img', 100, 50, 0),
56 )
57
58
59 - def __init__(self, logtarget, commport):
63
64 my_model='VX7000'
65
66 parentprofile=com_lgvx4400.Profile
68 protocolclass=Phone.protocolclass
69 serialsname=Phone.serialsname
70 phone_manufacturer='LG Electronics Inc'
71 phone_model='VX7000'
72
73 WALLPAPER_WIDTH=176
74 WALLPAPER_HEIGHT=184
75 MAX_WALLPAPER_BASENAME_LENGTH=32
76 WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
77 WALLPAPER_CONVERT_FORMAT="jpg"
78
79 MAX_RINGTONE_BASENAME_LENGTH=32
80 RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
81
82
83 imageorigins={}
84 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
87
88
89 imagetargets={}
90 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
91 {'width': 176, 'height': 184, 'format': "JPEG"}))
92 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
93 {'width': 176, 'height': 184, 'format': "JPEG"}))
94 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd",
95 {'width': 96, 'height': 80, 'format': "JPEG"}))
96 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
97 {'width': 176, 'height': 220, 'format': "JPEG"}))
98
101
102
105
106 _supportedsyncs=(
107 ('phonebook', 'read', None),
108 ('calendar', 'read', None),
109 ('wallpaper', 'read', None),
110 ('ringtone', 'read', None),
111 ('call_history', 'read', None),
112 ('sms', 'read', None),
113 ('phonebook', 'write', 'OVERWRITE'),
114 ('calendar', 'write', 'OVERWRITE'),
115 ('wallpaper', 'write', 'MERGE'),
116 ('wallpaper', 'write', 'OVERWRITE'),
117 ('ringtone', 'write', 'MERGE'),
118 ('ringtone', 'write', 'OVERWRITE'),
119 ('sms', 'write', 'OVERWRITE'),
120 )
121